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