wok-next view kbd/receipt @ rev 21020
Cleaning is almost finished... I should proceed to upgrades.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Nov 02 14:15:08 2018 +0200 (2018-11-02) |
parents | 0ec6086e21d6 |
children | 29128929e4f9 |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="kbd"
4 VERSION="2.0.4"
5 CATEGORY="system-tools"
6 SHORT_DESC="Keyboard mapping definitions and tools"
7 MAINTAINER="devel@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="http://kbd-project.org/"
10 LFS="http://www.linuxfromscratch.org/lfs/view/stable/chapter06/kbd.html"
12 TARBALL="kbd-$VERSION.tar.xz"
13 WGET_URL="https://www.kernel.org/pub/linux/utils/kbd/$TARBALL"
15 BUILD_DEPENDS="check-dev bison flex gettext-dev patch pam-dev busybox"
16 SPLIT="$PACKAGE-base $PACKAGE-vlock $PACKAGE-busybox $PACKAGE"
18 compile_rules() {
19 sed -i 's/\(RESIZECONS_PROGS=\)yes/\1no/g' configure
20 sed -i 's/resizecons.8 //' docs/man/man8/Makefile.in
22 cp -a data/keymaps data/keymaps.orig
23 # Shrink keymaps
24 for i in $(find data/keymaps -type f); do
25 sed -i 's| | |g; s| *| |g; s|^ ||; s| $||; /^#/d; /^!/d; /^$/d' $i
26 done
28 # Unicode range is limited by 0xf000 here with error "Unicode keysym out of range",
29 # but de_alt_UTF-8.map has the symbols U+FB01, U+F8FF, U+FB02
30 # And due to this error zero-sized file .kmap is produced.
31 sed -i 's|0xf000|0xfffe|' src/libkeymap/analyze.c src/libkeymap/analyze.l
33 ./configure \
34 --datadir=/usr/share/kbd \
35 $CONFIGURE_ARGS &&
36 fix libtool &&
37 make &&
38 make install || return 1
40 mv $install/usr/share/kbd/locale $install/usr/share
42 cook_pick_docs docs/doc/*
44 # X11 keyboard aliases
45 ln -s croat.map.gz $install/usr/share/kbd/keymaps/i386/qwertz/hr.map.gz
47 # .kmap files for busybox
48 mkdir -p $install/usr/share/kmap
49 for i in $(find $install/usr/share/kbd/keymaps/i386 -name '*.map.gz' | grep -v 'include'); do
50 j=$(basename $i .map.gz)
51 echo $j
52 $install/usr/bin/loadkeys -ub $i > $install/usr/share/kmap/$j.kmap
53 done
54 }
56 # Make sure it will run on target or no keyboard support...
57 testsuite() {
58 readelf -h $install/usr/bin/loadkeys
59 readelf -h $install/usr/bin/setfont
60 }
62 genpkg_rules() {
63 case $PACKAGE in
64 kbd-base)
65 copy loadkeys setfont \
66 \
67 be-latin1.map* fr-latin1.map* dvorak.map* dvorak-r.map* \
68 dvorak-l.map* br-abnt2.map* cf.map* cz-lat2.map* \
69 dk-latin1.map* es.map* fi.map* gr.map* \
70 gr-pc.map* it.map* is-latin1.map* jp106.map* \
71 nl2.map* no-latin1.map* pl2.map* pt-latin1.map* \
72 ru.map* se-lat6.map* tr_q-latin5.map* trq.map* \
73 uk.map* us-acentos.map* us.map* croat.map* \
74 de_CH-latin1.map* de-latin1.map* fr_CH-latin1.map* hu.map* \
75 sg-latin1.map* slovene.map* hr.map* \
76 \
77 azerty-layout.inc compose.inc euro1.inc euro1.map.gz euro2.map.gz \
78 linux-keys-bare.inc linux-with-alt-and-altgr.inc \
79 linux-with-two-alt-keys.inc qwerty-layout.inc qwertz-layout.inc \
80 compose.latin1
81 rm -rf $fs/usr/share/kbd/keymaps/i386/olpc
82 DEPENDS=" "
83 CAT="base-system|loadkeys and setfont utilities"
84 ;;
85 kbd-vlock)
86 copy vlock
87 CAT="system-tools|vlock - Virtual Console lock program"
88 DEPENDS="pam"
89 TAGS="console"
90 ;;
91 kbd-busybox)
92 copy *.kmap
93 DEPENDS="busybox"
94 CAT="base-system|mappings for busybox"
95 ;;
96 kbd)
97 copy bin/ kbd/ @rm
98 DEPENDS="kbd-base"
99 TAGS="LFS keyboard"
100 ;;
101 esac
102 }