wok-next annotate syslinux/receipt @ rev 20775
quodlibet: remove non-existent package from bdeps
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Wed Jun 06 20:44:57 2018 +0300 (2018-06-06) |
parents | db21b68f7891 |
children | 77e1b313c637 |
rev | line source |
---|---|
pascal@20153 | 1 # SliTaz package receipt v2. |
pankso@4 | 2 |
pankso@4 | 3 PACKAGE="syslinux" |
pascal@13546 | 4 VERSION="4.06" |
pankso@4 | 5 CATEGORY="base-system" |
pankso@4 | 6 SHORT_DESC="LiveCD ISO bootloader (isolinux)" |
pankso@4 | 7 MAINTAINER="pankso@slitaz.org" |
pascal@14658 | 8 LICENSE="GPL2" |
pascal@11579 | 9 TARBALL="$PACKAGE-$VERSION.tar.xz" |
pankso@4 | 10 WEB_SITE="http://syslinux.zytor.com/" |
pascal@17923 | 11 WGET_URL="https://www.kernel.org/pub/linux/utils/boot/syslinux/$TARBALL" |
pascal@19516 | 12 LINLD="$WOK/linld/source" |
al@18471 | 13 TAGS="boot" |
pascal@17157 | 14 |
pascal@15369 | 15 DEPENDS="ipxe memtest" |
al@19664 | 16 BUILD_DEPENDS="kbd-base perl nasm dev86 lzma mingw32-gcc upx posixovl \ |
al@19664 | 17 util-linux-uuid-dev advancecomp libidn linld python" |
pascal@20153 | 18 SPLIT="syslinux syslinux-extra syslinux-modules syslinux-tools" |
pascal@786 | 19 |
pascal@786 | 20 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@786 | 21 compile_rules() |
pascal@786 | 22 { |
al@18471 | 23 rm -f $src/core/isolinux.bin |
al@19664 | 24 cp -f $stuff/slitaz-next/miniacc.h $src/lzo/src/ # use latest https://raw.githubusercontent.com/upx/upx/master/src/miniacc.h |
al@18471 | 25 cp $stuff/tools/isohybrid.sh . |
al@18471 | 26 cp $stuff/extra/md5sum.c com32/modules |
al@18471 | 27 grep -q md5sum.c32 com32/modules/Makefile || |
al@18471 | 28 sed -i 's/ifcpu64.c32/ifcpu64.c32 md5sum.c32/' com32/modules/Makefile |
al@18471 | 29 export LDFLAGS='' |
al@18471 | 30 make clean |
al@18471 | 31 echo "make all: LDFLAGS=$LDFLAGS" |
al@18471 | 32 make all 2>&1 | sed 's/NO_WERROR=1/NO_Werror=1/;/syslinux64.exe/d' |
al@18471 | 33 echo "make core: LDFLAGS=$LDFLAGS" |
al@18471 | 34 make -C core |
al@18471 | 35 make -C com32 |
al@18471 | 36 ./isohybrid.sh --build |
al@18471 | 37 sed -i 's/loadkeys -m/loadkeys -u -m/' utils/keytab-lilo # for ru.kbd |
pascal@18754 | 38 mkdir kbd |
al@18471 | 39 for i in /usr/share/kbd/keymaps/i386/*/*.map.gz; do |
al@18471 | 40 [ "$(basename $(dirname $i))" == 'include' ] && continue |
pascal@18754 | 41 utils/keytab-lilo /usr/share/kbd/keymaps/i386/qwerty/us.map.gz \ |
pascal@18754 | 42 $i > kbd/$(basename $i .map.gz) |
al@18471 | 43 done |
al@18471 | 44 cp -a $stuff/iso2exe . |
pascal@19516 | 45 cp $LINLD/*/tazboot.com iso2exe/boot.com |
al@18471 | 46 make -C iso2exe |
pascal@786 | 47 } |
pankso@4 | 48 |
pankso@4 | 49 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@4 | 50 genpkg_rules() |
pankso@4 | 51 { |
pascal@20153 | 52 case $PACKAGE in |
pascal@20153 | 53 syslinux) |
pascal@20153 | 54 CONFIG_FILES="/boot/isolinux/*.cfg /boot/isolinux/kbd" |
pascal@20153 | 55 mkdir -p $fs/boot/isolinux $install/usr/share/doc |
pascal@20153 | 56 cp $stuff/iso2exe/README* $install/usr/share/doc |
pascal@20153 | 57 cp $stuff/iso2exe/init.custom $install/usr/share/doc |
pascal@20197 | 58 cp $src/doc/*.txt $install/usr/share/doc |
pascal@20197 | 59 cp -a $src/man $install/usr/share/ |
pascal@20153 | 60 cp $LINLD/*/linld.com $fs/boot |
pascal@20153 | 61 cp -a $src/core/isolinux.bin $fs/boot/isolinux |
pascal@20153 | 62 lzma e $src/com32/modules/md5sum.c32 $fs/boot/isolinux/c32box.c32 |
pascal@20153 | 63 lzma e $src/com32/menu/vesamenu.c32 $fs/boot/isolinux/vesamenu.c32 |
pascal@20153 | 64 # $stuff/isolinux.msg is the old way the have a splash image. |
pascal@20153 | 65 cp $stuff/*.cfg $stuff/*.txt $stuff/help.* $stuff/opts.* $fs/boot/isolinux |
pascal@20153 | 66 rm -f $fs/boot/isolinux/common.cfg $fs/boot/isolinux/default.cfg |
pascal@20153 | 67 rm -f $fs/boot/isolinux/display.txt |
pascal@20153 | 68 while read label kbd loc tz menu; do |
pascal@20153 | 69 for i in ${kbd/,/ }; do |
pascal@20153 | 70 [ -e $src/kbd/$i ] || continue |
pascal@20197 | 71 map=" $i" |
pascal@20197 | 72 [ ${kbd#*,} == $i ] && map= |
pascal@20153 | 73 cat >> $fs/boot/isolinux/i18n.cfg <<EOT |
pascal@12287 | 74 LABEL $label |
pascal@12287 | 75 MENU LABEL $menu |
pascal@12287 | 76 com32 c32box.c32 |
pascal@20197 | 77 append kbd$map lang=$loc kmap=${kbd#*,} tz=$tz |
pascal@18754 | 78 |
pascal@1721 | 79 EOT |
pascal@20153 | 80 break |
pascal@20153 | 81 done |
pascal@20153 | 82 done <<EOT |
pascal@18783 | 83 br br-abnt2 pt_BR America/Sao_Paulo Brasil (abnt2) |
pascal@18783 | 84 br_ac\ brac us-acentos pt_BR America/Sao_Paulo Brasil (us-acentos) |
pascal@18783 | 85 cz cz-lat2 cs_CZ Europe/Prague Cesky |
pascal@18783 | 86 dk dk-latin1 da_DK Europe/Copenhagen Dansk |
pascal@18783 | 87 de de-latin1 de_DE Europe/Berlin Deutsch |
pascal@18783 | 88 de_CH\ deCH de_CH-latin1 de_CH Europe/Zurich Deutsch Schweiz |
pascal@18783 | 89 gr gr el_GR Europe/Helsinki Ellinika |
pascal@18783 | 90 en uk en_GB Europe/London English UK |
pascal@18783 | 91 us us en_US America/New_York English US |
pascal@18783 | 92 us_ac\ usac us-acentos en_US America/New_York English US (acentos) |
pascal@18783 | 93 us_dv\ usdv dvorak en_US America/New_York English US (dvorak) |
pascal@18783 | 94 us_dl\ usdl dvorak-l en_US America/New_York English US (dvorak-l) |
pascal@18783 | 95 us_dr\ usdr dvorak-r en_US America/New_York English US (dvorak-r) |
pascal@18783 | 96 es es es_ES Europe/Madrid Espanol |
pascal@18783 | 97 fr fr-latin1 fr_FR Europe/Paris Francais |
pascal@18783 | 98 be be-latin1 fr_BE Europe/Brussels Francais Belgique |
pascal@18783 | 99 ca cf fr_CA America/Montreal Francais Canada |
pascal@18783 | 100 fr_CH\ frCH fr_CH-latin1 fr_CH Europe/Zurich Francais Suisse |
pascal@18783 | 101 cr hr,croat hr_HR Europe/Zagreb Hrvatski |
pascal@18783 | 102 is is-latin1 is_IS Atlantic/Reykjavik Islenska |
pascal@18783 | 103 it it it_IT Europe/Rome Italiano |
pascal@18783 | 104 hu hu hu_HU Europe/Budapest Magyar |
pascal@18783 | 105 nl nl2 nl_NL Europe/Amsterdam Nederlands |
pascal@18783 | 106 no\ nb no-latin1 nb_NO Europe/Oslo Norsk (Bokmal) |
pascal@18783 | 107 nn no-latin1 nn_NO Europe/Oslo Norsk (Nynorsk) |
pascal@18783 | 108 po pl2 pl_PL Europe/Warsaw Polski |
pascal@18783 | 109 pt pt-latin1 pt_PT Europe/Lisbon Portugues |
pascal@18783 | 110 ru ru ru_RU Europe/Moscow Russian |
pascal@20197 | 111 ru_uk\ uk ru ru_UA Europe/Kiev Russian Ukraine |
pascal@18873 | 112 sl slovene sl_SI Europe/Ljubljana Slovenski |
pascal@18783 | 113 fi fi fi_FI Europe/Helsinki Suomi |
pascal@18783 | 114 se se-lat6 sv_SE Europe/Stockholm Svenska |
pascal@18783 | 115 tr trq tr_TR Asia/Istanbul Turkce |
pascal@12287 | 116 EOT |
pascal@18783 | 117 #hr croat hr_HR Europe/Zagreb Hrvatski |
pascal@18783 | 118 #grpc gr-pc el_GR Europe/Helsinki Ellinika |
pascal@18783 | 119 #jp jp106 ja_JP Asia/Tokyo Japanese |
pascal@18783 | 120 #sg sg-latin1 de_CH Europe/Zurich Deutsch Schweiz (sg) |
pascal@18783 | 121 #tr5 tr_q-latin5 tr_TR Asia/Istanbul Turkce (latin5) |
al@18471 | 122 |
pascal@20153 | 123 cat >> $fs/boot/isolinux/i18n.cfg <<EOT |
pascal@12287 | 124 LABEL exit |
pascal@12287 | 125 MENU LABEL Back to main menu |
pascal@18754 | 126 |
pascal@12287 | 127 MENU EXIT |
pascal@12287 | 128 MENU END |
pascal@1721 | 129 EOT |
pascal@20153 | 130 sed -i 's/^LABEL us$/&\n MENU DEFAULT/' $fs/boot/isolinux/i18n.cfg |
pascal@20153 | 131 chown root.root $src/kbd/* |
pascal@20153 | 132 touch -r $src $src/kbd/* |
pascal@20153 | 133 for kbd in $(cd $src/kbd; ls | tee ../kbd.l); do |
pascal@20153 | 134 msg="Invalid file kbd/$kbd" |
pascal@20153 | 135 [ -s $src/kbd/$kbd ] && msg="Unused: file kbd/$kbd" && |
pascal@20197 | 136 grep -q "[= ]$kbd " $fs/boot/isolinux/i18n.cfg && continue |
pascal@20153 | 137 sed -i "/^$kbd\$/d" $src/kbd.l |
pascal@20153 | 138 echo "$msg" |
pascal@20153 | 139 done |
pascal@20153 | 140 ( cd $src/kbd; cat ../kbd.l | cpio -o -H newc ) >$fs/boot/isolinux/kbd |
pascal@20153 | 141 lzma e $fs/boot/isolinux/kbd $fs/boot/isolinux/kbd.lzma |
pascal@20153 | 142 mv -f $fs/boot/isolinux/kbd.lzma $fs/boot/isolinux/kbd |
pascal@20153 | 143 chown root.root $fs/boot/isolinux/* |
pascal@20153 | 144 ;; |
pascal@20153 | 145 syslinux-extra) |
pascal@20153 | 146 CAT="system-tools|MBR/FAT/EXT3/PXE bootloader files" |
pascal@20153 | 147 DEPENDS="syslinux posixovl" |
pascal@20153 | 148 mkdir -p $fs/usr/share/boot $fs/usr/bin $fs/bin |
pascal@20153 | 149 lzma e $src/memdisk/memdisk $fs/usr/share/boot/memdisk.lzma 2> /dev/null |
pascal@20153 | 150 cp -a $src/mbr/mbr.bin $fs/usr/share/boot |
pascal@20153 | 151 cp -a $src/mbr/gptmbr.bin $fs/usr/share/boot |
pascal@20153 | 152 lzma e $src/core/pxelinux.0 $fs/usr/share/boot/pxelinux.0.lzma 2> /dev/null |
pascal@20153 | 153 #lzma e $src/com32/menu/vesamenu.c32 $fs/usr/share/boot/vesamenu.c32 |
pascal@20153 | 154 #lzma e $src/com32/modules/mboot.c32 $fs/usr/share/boot/mboot.c32 |
pascal@20153 | 155 lzma e $src/com32/modules/sdi.c32 $fs/usr/share/boot/sdi.c32 |
pascal@20153 | 156 cp -a $src/linux/syslinux-nomtools $fs/bin/syslinux |
pascal@20153 | 157 cp -a $src/extlinux/extlinux $fs/bin |
pascal@20153 | 158 cp -a $src/isohybrid.sh $fs/usr/bin/isohybrid |
pascal@20153 | 159 cp -a $src/iso2exe/iso2exe $fs/usr/bin/iso2exe |
pascal@20153 | 160 cp -a $src/iso2exe/taziso $fs/usr/bin |
pascal@20153 | 161 cp -a $src/iso2exe/README.custom $fs/usr/share/boot |
pascal@20153 | 162 cp -a $src/iso2exe/init.custom $fs/usr/share/boot |
pascal@20153 | 163 chown root.root $fs/usr/share/boot/* $fs/bin/* $fs/usr/bin/* |
pascal@20153 | 164 ;; |
pascal@20153 | 165 syslinux-modules) |
pascal@20153 | 166 CAT="system-tools|modules for syslinux" |
pascal@20153 | 167 mkdir -p $fs/usr/share/boot |
pascal@20153 | 168 for i in $src/com32/*/*.c32 ; do |
pascal@20153 | 169 case "$i" in |
pascal@20153 | 170 */reboot.c32|*/ifmem.c32|*/vesamenu.c32) continue;; |
pascal@20153 | 171 esac |
pascal@20153 | 172 lzma e $i $fs/usr/share/boot/$(basename $i) 2> /dev/null |
pascal@20153 | 173 done |
pascal@20153 | 174 for i in $src/modules/*.com ; do |
pascal@20153 | 175 case "$i" in |
pascal@20153 | 176 */poweroff.com) continue;; |
pascal@20153 | 177 esac |
pascal@20153 | 178 cp $i $fs/usr/share/boot/$(basename $i) 2> /dev/null |
pascal@20153 | 179 done |
pascal@20153 | 180 ;; |
pascal@20153 | 181 syslinux-tools) |
pascal@20153 | 182 CAT="system-tools|Misc perl tools" |
pascal@20153 | 183 DEPENDS="perl" |
pascal@20153 | 184 mkdir -p $fs/usr/bin $fs/usr/share/boot |
pascal@20153 | 185 for i in keytab-lilo lss16toppm ppmtolss16 mkdiskimage \ |
pascal@20153 | 186 syslinux2ansi isohybrid ; do |
pascal@20153 | 187 cp -a $src/utils/$i $fs/usr/bin |
pascal@20153 | 188 done |
pascal@20153 | 189 cp -a $src/iso2exe/isohybrid.exe $fs/usr/share/boot |
pascal@20153 | 190 cp -a $src/iso2exe/meminfo.exe $fs/usr/share/boot |
pascal@20153 | 191 cp -a $src/iso2exe/tazboot.exe $fs/usr/share/boot |
pascal@20153 | 192 find $fs/usr -exec chown root.root {} \; |
pascal@20153 | 193 ;; |
pascal@20153 | 194 esac |
pankso@4 | 195 } |
pascal@786 | 196 |
pascal@1687 | 197 # Pre and post install commands for Tazpkg. |
pascal@20153 | 198 post_install_syslinux() |
pascal@1687 | 199 { |
al@18640 | 200 sed -i "/MENU TITLE SliTaz GNU\/Linux/ s| [0-9X]*$| $(date +%Y%m%d)|" \ |
al@18480 | 201 "$1/boot/isolinux/isolinux.cfg" |
pascal@19509 | 202 sed '/MENU TITLE/!d;s/MENU TITLE //' > $1/etc/slitaz-version \ |
pascal@19509 | 203 < "$1/boot/isolinux/isolinux.cfg" |
pascal@1687 | 204 } |