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