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