wok-tiny view gpxe/receipt @ rev 90

Add some licenses
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Jul 05 13:51:26 2013 +0200 (2013-07-05)
parents dc8eca11e97c
children 371673f39e46
line source
1 # SliTaz package receipt.
3 PACKAGE="gpxe"
4 VERSION="0.9.3"
5 CATEGORY="network"
6 SHORT_DESC="Forward PXE to Slitaz Web Boot"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL"
9 WEB_SITE="http://boot.slitaz.org/"
10 DEPENDS="base-tiny udhcpd-config"
11 CONFIG_FILES="/etc/rcS.conf /etc/udhcpd.conf /etc/inetd.conf"
13 # Rules to configure and make the package.
14 compile_rules()
15 {
16 while read pkg file ; do
17 if [ ! -s $pkg*/fs$file ]; then
18 tazpkg get $pkg
19 tazpkg extract $pkg*.tazpkg
20 fi
21 mkdir -p fs$(dirname $file)
22 mv $pkg*/fs$file fs$(dirname $file) || return 1
23 done << EOT
24 gpxe-pxe /usr/share/boot/gpxe.pxe
25 EOT
26 }
28 # Rules to gen a SliTaz package suitable for Tazpkg.
29 genpkg_rules()
30 {
31 cp -a fs/. $fs
32 }
34 post_install()
35 {
36 [ -n "$URLS" ] && \
37 echo "$URLS" | dos2unix | sed 's/$/,/' | cat - /dev/null | \
38 dd of=$1/usr/share/boot/gpxe.pxe bs=1 seek=5 count=256 2> /dev/null
39 grep -q inetd $1/etc/rcS.conf ||
40 sed -i 's/^RUN_DAEMONS="/&inetd /' $1/etc/rcS.conf
41 grep -q udhcpd $1/etc/rcS.conf ||
42 sed -i 's/^RUN_DAEMONS="/&udhcpd /' $1/etc/rcS.conf
43 grep -q tftpd $1/etc/inetd.conf || cat >> $1/etc/inetd.conf <<EOT
44 tftp dgram udp wait root /usr/bin/tftpd /usr/bin/tftpd -r /usr/share/boot
45 EOT
46 cat >> $1/etc/udhcpd.conf <<EOT
47 opt bootfile gpxe.pxe
48 EOT
49 }
51 config_form()
52 {
53 [ -n "$URLS" ] ||
54 URLS="$(dd if=$1/usr/share/boot/gpxe.pxe bs=1 skip=5 count=256 2> /dev/null | \
55 strings | sed s'/,/\n/g')"
56 cat <<EOT
57 Boot url list :
58 <textarea name="URLS" cols="60" rows="5" wrap="off">
59 $URLS
60 </textarea>
61 EOT
62 }