wok view kbd/receipt @ rev 25599

Update some current_version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Jul 16 13:38:12 2023 +0000 (17 months ago)
parents da39e47234a2
children
line source
1 # SliTaz package receipt.
3 PACKAGE="kbd"
4 VERSION="2.4.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="https://kbd-project.org/"
12 TARBALL="$PACKAGE-$VERSION.tar.xz"
13 WGET_URL="https://www.kernel.org/pub/linux/utils/kbd/$TARBALL"
15 SUGGESTED="kbd-lang"
16 DEPENDS="gcc83-lib-base kbd-base"
17 BUILD_DEPENDS="advancecomp automake check-dev flex gcc83 pam-dev"
19 HOST_ARCH="i486 arm"
21 # Handle cross compilation.
22 case "$ARCH" in
23 arm) BUILD_DEPENDS="check-dev flex" ;;
24 esac
26 # @maintainer: Please update also: kbd-base, kbd-busybox, kbd-lang and kbd-vlock
28 # What is the latest version available today?
29 current_version()
30 {
31 wget -O - https://github.com/legionus/kbd/releases 2>/dev/null | \
32 sed '/tag\//!d;s|.*tag/v*||;s|".*||;q'
33 }
35 # Rules to configure and make the package.
36 compile_rules()
37 {
38 # standard locale placement
39 # 2.4.0 no longer required
40 # sed -i 's|localedir = .*|localedir = @localedir@|' \
41 # po/Makefile.in.in
43 # Handle cross compilation.
44 case "$ARCH" in
45 (arm)
46 # No PAM support for ARM
47 ./configure \
48 --datadir=/usr/share/kbd \
49 --localedir=/usr/share/locale \
50 --disable-vlock \
51 $CONFIGURE_ARGS
52 ;;
53 (i486)
54 ./configure \
55 CC=gcc-83 \
56 CXX=g++-83 \
57 --datadir=/usr/share/kbd \
58 --localedir=/usr/share/locale \
59 $CONFIGURE_ARGS
60 ;;
61 esac &&
63 make &&
64 make install &&
66 find $DESTDIR/usr/share/kbd -name '*gz' -exec advdef -z4 {} \;
67 }
70 # Rules to gen a SliTaz package suitable for Tazpkg.
71 genpkg_rules()
72 {
73 mkdir -p $fs/usr/share
75 # Copy all kbd files (should we split fonts?)
76 cp -a $install/usr/share/kbd $fs/usr/share
78 # Tools
79 cp -a $install/usr/bin $fs/usr
81 # Remove files provided by kbd-base and kbd-vlock.
82 for keymap in $(cat $WOK/kbd-base/stuff/keymaps-path.list)
83 do
84 rm -f $fs/usr/share/kbd/keymaps/i386/$keymap
85 done
86 rm -rf $fs/usr/share/kbd/keymaps/include
87 rm -rf $fs/usr/share/kbd/keymaps/i386/include
88 rm -f $fs/usr/bin/loadkeys
89 rm -f $fs/usr/bin/setfont
90 rm -f $fs/usr/bin/vlock
91 }
93 # Overlap busybox
94 pre_install()
95 {
96 rm -f $root/usr/bin/deallocvt
97 rm -f $root/usr/bin/chvt
98 rm -f $root/usr/bin/setkeycodes
99 rm -f $root/usr/bin/openvt
100 rm -f $root/usr/bin/kbd_mode
101 }
103 post_remove()
104 {
105 ln -s /bin/busybox $root/usr/bin/deallocvt
106 ln -s /bin/busybox $root/usr/bin/chvt
107 ln -s /bin/busybox $root/usr/bin/setkeycodes
108 ln -s /bin/busybox $root/usr/bin/openvt
109 ln -s /bin/busybox $root/usr/bin/kbd_mode
110 }