wok-next view syslinux/receipt @ rev 21303
updated gujin (2.8.6 -> 2.8.7)
author | Hans-G?nter Theisgen |
---|---|
date | Tue Dec 10 07:57:29 2019 +0100 (2019-12-10) |
parents | e19ff076dc63 |
children |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="syslinux"
4 VERSION="4.06"
5 CATEGORY="base-system"
6 SHORT_DESC="LiveCD ISO bootloader (isolinux)"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="https://www.syslinux.org/wiki/index.php?title=The_Syslinux_Project"
11 TARBALL="$PACKAGE-$VERSION.tar.xz"
12 WGET_URL="https://www.kernel.org/pub/linux/utils/boot/syslinux/$TARBALL"
14 BUILD_DEPENDS="kbd-base perl nasm dev86 lzma mingw32-gcc upx posixovl \
15 util-linux-uuid-dev advancecomp libidn linld python"
16 SPLIT="$PACKAGE-extra $PACKAGE-modules $PACKAGE-tools"
18 COOKOPTS="skip-log-errors"
19 LINLD="$WOK/linld/source"
21 compile_rules() {
22 rm -f $src/core/isolinux.bin
23 cp -f $stuff/slitaz-next/miniacc.h $src/lzo/src/ # use latest https://raw.githubusercontent.com/upx/upx/master/src/miniacc.h
24 cp $stuff/tools/isohybrid.sh .
25 cp $stuff/extra/md5sum.c com32/modules
27 grep -q md5sum.c32 com32/modules/Makefile ||
28 sed -i 's/ifcpu64.c32/ifcpu64.c32 md5sum.c32/' com32/modules/Makefile
30 export LDFLAGS=''
31 make clean
33 echo "make all: LDFLAGS=$LDFLAGS"
34 make all || return 1
36 echo "make core: LDFLAGS=$LDFLAGS"
37 make -C core || return 1
39 make -C com32 || return 1
41 ./isohybrid.sh --build
43 sed -i 's/loadkeys -m/loadkeys -u -m/' utils/keytab-lilo # for ru.kbd
44 mkdir kbd
45 for i in /usr/share/kbd/keymaps/i386/*/*.map.gz; do
46 [ "$(basename $(dirname $i))" == 'include' ] && continue
47 utils/keytab-lilo /usr/share/kbd/keymaps/i386/qwerty/us.map.gz \
48 $i > kbd/$(basename $i .map.gz)
49 done
51 cp -a $stuff/iso2exe .
52 cp $LINLD/*/tazboot.com iso2exe/boot.com
53 make -C iso2exe || return 1
55 # make install job:
56 # -----------------
58 mkdir -p $install/boot/isolinux/
59 while read label kbd loc tz menu; do
60 for i in ${kbd/,/ }; do
61 [ -e $src/kbd/$i ] || continue
62 map=" $i"
63 [ ${kbd#*,} == $i ] && map=
64 cat >> $install/boot/isolinux/i18n.cfg <<EOT
65 LABEL $label
66 MENU LABEL $menu
67 com32 c32box.c32
68 append kbd$map lang=$loc kmap=${kbd#*,} tz=$tz
70 EOT
71 break
72 done
73 done <<EOT
74 br br-abnt2 pt_BR America/Sao_Paulo Brasil (abnt2)
75 br_ac\ brac us-acentos pt_BR America/Sao_Paulo Brasil (us-acentos)
76 cz cz-lat2 cs_CZ Europe/Prague Cesky
77 dk dk-latin1 da_DK Europe/Copenhagen Dansk
78 de de-latin1 de_DE Europe/Berlin Deutsch
79 de_CH\ deCH de_CH-latin1 de_CH Europe/Zurich Deutsch Schweiz
80 gr gr el_GR Europe/Helsinki Ellinika
81 en uk en_GB Europe/London English UK
82 us us en_US America/New_York English US
83 us_ac\ usac us-acentos en_US America/New_York English US (acentos)
84 us_dv\ usdv dvorak en_US America/New_York English US (dvorak)
85 us_dl\ usdl dvorak-l en_US America/New_York English US (dvorak-l)
86 us_dr\ usdr dvorak-r en_US America/New_York English US (dvorak-r)
87 es es es_ES Europe/Madrid Espanol
88 fr fr-latin1 fr_FR Europe/Paris Francais
89 be be-latin1 fr_BE Europe/Brussels Francais Belgique
90 ca cf fr_CA America/Montreal Francais Canada
91 fr_CH\ frCH fr_CH-latin1 fr_CH Europe/Zurich Francais Suisse
92 cr hr,croat hr_HR Europe/Zagreb Hrvatski
93 is is-latin1 is_IS Atlantic/Reykjavik Islenska
94 it it it_IT Europe/Rome Italiano
95 hu hu hu_HU Europe/Budapest Magyar
96 nl nl2 nl_NL Europe/Amsterdam Nederlands
97 no\ nb no-latin1 nb_NO Europe/Oslo Norsk (Bokmal)
98 nn no-latin1 nn_NO Europe/Oslo Norsk (Nynorsk)
99 po pl2 pl_PL Europe/Warsaw Polski
100 pt pt-latin1 pt_PT Europe/Lisbon Portugues
101 ru ru ru_RU Europe/Moscow Russian
102 ru_uk\ uk ru ru_UA Europe/Kiev Russian Ukraine
103 sl slovene sl_SI Europe/Ljubljana Slovenski
104 fi fi fi_FI Europe/Helsinki Suomi
105 se se-lat6 sv_SE Europe/Stockholm Svenska
106 tr trq tr_TR Asia/Istanbul Turkce
107 EOT
108 #hr croat hr_HR Europe/Zagreb Hrvatski
109 #grpc gr-pc el_GR Europe/Helsinki Ellinika
110 #jp jp106 ja_JP Asia/Tokyo Japanese
111 #sg sg-latin1 de_CH Europe/Zurich Deutsch Schweiz (sg)
112 #tr5 tr_q-latin5 tr_TR Asia/Istanbul Turkce (latin5)
114 cat >> $install/boot/isolinux/i18n.cfg <<EOT
115 LABEL exit
116 MENU LABEL Back to main menu
118 MENU EXIT
119 MENU END
120 EOT
121 sed -i 's/^LABEL us$/&\n MENU DEFAULT/' $install/boot/isolinux/i18n.cfg
123 chown root:root $src/kbd/*
124 touch -r $src $src/kbd/*
125 for kbd in $(cd $src/kbd; ls | tee ../kbd.l); do
126 msg="Invalid file kbd/$kbd"
127 [ -s $src/kbd/$kbd ] && msg="Unused: file kbd/$kbd" &&
128 grep -q "[= ]$kbd " $install/boot/isolinux/i18n.cfg && continue
129 sed -i "/^$kbd\$/d" $src/kbd.l
130 echo "$msg"
131 done
132 ( cd $src/kbd; cat ../kbd.l | cpio -o -H newc ) >$install/boot/isolinux/kbd
133 lzma e $install/boot/isolinux/kbd $install/boot/isolinux/kbd.lzma
134 mv -f $install/boot/isolinux/kbd.lzma $install/boot/isolinux/kbd
137 # (look from where each file appears, in alphabetical order)
139 install -Dm755 linux/syslinux-nomtools $install/bin/syslinux
140 install -Dm755 extlinux/extlinux $install/bin/extlinux
142 mkdir -p $install/boot/isolinux/
143 lzma e com32/modules/md5sum.c32 $install/boot/isolinux/c32box.c32
144 install -Dm644 $stuff/help.en $install/boot/isolinux/help.en
145 install -Dm644 $stuff/help.fr $install/boot/isolinux/help.fr
146 # see above for $install/boot/isolinux/i18n.cfg
147 install -Dm755 core/isolinux.bin $install/boot/isolinux/isolinux.bin
148 install -Dm644 $stuff/isolinux.cfg $install/boot/isolinux/isolinux.cfg
149 # see above for $install/boot/isolinux/kbd
150 install -Dm644 $stuff/opts.en $install/boot/isolinux/opts.en
151 install -Dm644 $stuff/opts.fr $install/boot/isolinux/opts.fr
152 lzma e com32/menu/vesamenu.c32 $install/boot/isolinux/vesamenu.c32
153 install -Dm755 $LINLD/*/linld.com $install/boot/linld.com
155 install -Dm755 iso2exe/iso2exe $install/usr/bin/iso2exe
156 install -Dm755 isohybrid.sh $install/usr/bin/isohybrid
157 install -Dm755 utils/isohybrid $install/usr/bin/isohybrid.bin
158 install -Dm755 utils/keytab-lilo $install/usr/bin/keytab-lilo
159 install -Dm755 utils/lss16toppm $install/usr/bin/lss16toppm
160 install -Dm755 utils/mkdiskimage $install/usr/bin/mkdiskimage
161 install -Dm755 utils/ppmtolss16 $install/usr/bin/ppmtolss16
162 install -Dm755 utils/syslinux2ansi $install/usr/bin/syslinux2ansi
163 install -Dm755 iso2exe/taziso $install/usr/bin/taziso
165 mkdir -p $install/usr/share/boot/
166 for i in com32/*/*.c32; do
167 case "$i" in
168 */reboot.c32|*/ifmem.c32|*/vesamenu.c32) continue;;
169 esac
170 lzma e $i $install/usr/share/boot/$(basename $i) 2>/dev/null
171 done
172 for i in modules/*.com; do
173 case "$i" in
174 */poweroff.com) continue;;
175 esac
176 cp $i $install/usr/share/boot/$(basename $i) 2>/dev/null
177 done
178 install -Dm644 mbr/gptmbr.bin $install/usr/share/boot/gptmbr.bin
179 install -Dm755 iso2exe/init.custom $install/usr/share/boot/init.custom
180 install -Dm755 iso2exe/isohybrid.exe $install/usr/share/boot/isohybrid.exe
181 install -Dm644 mbr/mbr.bin $install/usr/share/boot/mbr.bin
182 lzma e memdisk/memdisk $install/usr/share/boot/memdisk.lzma 2>/dev/null
183 install -Dm755 iso2exe/meminfo.exe $install/usr/share/boot/meminfo.exe
184 lzma e core/pxelinux.0 $install/usr/share/boot/pxelinux.0.lzma 2>/dev/null
185 install -Dm644 iso2exe/README.custom $install/usr/share/boot/README.custom
186 install -Dm755 iso2exe/tazboot.exe $install/usr/share/boot/tazboot.exe
188 cook_pick_docs doc/*.txt $stuff/iso2exe/README* $stuff/iso2exe/init.custom
189 cook_pick_manpages man/*
191 chown root:root $install
192 }
194 genpkg_rules() {
195 case $PACKAGE in
196 syslinux)
197 copy boot/isolinux/ boot/linld.com
198 CONFIG_FILES="/boot/isolinux/i18n.cfg /boot/isolinux/isolinux.cfg \
199 /boot/isolinux/kbd"
200 DEPENDS="ipxe memtest"
201 ;;
202 syslinux-extra)
203 copy extlinux syslinux iso2exe isohybrid taziso gptmbr.bin \
204 init.custom mbr.bin memdisk.lzma pxelinux.0.lzma README.custom \
205 sdi.c32
206 rm -r $fs/usr/share/doc/ # README.custom & init.custom here too
207 CAT="system-tools|MBR/FAT/EXT3/PXE bootloader files"
208 DEPENDS="syslinux posixovl"
209 ;;
210 syslinux-modules)
211 copy share/boot/*.c32 share/boot/*.com
212 CAT="system-tools|modules for syslinux"
213 ;;
214 syslinux-tools)
215 copy *.exe isohybrid.bin keytab-lilo lss16toppm mkdiskimage \
216 ppmtolss16 syslinux2ansi
217 CAT="system-tools|misc Perl tools"
218 DEPENDS="perl"
219 ;;
220 esac
221 TAGS="boot"
222 }
224 post_install_syslinux() {
225 sed -i "/MENU TITLE SliTaz GNU\/Linux/ s| [0-9X]*$| $(date +%Y%m%d)|" \
226 "$1/boot/isolinux/isolinux.cfg"
227 sed '/MENU TITLE/!d;s/MENU TITLE //' > $1/etc/slitaz-version \
228 < "$1/boot/isolinux/isolinux.cfg"
229 }