wok-6.x view kbd/receipt @ rev 24535

Add some current_version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Feb 23 11:49:52 2022 +0000 (2022-02-23)
parents 620819a54fad
children da39e47234a2
line source
1 # SliTaz package receipt.
3 PACKAGE="kbd"
4 VERSION="2.2.0"
5 CATEGORY="system-tools"
6 TAGS="keyboard"
7 SHORT_DESC="Keyboard mapping definitions and tools."
8 MAINTAINER="pankso@slitaz.org"
9 LICENSE="GPL2"
10 WEB_SITE="http://kbd-project.org/"
12 TARBALL="$PACKAGE-$VERSION.tar.xz"
13 WGET_URL="https://www.kernel.org/pub/linux/utils/kbd/$TARBALL"
15 DEPENDS="kbd-base"
16 BUILD_DEPENDS="advancecomp check-dev flex pam-dev"
18 HOST_ARCH="i486 arm"
20 # Handle cross compilation.
21 case "$ARCH" in
22 arm) BUILD_DEPENDS="check-dev flex" ;;
23 esac
25 current_version()
26 {
27 wget -O - https://github.com/legionus/kbd/releases 2>/dev/null | \
28 sed '/archive.*tar/!d;s|.*/v*\(.*\).tar.*|\1|;q'
29 }
31 # Rules to configure and make the package.
32 compile_rules()
33 {
34 # standard locale placement
35 sed -i 's|localedir = .*|localedir = @localedir@|' \
36 po/Makefile.in.in
38 # Handle cross compilation.
39 case "$ARCH" in
40 arm)
41 # No PAM support for ARM
42 ./configure \
43 --datadir=/usr/share/kbd \
44 --localedir=/usr/share/locale \
45 --disable-vlock \
46 $CONFIGURE_ARGS ;;
47 i486)
48 ./configure \
49 --datadir=/usr/share/kbd \
50 --localedir=/usr/share/locale \
51 $CONFIGURE_ARGS ;;
52 esac &&
53 make -j 1 &&
54 make install &&
56 find $DESTDIR/usr/share/kbd -name '*gz' -exec advdef -z4 {} \;
57 }
60 # Rules to gen a SliTaz package suitable for Tazpkg.
61 genpkg_rules()
62 {
63 mkdir -p $fs/usr/share
65 # Copy all kbd files (should we split fonts?)
66 cp -a $install/usr/share/kbd $fs/usr/share
68 # Tools
69 cp -a $install/usr/bin $fs/usr
71 # Remove files provided by kbd-base and kbd-vlock.
72 for keymap in $(cat $WOK/kbd-base/stuff/keymaps-path.list)
73 do
74 rm -f $fs/usr/share/kbd/keymaps/i386/$keymap
75 done
76 rm -rf $fs/usr/share/kbd/keymaps/include
77 rm -rf $fs/usr/share/kbd/keymaps/i386/include
78 rm -f $fs/usr/bin/loadkeys
79 rm -f $fs/usr/bin/setfont
80 rm -f $fs/usr/bin/vlock
81 }
83 # Overlap busybox
84 pre_install()
85 {
86 rm -f $root/usr/bin/deallocvt
87 rm -f $root/usr/bin/chvt
88 rm -f $root/usr/bin/setkeycodes
89 rm -f $root/usr/bin/openvt
90 rm -f $root/usr/bin/kbd_mode
91 }
93 post_remove()
94 {
95 ln -s /bin/busybox $root/usr/bin/deallocvt
96 ln -s /bin/busybox $root/usr/bin/chvt
97 ln -s /bin/busybox $root/usr/bin/setkeycodes
98 ln -s /bin/busybox $root/usr/bin/openvt
99 ln -s /bin/busybox $root/usr/bin/kbd_mode
100 }