wok-next rev 20848
syslinux: normalize receipt
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sat Jun 23 17:29:10 2018 +0300 (2018-06-23) |
parents | 98143c4f8950 |
children | d4757aca404e |
files | syslinux/receipt |
line diff
1.1 --- a/syslinux/receipt Sat Jun 23 14:21:02 2018 +0300 1.2 +++ b/syslinux/receipt Sat Jun 23 17:29:10 2018 +0300 1.3 @@ -6,34 +6,40 @@ 1.4 SHORT_DESC="LiveCD ISO bootloader (isolinux)" 1.5 MAINTAINER="pankso@slitaz.org" 1.6 LICENSE="GPL2" 1.7 +WEB_SITE="http://syslinux.zytor.com/" 1.8 + 1.9 TARBALL="$PACKAGE-$VERSION.tar.xz" 1.10 -WEB_SITE="http://syslinux.zytor.com/" 1.11 WGET_URL="https://www.kernel.org/pub/linux/utils/boot/syslinux/$TARBALL" 1.12 -LINLD="$WOK/linld/source" 1.13 -TAGS="boot" 1.14 1.15 -DEPENDS="ipxe memtest" 1.16 BUILD_DEPENDS="kbd-base perl nasm dev86 lzma mingw32-gcc upx posixovl \ 1.17 util-linux-uuid-dev advancecomp libidn linld python" 1.18 SPLIT="syslinux syslinux-extra syslinux-modules syslinux-tools" 1.19 1.20 -# Rules to gen a SliTaz package suitable for Tazpkg. 1.21 -compile_rules() 1.22 -{ 1.23 +COOKOPTS="skip-log-errors" 1.24 +LINLD="$WOK/linld/source" 1.25 + 1.26 +compile_rules() { 1.27 rm -f $src/core/isolinux.bin 1.28 cp -f $stuff/slitaz-next/miniacc.h $src/lzo/src/ # use latest https://raw.githubusercontent.com/upx/upx/master/src/miniacc.h 1.29 cp $stuff/tools/isohybrid.sh . 1.30 cp $stuff/extra/md5sum.c com32/modules 1.31 + 1.32 grep -q md5sum.c32 com32/modules/Makefile || 1.33 - sed -i 's/ifcpu64.c32/ifcpu64.c32 md5sum.c32/' com32/modules/Makefile 1.34 + sed -i 's/ifcpu64.c32/ifcpu64.c32 md5sum.c32/' com32/modules/Makefile 1.35 + 1.36 export LDFLAGS='' 1.37 make clean 1.38 + 1.39 echo "make all: LDFLAGS=$LDFLAGS" 1.40 - make all 2>&1 | sed 's/NO_WERROR=1/NO_Werror=1/;/syslinux64.exe/d' 1.41 + make all || return 1 1.42 + 1.43 echo "make core: LDFLAGS=$LDFLAGS" 1.44 - make -C core 1.45 - make -C com32 1.46 + make -C core || return 1 1.47 + 1.48 + make -C com32 || return 1 1.49 + 1.50 ./isohybrid.sh --build 1.51 + 1.52 sed -i 's/loadkeys -m/loadkeys -u -m/' utils/keytab-lilo # for ru.kbd 1.53 mkdir kbd 1.54 for i in /usr/share/kbd/keymaps/i386/*/*.map.gz; do 1.55 @@ -41,162 +47,180 @@ 1.56 utils/keytab-lilo /usr/share/kbd/keymaps/i386/qwerty/us.map.gz \ 1.57 $i > kbd/$(basename $i .map.gz) 1.58 done 1.59 + 1.60 cp -a $stuff/iso2exe . 1.61 cp $LINLD/*/tazboot.com iso2exe/boot.com 1.62 - make -C iso2exe 1.63 -} 1.64 + make -C iso2exe || return 1 1.65 1.66 -# Rules to gen a SliTaz package suitable for Tazpkg. 1.67 -genpkg_rules() 1.68 -{ 1.69 - case $PACKAGE in 1.70 - syslinux) 1.71 - CONFIG_FILES="/boot/isolinux/*.cfg /boot/isolinux/kbd" 1.72 - mkdir -p $fs/boot/isolinux $install/usr/share/doc 1.73 - cp $stuff/iso2exe/README* $install/usr/share/doc 1.74 - cp $stuff/iso2exe/init.custom $install/usr/share/doc 1.75 - cp $src/doc/*.txt $install/usr/share/doc 1.76 - cp -a $src/man $install/usr/share/ 1.77 - cp $LINLD/*/linld.com $fs/boot 1.78 - cp -a $src/core/isolinux.bin $fs/boot/isolinux 1.79 - lzma e $src/com32/modules/md5sum.c32 $fs/boot/isolinux/c32box.c32 1.80 - lzma e $src/com32/menu/vesamenu.c32 $fs/boot/isolinux/vesamenu.c32 1.81 - # $stuff/isolinux.msg is the old way the have a splash image. 1.82 - cp $stuff/*.cfg $stuff/*.txt $stuff/help.* $stuff/opts.* $fs/boot/isolinux 1.83 - rm -f $fs/boot/isolinux/common.cfg $fs/boot/isolinux/default.cfg 1.84 - rm -f $fs/boot/isolinux/display.txt 1.85 - while read label kbd loc tz menu; do 1.86 - for i in ${kbd/,/ }; do 1.87 - [ -e $src/kbd/$i ] || continue 1.88 - map=" $i" 1.89 - [ ${kbd#*,} == $i ] && map= 1.90 - cat >> $fs/boot/isolinux/i18n.cfg <<EOT 1.91 + # make install job: 1.92 + # ----------------- 1.93 + 1.94 + mkdir -p $install/boot/isolinux/ 1.95 + while read label kbd loc tz menu; do 1.96 + for i in ${kbd/,/ }; do 1.97 + [ -e $src/kbd/$i ] || continue 1.98 + map=" $i" 1.99 + [ ${kbd#*,} == $i ] && map= 1.100 + cat >> $install/boot/isolinux/i18n.cfg <<EOT 1.101 LABEL $label 1.102 MENU LABEL $menu 1.103 com32 c32box.c32 1.104 append kbd$map lang=$loc kmap=${kbd#*,} tz=$tz 1.105 1.106 EOT 1.107 - break 1.108 - done 1.109 - done <<EOT 1.110 -br br-abnt2 pt_BR America/Sao_Paulo Brasil (abnt2) 1.111 -br_ac\ brac us-acentos pt_BR America/Sao_Paulo Brasil (us-acentos) 1.112 -cz cz-lat2 cs_CZ Europe/Prague Cesky 1.113 -dk dk-latin1 da_DK Europe/Copenhagen Dansk 1.114 -de de-latin1 de_DE Europe/Berlin Deutsch 1.115 -de_CH\ deCH de_CH-latin1 de_CH Europe/Zurich Deutsch Schweiz 1.116 -gr gr el_GR Europe/Helsinki Ellinika 1.117 -en uk en_GB Europe/London English UK 1.118 -us us en_US America/New_York English US 1.119 -us_ac\ usac us-acentos en_US America/New_York English US (acentos) 1.120 -us_dv\ usdv dvorak en_US America/New_York English US (dvorak) 1.121 -us_dl\ usdl dvorak-l en_US America/New_York English US (dvorak-l) 1.122 -us_dr\ usdr dvorak-r en_US America/New_York English US (dvorak-r) 1.123 -es es es_ES Europe/Madrid Espanol 1.124 -fr fr-latin1 fr_FR Europe/Paris Francais 1.125 -be be-latin1 fr_BE Europe/Brussels Francais Belgique 1.126 -ca cf fr_CA America/Montreal Francais Canada 1.127 -fr_CH\ frCH fr_CH-latin1 fr_CH Europe/Zurich Francais Suisse 1.128 -cr hr,croat hr_HR Europe/Zagreb Hrvatski 1.129 -is is-latin1 is_IS Atlantic/Reykjavik Islenska 1.130 -it it it_IT Europe/Rome Italiano 1.131 -hu hu hu_HU Europe/Budapest Magyar 1.132 -nl nl2 nl_NL Europe/Amsterdam Nederlands 1.133 -no\ nb no-latin1 nb_NO Europe/Oslo Norsk (Bokmal) 1.134 -nn no-latin1 nn_NO Europe/Oslo Norsk (Nynorsk) 1.135 -po pl2 pl_PL Europe/Warsaw Polski 1.136 -pt pt-latin1 pt_PT Europe/Lisbon Portugues 1.137 -ru ru ru_RU Europe/Moscow Russian 1.138 -ru_uk\ uk ru ru_UA Europe/Kiev Russian Ukraine 1.139 -sl slovene sl_SI Europe/Ljubljana Slovenski 1.140 -fi fi fi_FI Europe/Helsinki Suomi 1.141 -se se-lat6 sv_SE Europe/Stockholm Svenska 1.142 -tr trq tr_TR Asia/Istanbul Turkce 1.143 + break 1.144 + done 1.145 + done <<EOT 1.146 +br br-abnt2 pt_BR America/Sao_Paulo Brasil (abnt2) 1.147 +br_ac\ brac us-acentos pt_BR America/Sao_Paulo Brasil (us-acentos) 1.148 +cz cz-lat2 cs_CZ Europe/Prague Cesky 1.149 +dk dk-latin1 da_DK Europe/Copenhagen Dansk 1.150 +de de-latin1 de_DE Europe/Berlin Deutsch 1.151 +de_CH\ deCH de_CH-latin1 de_CH Europe/Zurich Deutsch Schweiz 1.152 +gr gr el_GR Europe/Helsinki Ellinika 1.153 +en uk en_GB Europe/London English UK 1.154 +us us en_US America/New_York English US 1.155 +us_ac\ usac us-acentos en_US America/New_York English US (acentos) 1.156 +us_dv\ usdv dvorak en_US America/New_York English US (dvorak) 1.157 +us_dl\ usdl dvorak-l en_US America/New_York English US (dvorak-l) 1.158 +us_dr\ usdr dvorak-r en_US America/New_York English US (dvorak-r) 1.159 +es es es_ES Europe/Madrid Espanol 1.160 +fr fr-latin1 fr_FR Europe/Paris Francais 1.161 +be be-latin1 fr_BE Europe/Brussels Francais Belgique 1.162 +ca cf fr_CA America/Montreal Francais Canada 1.163 +fr_CH\ frCH fr_CH-latin1 fr_CH Europe/Zurich Francais Suisse 1.164 +cr hr,croat hr_HR Europe/Zagreb Hrvatski 1.165 +is is-latin1 is_IS Atlantic/Reykjavik Islenska 1.166 +it it it_IT Europe/Rome Italiano 1.167 +hu hu hu_HU Europe/Budapest Magyar 1.168 +nl nl2 nl_NL Europe/Amsterdam Nederlands 1.169 +no\ nb no-latin1 nb_NO Europe/Oslo Norsk (Bokmal) 1.170 +nn no-latin1 nn_NO Europe/Oslo Norsk (Nynorsk) 1.171 +po pl2 pl_PL Europe/Warsaw Polski 1.172 +pt pt-latin1 pt_PT Europe/Lisbon Portugues 1.173 +ru ru ru_RU Europe/Moscow Russian 1.174 +ru_uk\ uk ru ru_UA Europe/Kiev Russian Ukraine 1.175 +sl slovene sl_SI Europe/Ljubljana Slovenski 1.176 +fi fi fi_FI Europe/Helsinki Suomi 1.177 +se se-lat6 sv_SE Europe/Stockholm Svenska 1.178 +tr trq tr_TR Asia/Istanbul Turkce 1.179 EOT 1.180 -#hr croat hr_HR Europe/Zagreb Hrvatski 1.181 -#grpc gr-pc el_GR Europe/Helsinki Ellinika 1.182 -#jp jp106 ja_JP Asia/Tokyo Japanese 1.183 -#sg sg-latin1 de_CH Europe/Zurich Deutsch Schweiz (sg) 1.184 -#tr5 tr_q-latin5 tr_TR Asia/Istanbul Turkce (latin5) 1.185 +#hr croat hr_HR Europe/Zagreb Hrvatski 1.186 +#grpc gr-pc el_GR Europe/Helsinki Ellinika 1.187 +#jp jp106 ja_JP Asia/Tokyo Japanese 1.188 +#sg sg-latin1 de_CH Europe/Zurich Deutsch Schweiz (sg) 1.189 +#tr5 tr_q-latin5 tr_TR Asia/Istanbul Turkce (latin5) 1.190 1.191 - cat >> $fs/boot/isolinux/i18n.cfg <<EOT 1.192 + cat >> $install/boot/isolinux/i18n.cfg <<EOT 1.193 LABEL exit 1.194 MENU LABEL Back to main menu 1.195 1.196 MENU EXIT 1.197 MENU END 1.198 EOT 1.199 - sed -i 's/^LABEL us$/&\n MENU DEFAULT/' $fs/boot/isolinux/i18n.cfg 1.200 - chown root.root $src/kbd/* 1.201 - touch -r $src $src/kbd/* 1.202 - for kbd in $(cd $src/kbd; ls | tee ../kbd.l); do 1.203 - msg="Invalid file kbd/$kbd" 1.204 - [ -s $src/kbd/$kbd ] && msg="Unused: file kbd/$kbd" && 1.205 - grep -q "[= ]$kbd " $fs/boot/isolinux/i18n.cfg && continue 1.206 - sed -i "/^$kbd\$/d" $src/kbd.l 1.207 - echo "$msg" 1.208 - done 1.209 - ( cd $src/kbd; cat ../kbd.l | cpio -o -H newc ) >$fs/boot/isolinux/kbd 1.210 - lzma e $fs/boot/isolinux/kbd $fs/boot/isolinux/kbd.lzma 1.211 - mv -f $fs/boot/isolinux/kbd.lzma $fs/boot/isolinux/kbd 1.212 - chown root.root $fs/boot/isolinux/* 1.213 - ;; 1.214 - syslinux-extra) 1.215 - CAT="system-tools|MBR/FAT/EXT3/PXE bootloader files" 1.216 - DEPENDS="syslinux posixovl" 1.217 - mkdir -p $fs/usr/share/boot $fs/usr/bin $fs/bin 1.218 - lzma e $src/memdisk/memdisk $fs/usr/share/boot/memdisk.lzma 2> /dev/null 1.219 - cp -a $src/mbr/mbr.bin $fs/usr/share/boot 1.220 - cp -a $src/mbr/gptmbr.bin $fs/usr/share/boot 1.221 - lzma e $src/core/pxelinux.0 $fs/usr/share/boot/pxelinux.0.lzma 2> /dev/null 1.222 - #lzma e $src/com32/menu/vesamenu.c32 $fs/usr/share/boot/vesamenu.c32 1.223 - #lzma e $src/com32/modules/mboot.c32 $fs/usr/share/boot/mboot.c32 1.224 - lzma e $src/com32/modules/sdi.c32 $fs/usr/share/boot/sdi.c32 1.225 - cp -a $src/linux/syslinux-nomtools $fs/bin/syslinux 1.226 - cp -a $src/extlinux/extlinux $fs/bin 1.227 - cp -a $src/isohybrid.sh $fs/usr/bin/isohybrid 1.228 - cp -a $src/iso2exe/iso2exe $fs/usr/bin/iso2exe 1.229 - cp -a $src/iso2exe/taziso $fs/usr/bin 1.230 - cp -a $src/iso2exe/README.custom $fs/usr/share/boot 1.231 - cp -a $src/iso2exe/init.custom $fs/usr/share/boot 1.232 - chown root.root $fs/usr/share/boot/* $fs/bin/* $fs/usr/bin/* 1.233 - ;; 1.234 - syslinux-modules) 1.235 - CAT="system-tools|modules for syslinux" 1.236 - mkdir -p $fs/usr/share/boot 1.237 - for i in $src/com32/*/*.c32 ; do 1.238 - case "$i" in 1.239 + sed -i 's/^LABEL us$/&\n MENU DEFAULT/' $install/boot/isolinux/i18n.cfg 1.240 + 1.241 + chown root:root $src/kbd/* 1.242 + touch -r $src $src/kbd/* 1.243 + for kbd in $(cd $src/kbd; ls | tee ../kbd.l); do 1.244 + msg="Invalid file kbd/$kbd" 1.245 + [ -s $src/kbd/$kbd ] && msg="Unused: file kbd/$kbd" && 1.246 + grep -q "[= ]$kbd " $install/boot/isolinux/i18n.cfg && continue 1.247 + sed -i "/^$kbd\$/d" $src/kbd.l 1.248 + echo "$msg" 1.249 + done 1.250 + ( cd $src/kbd; cat ../kbd.l | cpio -o -H newc ) >$install/boot/isolinux/kbd 1.251 + lzma e $install/boot/isolinux/kbd $install/boot/isolinux/kbd.lzma 1.252 + mv -f $install/boot/isolinux/kbd.lzma $install/boot/isolinux/kbd 1.253 + 1.254 + 1.255 + # (look from where each file appears, in alphabetical order) 1.256 + 1.257 + install -Dm755 linux/syslinux-nomtools $install/bin/syslinux 1.258 + install -Dm755 extlinux/extlinux $install/bin/extlinux 1.259 + 1.260 + mkdir -p $install/boot/isolinux/ 1.261 + lzma e com32/modules/md5sum.c32 $install/boot/isolinux/c32box.c32 1.262 + install -Dm644 $stuff/help.en $install/boot/isolinux/help.en 1.263 + install -Dm644 $stuff/help.fr $install/boot/isolinux/help.fr 1.264 + # see above for $install/boot/isolinux/i18n.cfg 1.265 + install -Dm755 core/isolinux.bin $install/boot/isolinux/isolinux.bin 1.266 + install -Dm644 $stuff/isolinux.cfg $install/boot/isolinux/isolinux.cfg 1.267 + # see above for $install/boot/isolinux/kbd 1.268 + install -Dm644 $stuff/opts.en $install/boot/isolinux/opts.en 1.269 + install -Dm644 $stuff/opts.fr $install/boot/isolinux/opts.fr 1.270 + lzma e com32/menu/vesamenu.c32 $install/boot/isolinux/vesamenu.c32 1.271 + install -Dm755 $LINLD/*/linld.com $install/boot/linld.com 1.272 + 1.273 + install -Dm755 iso2exe/iso2exe $install/usr/bin/iso2exe 1.274 + install -Dm755 isohybrid.sh $install/usr/bin/isohybrid 1.275 + install -Dm755 utils/isohybrid $install/usr/bin/isohybrid.bin 1.276 + install -Dm755 utils/keytab-lilo $install/usr/bin/keytab-lilo 1.277 + install -Dm755 utils/lss16toppm $install/usr/bin/lss16toppm 1.278 + install -Dm755 utils/mkdiskimage $install/usr/bin/mkdiskimage 1.279 + install -Dm755 utils/ppmtolss16 $install/usr/bin/ppmtolss16 1.280 + install -Dm755 utils/syslinux2ansi $install/usr/bin/syslinux2ansi 1.281 + install -Dm755 iso2exe/taziso $install/usr/bin/taziso 1.282 + 1.283 + mkdir -p $install/usr/share/boot/ 1.284 + for i in com32/*/*.c32; do 1.285 + case "$i" in 1.286 */reboot.c32|*/ifmem.c32|*/vesamenu.c32) continue;; 1.287 - esac 1.288 - lzma e $i $fs/usr/share/boot/$(basename $i) 2> /dev/null 1.289 - done 1.290 - for i in $src/modules/*.com ; do 1.291 - case "$i" in 1.292 + esac 1.293 + lzma e $i $install/usr/share/boot/$(basename $i) 2>/dev/null 1.294 + done 1.295 + for i in modules/*.com; do 1.296 + case "$i" in 1.297 */poweroff.com) continue;; 1.298 - esac 1.299 - cp $i $fs/usr/share/boot/$(basename $i) 2> /dev/null 1.300 - done 1.301 - ;; 1.302 - syslinux-tools) 1.303 - CAT="system-tools|Misc perl tools" 1.304 - DEPENDS="perl" 1.305 - mkdir -p $fs/usr/bin $fs/usr/share/boot 1.306 - for i in keytab-lilo lss16toppm ppmtolss16 mkdiskimage \ 1.307 - syslinux2ansi isohybrid ; do 1.308 - cp -a $src/utils/$i $fs/usr/bin 1.309 - done 1.310 - cp -a $src/iso2exe/isohybrid.exe $fs/usr/share/boot 1.311 - cp -a $src/iso2exe/meminfo.exe $fs/usr/share/boot 1.312 - cp -a $src/iso2exe/tazboot.exe $fs/usr/share/boot 1.313 - find $fs/usr -exec chown root.root {} \; 1.314 - ;; 1.315 - esac 1.316 + esac 1.317 + cp $i $install/usr/share/boot/$(basename $i) 2>/dev/null 1.318 + done 1.319 + install -Dm644 mbr/gptmbr.bin $install/usr/share/boot/gptmbr.bin 1.320 + install -Dm644 iso2exe/init.custom $install/usr/share/boot/init.custom 1.321 + install -Dm755 iso2exe/isohybrid.exe $install/usr/share/boot/isohybrid.exe 1.322 + install -Dm644 mbr/mbr.bin $install/usr/share/boot/mbr.bin 1.323 + lzma e memdisk/memdisk $install/usr/share/boot/memdisk.lzma 2>/dev/null 1.324 + install -Dm755 iso2exe/meminfo.exe $install/usr/share/boot/meminfo.exe 1.325 + lzma e core/pxelinux.0 $install/usr/share/boot/pxelinux.0.lzma 2>/dev/null 1.326 + install -Dm644 iso2exe/README.custom $install/usr/share/boot/README.custom 1.327 + install -Dm755 iso2exe/tazboot.exe $install/usr/share/boot/tazboot.exe 1.328 + 1.329 + cook_pick_docs doc/*.txt $stuff/iso2exe/README* $stuff/iso2exe/init.custom 1.330 + cook_pick_manpages man/* 1.331 + 1.332 + chown root:root $install 1.333 } 1.334 1.335 -# Pre and post install commands for Tazpkg. 1.336 -post_install_syslinux() 1.337 -{ 1.338 +genpkg_rules() { 1.339 + case $PACKAGE in 1.340 + syslinux) 1.341 + copy boot/isolinux/ /boot/linld.com 1.342 + CONFIG_FILES="/boot/isolinux/*.cfg /boot/isolinux/kbd" 1.343 + DEPENDS="ipxe memtest" 1.344 + ;; 1.345 + syslinux-extra) 1.346 + copy extlinux syslinux iso2exe isohybrid taziso gptmbr.bin \ 1.347 + init.custom mbr.bin memdisk.lzma pxelinux.0.lzma README.custom \ 1.348 + sdi.c32 1.349 + CAT="system-tools|MBR/FAT/EXT3/PXE bootloader files" 1.350 + DEPENDS="syslinux posixovl" 1.351 + ;; 1.352 + syslinux-modules) 1.353 + copy *.c32 *.com 1.354 + rm $install/boot/linld.com 1.355 + CAT="system-tools|modules for syslinux" 1.356 + ;; 1.357 + syslinux-tools) 1.358 + copy *.exe isohybrid.bin keytab-lilo lss16toppm mkdiskimage \ 1.359 + ppmtolss16 syslinux2ansi 1.360 + CAT="system-tools|misc Perl tools" 1.361 + DEPENDS="perl" 1.362 + ;; 1.363 + esac 1.364 + TAGS="boot" 1.365 +} 1.366 + 1.367 +post_install_syslinux() { 1.368 sed -i "/MENU TITLE SliTaz GNU\/Linux/ s| [0-9X]*$| $(date +%Y%m%d)|" \ 1.369 "$1/boot/isolinux/isolinux.cfg" 1.370 sed '/MENU TITLE/!d;s/MENU TITLE //' > $1/etc/slitaz-version \