wok-6.x annotate kbd/receipt @ rev 25445

itaka: fix wget_url
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Sep 06 07:38:52 2022 +0000 (2022-09-06)
parents a3b6dd3aac6f
children
rev   line source
pankso@708 1 # SliTaz package receipt.
pankso@708 2
pankso@708 3 PACKAGE="kbd"
Hans-G?nter@24697 4 VERSION="2.4.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@24697 10 WEB_SITE="https://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
Hans-G?nter@24697 15 SUGGESTED="kbd-lang"
Hans-G?nter@24697 16 DEPENDS="gcc83-lib-base kbd-base"
Hans-G?nter@24697 17 BUILD_DEPENDS="advancecomp automake check-dev flex gcc83 pam-dev"
Hans-G?nter@22981 18
Hans-G?nter@21089 19 HOST_ARCH="i486 arm"
pankso@15943 20
pankso@15943 21 # Handle cross compilation.
pankso@15943 22 case "$ARCH" in
Hans-G?nter@21089 23 arm) BUILD_DEPENDS="check-dev flex" ;;
pankso@15943 24 esac
pankso@708 25
Hans-G?nter@24697 26 # @maintainer: Please update also: kbd-base, kbd-busybox, kbd-lang and kbd-vlock
Hans-G?nter@24697 27
pascal@24093 28 current_version()
pascal@24093 29 {
pascal@24093 30 wget -O - https://github.com/legionus/kbd/releases 2>/dev/null | \
pascal@24093 31 sed '/archive.*tar/!d;s|.*/v*\(.*\).tar.*|\1|;q'
pascal@24093 32 }
pascal@24093 33
pankso@708 34 # Rules to configure and make the package.
pankso@708 35 compile_rules()
pankso@708 36 {
al@14904 37 # standard locale placement
Hans-G?nter@24697 38 # 2.4.0 no longer required
Hans-G?nter@24697 39 # sed -i 's|localedir = .*|localedir = @localedir@|' \
Hans-G?nter@24697 40 # po/Makefile.in.in
Hans-G?nter@21089 41
pankso@15943 42 # Handle cross compilation.
pankso@15943 43 case "$ARCH" in
Hans-G?nter@24697 44 (arm)
pankso@15943 45 # No PAM support for ARM
Hans-G?nter@21089 46 ./configure \
Hans-G?nter@21089 47 --datadir=/usr/share/kbd \
Hans-G?nter@21089 48 --localedir=/usr/share/locale \
Hans-G?nter@21089 49 --disable-vlock \
Hans-G?nter@24697 50 $CONFIGURE_ARGS
Hans-G?nter@24697 51 ;;
Hans-G?nter@24697 52 (i486)
Hans-G?nter@21089 53 ./configure \
Hans-G?nter@24697 54 CC=gcc-83 \
Hans-G?nter@24697 55 CXX=g++-83 \
Hans-G?nter@21089 56 --datadir=/usr/share/kbd \
Hans-G?nter@21089 57 --localedir=/usr/share/locale \
Hans-G?nter@24697 58 $CONFIGURE_ARGS
Hans-G?nter@24697 59 ;;
pankso@15943 60 esac &&
Hans-G?nter@24697 61
Hans-G?nter@24697 62 make &&
Hans-G?nter@21089 63 make install &&
Hans-G?nter@21089 64
pascal@19248 65 find $DESTDIR/usr/share/kbd -name '*gz' -exec advdef -z4 {} \;
pankso@708 66 }
pankso@708 67
pascal@19248 68
pankso@708 69 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@708 70 genpkg_rules()
pankso@708 71 {
pankso@708 72 mkdir -p $fs/usr/share
pankso@12882 73
al@14904 74 # Copy all kbd files (should we split fonts?)
Hans-G?nter@22981 75 cp -a $install/usr/share/kbd $fs/usr/share
pankso@12882 76
pankso@708 77 # Tools
Hans-G?nter@22981 78 cp -a $install/usr/bin $fs/usr
al@14904 79
al@14904 80 # Remove files provided by kbd-base and kbd-vlock.
Hans-G?nter@22981 81 for keymap in $(cat $WOK/kbd-base/stuff/keymaps-path.list)
Hans-G?nter@22981 82 do
Hans-G?nter@24697 83 rm -f $fs/usr/share/kbd/keymaps/i386/$keymap
Hans-G?nter@22981 84 done
Hans-G?nter@22981 85 rm -rf $fs/usr/share/kbd/keymaps/include
Hans-G?nter@22981 86 rm -rf $fs/usr/share/kbd/keymaps/i386/include
Hans-G?nter@22981 87 rm -f $fs/usr/bin/loadkeys
Hans-G?nter@22981 88 rm -f $fs/usr/bin/setfont
Hans-G?nter@22981 89 rm -f $fs/usr/bin/vlock
pankso@708 90 }
pankso@708 91
pascal@8878 92 # Overlap busybox
pascal@8878 93 pre_install()
pascal@8878 94 {
pankso@12882 95 rm -f $root/usr/bin/deallocvt
pankso@12882 96 rm -f $root/usr/bin/chvt
pankso@12882 97 rm -f $root/usr/bin/setkeycodes
pankso@12882 98 rm -f $root/usr/bin/openvt
pankso@12882 99 rm -f $root/usr/bin/kbd_mode
pascal@8878 100 }
pascal@8878 101
pascal@8878 102 post_remove()
pascal@8878 103 {
pankso@12882 104 ln -s /bin/busybox $root/usr/bin/deallocvt
pankso@12882 105 ln -s /bin/busybox $root/usr/bin/chvt
pankso@12882 106 ln -s /bin/busybox $root/usr/bin/setkeycodes
pankso@12882 107 ln -s /bin/busybox $root/usr/bin/openvt
pankso@12882 108 ln -s /bin/busybox $root/usr/bin/kbd_mode
pascal@8878 109 }