wok view syslinux/receipt @ rev 13691

syslinux: add iso2exe
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Dec 13 14:33:27 2012 +0100 (2012-12-13)
parents b3bed44ce76b
children 3f48e3a93cd7
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 TARBALL="$PACKAGE-$VERSION.tar.xz"
9 WEB_SITE="http://syslinux.zytor.com/"
10 WGET_URL="ftp://ftp.kernel.org/pub/linux/utils/boot/syslinux/$TARBALL"
11 BUILD_DEPENDS="kbd-base perl nasm dev86 lzma"
12 DEPENDS="gpxe memtest"
13 CONFIG_FILES="/boot/isolinux"
15 # Rules to gen a SliTaz package suitable for Tazpkg.
16 compile_rules()
17 {
18 cd $src
19 cp -a $stuff/iso2exe .
20 make -C iso2exe
21 cp $stuff/tools/isohybrid.sh .
22 cp $stuff/tools/keytab-lilo.pl .
23 cp $stuff/extra/md5sum.c com32/modules
24 grep -q md5sum.c32 com32/modules/Makefile ||
25 sed -i 's/ifcpu64.c32/ifcpu64.c32 md5sum.c32/' com32/modules/Makefile
26 make -C com32
27 ./isohybrid.sh --build
28 for i in /usr/share/kbd/keymaps/i386/*/*.map.gz; do
29 [ "$(basename $(dirname $i))" = "include" ] && continue
30 j=$(basename $i)
31 j=${j%.map.gz}.kbd
32 ./keytab-lilo.pl /usr/share/kbd/keymaps/i386/qwerty/us.map.gz $i > $j
33 done
34 }
36 # Rules to gen a SliTaz package suitable for Tazpkg.
37 genpkg_rules()
38 {
39 mkdir -p $fs/boot/isolinux
40 cp -a $src/core/isolinux.bin $fs/boot/isolinux
41 cp -a $src/com32/modules/md5sum.c32 $fs/boot/isolinux/c32box.c32
42 cp -a $src/com32/menu/vesamenu.c32 $fs/boot/isolinux
43 # $stuff/isolinux.msg is the old way the have a splash image.
44 cp $stuff/*.cfg $stuff/*.txt $stuff/help.* $stuff/opts.* $fs/boot/isolinux
45 rm -f $fs/boot/isolinux/common.cfg $fs/boot/isolinux/default.cfg
46 rm -f $fs/boot/isolinux/display.txt
47 ( cd $src ; ls *.kbd | cpio -o -H newc ) > $fs/boot/isolinux/cpio.kbd
48 while read label kbd loc menu; do
49 for i in ${kbd/,/ }; do
50 [ -e $src/$i.kbd ] || continue
51 cat >> $fs/boot/isolinux/i18n.cfg <<EOT
53 # ${kbd/,/.kbd or }.kbd keyboard
54 LABEL $label
55 MENU LABEL $menu
56 com32 c32box.c32
57 append kbdmap cpio.kbd $i.kbd lang=$loc kmap=$i
58 EOT
59 break
60 done
61 done <<EOT
62 br br-abnt2 pt_PT@euro Brazil
63 cz cz-lat2 cs_CZ Cesky
64 dk dk-latin1 da_DK Dansk
65 de de-latin1 de_DE@euro Deutsch
66 de_CH\ deCH de_CH-latin1 de_DE Deutsch Schweitz
67 sg sg-latin1 de_DE Deutsch Schweitz (sg)
68 nl nl2 nl_NL@euro Dutch
69 en uk C English UK
70 us us C English US
71 us_ac\ usac us-acentos C English US (acentos)
72 us_dv\ usdv dvorak C English US (dvorak)
73 us_dl\ usdl dvorak-l C English US (dvorak-l)
74 us_dr\ usdr dvorak-r C English US (dvorak-r)
75 es es es_ES@euro Espanol
76 fr fr-latin1 fr_FR@euro Francais
77 be be-latin1 fr_FR@euro Francais Belgique
78 ca cf fr_FR Francais Canada
79 fr_CH\ frCH fr_CH-latin1 fr_FR Francais Suisse
80 cr hr,croat hr_HR Hvratski
81 is is-latin1 is_IS Islenska
82 it it it_IT@euro Italiano
83 jp jp106 ja_JP Japanese
84 hu hu hu_HU Magyar
85 no no-latin1 nn_NO Norske
86 po pl2 pl_PL Polski
87 pt pt-latin1 pt_PT@euro Portugues
88 ru ru ru_UA Russian
89 sl slovene sl_SI Slovenski
90 fi fi-latin1 fi_FI@euro Suomi
91 se se-lat6 sv_SE Svenskt
92 tr trq tr_TR Turk
93 tr2 tr_q-latin5 tr_TR Turk latin5
94 EOT
95 cat >> $fs/boot/isolinux/i18n.cfg <<EOT
97 LABEL exit
98 MENU LABEL Back to main menu
99 MENU EXIT
100 MENU END
101 EOT
102 sed -i 's/^LABEL us$/&\n MENU DEFAULT/' $fs/boot/isolinux/i18n.cfg
103 for kbd in $(cd $src ; ls *.kbd); do
104 [ -s $src/$kbd ] || echo "Invalid file $kbd"
105 grep -q " $kbd " $fs/boot/isolinux/i18n.cfg && continue
106 echo "Missing: file $kbd"
107 done
108 chown root.root $fs/boot/isolinux/*
109 }
111 # Pre and post install commands for Tazpkg.
112 post_install()
113 {
114 sed -i "s/XXXXXXXX/$(date +%Y%m%d)/" $1/boot/isolinux/isolinux.cfg
115 }