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