wok-current view syslinux/receipt @ rev 23810

syslinux/iso2exe: use isoboot
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon May 25 10:10:30 2020 +0000 (2020-05-25)
parents 8637af3e2aba
children c91b0729c39d
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 LINLD="$WOK/linld/source"
13 CONFIG_FILES="/boot/isolinux/*.cfg /boot/isolinux/kbd"
14 TAGS="boot"
16 BUILD_DEPENDS="wget kbd-base perl nasm dev86 lzma mingw32-gcc upx posixovl \
17 util-linux-uuid-dev advancecomp libidn linld"
19 # Rules to gen a SliTaz package suitable for Tazpkg.
20 compile_rules()
21 {
22 rm -f $src/core/isolinux.bin
23 for i in loadhigh iso9660 readconfig keytab-lilo lzop-1.03-gcc6 fixes-4.07 ; do
24 patch -p 0 < $stuff/extra/$i.u
25 done
26 cp $stuff/tools/isohybrid.sh .
27 cp $stuff/extra/md5sum.c com32/modules
28 grep -q md5sum.c32 com32/modules/Makefile ||
29 sed -i 's/ifcpu64.c32/ifcpu64.c32 md5sum.c32/' com32/modules/Makefile
30 export LDFLAGS=''
31 make clean
32 echo "make all: LDFLAGS=$LDFLAGS"
33 make all 2>&1 | sed 's/NO_WERROR=1/NO_Werror=1/;/syslinux64.exe/d'
34 echo "make core: LDFLAGS=$LDFLAGS"
35 make -C core
36 make -C com32
37 ./isohybrid.sh --build
38 sed -i 's/loadkeys -m/loadkeys -u -m/' utils/keytab-lilo # for ru.kbd
39 mkdir kbd
40 for i in /usr/share/kbd/keymaps/i386/*/*.map.gz; do
41 [ "$(basename $(dirname $i))" = 'include' ] && continue
42 utils/keytab-lilo /usr/share/kbd/keymaps/i386/qwerty/us.map.gz \
43 $i > kbd/$(basename $i .map.gz)
44 done
45 cp -a $stuff/iso2exe .
46 cp $LINLD/*/isoboot.com iso2exe/boot.com
47 cp $LINLD/*/header.com iso2exe/header.com
48 make -C iso2exe
49 }
51 # Rules to gen a SliTaz package suitable for Tazpkg.
52 genpkg_rules()
53 {
54 mkdir -p $fs/boot/isolinux $install/usr/share/doc
55 cp $stuff/iso2exe/README* $install/usr/share/doc
56 cp $stuff/iso2exe/init.custom $install/usr/share/doc
57 cp $src/doc/*.txt $install/usr/share/doc
58 cp -a $src/man $install/usr/share/
59 cp $LINLD/*/linld.com $fs/boot
60 cp -a $src/core/isolinux.bin $fs/boot/isolinux
61 lzma e $src/com32/modules/md5sum.c32 $fs/boot/isolinux/c32box.c32
62 lzma e $src/com32/menu/vesamenu.c32 $fs/boot/isolinux/vesamenu.c32
63 # $stuff/isolinux.msg is the old way the have a splash image.
64 cp $stuff/*.cfg $stuff/*.txt $stuff/help.* $stuff/opts.* $fs/boot/isolinux
65 rm -f $fs/boot/isolinux/common.cfg $fs/boot/isolinux/default.cfg
66 rm -f $fs/boot/isolinux/display.txt
67 while read label kbd loc tz menu; do
68 for i in ${kbd/,/ }; do
69 [ -e $src/kbd/$i ] || continue
70 map=" $i"
71 [ ${kbd#*,} = $i ] && map=
72 cat >> $fs/boot/isolinux/i18n.cfg <<EOT
73 LABEL $label
74 MENU LABEL $menu
75 com32 c32box.c32
76 append kbd$map lang=$loc kmap=${kbd#*,} tz=$tz
78 EOT
79 break
80 done
81 done <<EOT
82 br br-abnt2 pt_BR America/Sao_Paulo Brasil (abnt2)
83 br_ac\ brac us-acentos pt_BR America/Sao_Paulo Brasil (us-acentos)
84 cz cz-lat2 cs_CZ Europe/Prague Cesky
85 dk dk-latin1 da_DK Europe/Copenhagen Dansk
86 de de-latin1 de_DE Europe/Berlin Deutsch
87 de_CH\ deCH de_CH-latin1 de_CH Europe/Zurich Deutsch Schweiz
88 gr gr el_GR Europe/Helsinki Ellinika
89 en uk en_GB Europe/London English UK
90 us us en_US America/New_York English US
91 us_ac\ usac us-acentos en_US America/New_York English US (acentos)
92 us_dv\ usdv dvorak en_US America/New_York English US (dvorak)
93 us_dl\ usdl dvorak-l en_US America/New_York English US (dvorak-l)
94 us_dr\ usdr dvorak-r en_US America/New_York English US (dvorak-r)
95 es es es_ES Europe/Madrid Espanol
96 fr fr-latin1 fr_FR Europe/Paris Francais
97 be be-latin1 fr_BE Europe/Brussels Francais Belgique
98 ca cf fr_CA America/Montreal Francais Canada
99 fr_CH\ frCH fr_CH-latin1 fr_CH Europe/Zurich Francais Suisse
100 cr hr,croat hr_HR Europe/Zagreb Hrvatski
101 is is-latin1 is_IS Atlantic/Reykjavik Islenska
102 it it it_IT Europe/Rome Italiano
103 hu hu hu_HU Europe/Budapest Magyar
104 nl nl2 nl_NL Europe/Amsterdam Nederlands
105 no\ nb no-latin1 nb_NO Europe/Oslo Norsk (Bokmal)
106 nn no-latin1 nn_NO Europe/Oslo Norsk (Nynorsk)
107 po pl2 pl_PL Europe/Warsaw Polski
108 pt pt-latin1 pt_PT Europe/Lisbon Portugues
109 ru ru ru_RU Europe/Moscow Russian
110 ru_uk\ uk ru ru_UA Europe/Kiev Russian Ukraine
111 sl slovene sl_SI Europe/Ljubljana Slovenski
112 fi fi fi_FI Europe/Helsinki Suomi
113 se se-lat6 sv_SE Europe/Stockholm Svenska
114 tr trq tr_TR Asia/Istanbul Turkce
115 EOT
116 #grpc gr-pc el_GR Europe/Helsinki Ellinika
117 #jp jp106 ja_JP Asia/Tokyo Japanese
118 #sg sg-latin1 de_CH Europe/Zurich Deutsch Schweiz (sg)
119 #tr5 tr_q-latin5 tr_TR Asia/Istanbul Turkce (latin5)
121 cat >> $fs/boot/isolinux/i18n.cfg <<EOT
122 LABEL exit
123 MENU LABEL Back to main menu
125 MENU EXIT
126 MENU END
127 EOT
128 sed -i 's/^LABEL us$/&\n MENU DEFAULT/' $fs/boot/isolinux/i18n.cfg
129 chown root.root $src/kbd/*
130 touch -t 197001010100.00 $src/kbd/*
131 for kbd in $(cd $src/kbd; ls | tee ../kbd.l); do
132 msg="Invalid file kbd/$kbd"
133 [ -s $src/kbd/$kbd ] && msg="Unused: file kbd/$kbd" &&
134 grep -q "[= ]$kbd " $fs/boot/isolinux/i18n.cfg && continue
135 sed -i "/^$kbd\$/d" $src/kbd.l
136 echo "$msg"
137 done
138 ( cd $src/kbd; cpio -o -H newc < ../kbd.l ) > $fs/boot/isolinux/kbd
139 lzma e $fs/boot/isolinux/kbd $fs/boot/isolinux/kbd.lzma # Add size field
140 mv -f $fs/boot/isolinux/kbd.lzma $fs/boot/isolinux/kbd
141 chown root.root $fs/boot/isolinux/*
142 }
144 # Pre and post install commands for Tazpkg.
145 post_install()
146 {
147 sed -i "/MENU TITLE SliTaz GNU\/Linux/ s| [0-9X]*$| $(date +%Y%m%d)|" \
148 "$1/boot/isolinux/isolinux.cfg"
149 sed '/MENU TITLE/!d;s/MENU TITLE //' > $1/etc/slitaz-version \
150 < "$1/boot/isolinux/isolinux.cfg"
151 for i in $(grep -ls boot/isolinux/isolinux.cfg \
152 $1/var/lib/tazpkg/installed/*/receipt); do
153 pkg=$(basename ${i%/*})
154 [ "$pkg" = "$PACKAGE" ] ||
155 root=/ chroot "$1/" tazpkg reconfigure $pkg
156 done
157 }