wok view syslinux/receipt @ rev 18758
syslinux: compress kbd file
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Dec 29 10:21:19 2015 +0100 (2015-12-29) |
parents | ef4ed701a27f |
children | 1bbbc99b3df2 |
line source
1 # SliTaz package receipt.
3 PACKAGE="syslinux"
4 VERSION="4.06"
5 CATEGORY="base-system"
6 SHORT_DESC="LiveCD ISO bootloader (isolinux)"
7 MAINTAINER="pankso@slitaz.org"
8 LICENSE="GPL2"
9 TARBALL="$PACKAGE-$VERSION.tar.xz"
10 WEB_SITE="http://syslinux.zytor.com/"
11 WGET_URL="https://www.kernel.org/pub/linux/utils/boot/syslinux/$TARBALL"
12 CONFIG_FILES="/boot/isolinux"
13 TAGS="boot"
15 DEPENDS="ipxe memtest"
16 BUILD_DEPENDS="wget kbd-base perl nasm dev86 lzma mingw32-gcc upx posixovl \
17 util-linux-uuid-dev advancecomp libidn"
19 # Rules to gen a SliTaz package suitable for Tazpkg.
20 compile_rules()
21 {
22 rm -f $src/core/isolinux.bin
23 patch -p 0 < $stuff/extra/loadhigh.u
24 patch -p 0 < $stuff/extra/iso9660.u
25 patch -p 0 < $stuff/extra/readconfig.u
26 #patch -p 0 < $stuff/extra/fs.u
27 cp $stuff/tools/isohybrid.sh .
28 cp $stuff/extra/md5sum.c com32/modules
29 grep -q md5sum.c32 com32/modules/Makefile ||
30 sed -i 's/ifcpu64.c32/ifcpu64.c32 md5sum.c32/' com32/modules/Makefile
31 export LDFLAGS=''
32 make clean
33 echo "make all: LDFLAGS=$LDFLAGS"
34 make all 2>&1 | sed 's/NO_WERROR=1/NO_Werror=1/;/syslinux64.exe/d'
35 echo "make core: LDFLAGS=$LDFLAGS"
36 make -C core
37 make -C com32
38 ./isohybrid.sh --build
39 sed -i 's/loadkeys -m/loadkeys -u -m/' utils/keytab-lilo # for ru.kbd
40 mkdir kbd
41 for i in /usr/share/kbd/keymaps/i386/*/*.map.gz; do
42 [ "$(basename $(dirname $i))" == 'include' ] && continue
43 utils/keytab-lilo /usr/share/kbd/keymaps/i386/qwerty/us.map.gz \
44 $i > kbd/$(basename $i .map.gz)
45 done
46 cp -a $stuff/iso2exe .
47 make -C iso2exe
48 }
50 # Rules to gen a SliTaz package suitable for Tazpkg.
51 genpkg_rules()
52 {
53 mkdir -p $fs/boot/isolinux
54 cp -a $src/core/isolinux.bin $fs/boot/isolinux
55 lzma e $src/com32/modules/md5sum.c32 $fs/boot/isolinux/c32box.c32
56 lzma e $src/com32/menu/vesamenu.c32 $fs/boot/isolinux/vesamenu.c32
57 # $stuff/isolinux.msg is the old way the have a splash image.
58 cp $stuff/*.cfg $stuff/*.txt $stuff/help.* $stuff/opts.* $fs/boot/isolinux
59 rm -f $fs/boot/isolinux/common.cfg $fs/boot/isolinux/default.cfg
60 rm -f $fs/boot/isolinux/display.txt
61 while read label kbd loc menu; do
62 for i in ${kbd/,/ }; do
63 [ -e $src/kbd/$i ] || continue
64 cat >> $fs/boot/isolinux/i18n.cfg <<EOT
65 LABEL $label
66 MENU LABEL $menu
67 com32 c32box.c32
68 append kbdmap kbd $i lang=$loc kmap=${kbd#*,}
70 EOT
71 break
72 done
73 done <<EOT
74 br br-abnt2 pt_BR Brasil (abnt2)
75 br_ac\ brac us-acentos pt_BR Brasil (us-acentos)
76 cz cz-lat2 cs_CZ Cesky
77 dk dk-latin1 da_DK Dansk
78 de de-latin1 de_DE Deutsch
79 de_CH\ deCH de_CH-latin1 de_CH Deutsch Schweiz
80 gr gr el_GR Ellinika
81 en uk en_GB English UK
82 us us en_US English US
83 us_ac\ usac us-acentos en_US English US (acentos)
84 us_dv\ usdv dvorak en_US English US (dvorak)
85 us_dl\ usdl dvorak-l en_US English US (dvorak-l)
86 us_dr\ usdr dvorak-r en_US English US (dvorak-r)
87 es es es_ES Espanol
88 fr fr-latin1 fr_FR Francais
89 be be-latin1 fr_BE Francais Belgique
90 ca cf fr_CA Francais Canada
91 fr_CH\ frCH fr_CH-latin1 fr_CH Francais Suisse
92 cr hr,croat hr_HR Hrvatski
93 is is-latin1 is_IS Islenska
94 it it it_IT Italiano
95 hu hu hu_HU Magyar
96 nl nl2 nl_NL Nederlands
97 no\ nb no-latin1 nb_NO Norsk (Bokmal)
98 nn no-latin1 nn_NO Norsk (Nynorsk)
99 po pl2 pl_PL Polski
100 pt pt-latin1 pt_PT Portugues
101 ru ru ru_RU Russian
102 sl slovene sl_SI Slovenski
103 fi fi fi_FI Suomi
104 se se-lat6 sv_SE Svenska
105 tr trq tr_TR Turkce
106 EOT
108 cat >> $fs/boot/isolinux/i18n.cfg <<EOT
109 LABEL exit
110 MENU LABEL Back to main menu
112 MENU EXIT
113 MENU END
114 EOT
115 sed -i 's/^LABEL us$/&\n MENU DEFAULT/' $fs/boot/isolinux/i18n.cfg
116 chown root.root $src/kbd/*
117 touch -r $src $src/kbd/*
118 for kbd in $(cd $src/kbd; ls | tee ../kbd.l); do
119 msg="Invalid file kbd/$kbd"
120 [ -s $src/kbd/$kbd ] && msg="Unused: file kbd/$kbd" &&
121 grep -q " $kbd " $fs/boot/isolinux/i18n.cfg && continue
122 sed -i "/^$kbd\$/d" $src/kbd.l
123 echo "$msg"
124 done
125 ( cd $src/kbd; cat ../kbd.l | cpio -o -H newc ) >$fs/boot/isolinux/kbd
126 lzma e $fs/boot/isolinux/kbd $fs/boot/isolinux/kbd.lzma
127 mv -f $fs/boot/isolinux/kbd.lzma $fs/boot/isolinux/kbd
128 chown root.root $fs/boot/isolinux/*
129 }
131 # Pre and post install commands for Tazpkg.
132 post_install()
133 {
134 sed -i "/MENU TITLE SliTaz GNU\/Linux/ s| [0-9X]*$| $(date +%Y%m%d)|" \
135 "$1/boot/isolinux/isolinux.cfg"
136 }