wok-tiny annotate gpxe/receipt @ rev 119
linux: add jsclipboard.ko
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Jul 20 08:29:50 2016 +0200 (2016-07-20) |
parents | d6527924eb96 |
children | 10cf1a5f187d |
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@119 | 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@94 | 21 mkdir -p $DESTDIR$(dirname $file) |
pascal@94 | 22 mv $pkg*/fs$file $DESTDIR$(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@94 | 31 cp -a $install/. $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@113 | 43 sed -i '/#tftp/d' $1/etc/inetd.conf |
pascal@7 | 44 grep -q tftpd $1/etc/inetd.conf || cat >> $1/etc/inetd.conf <<EOT |
pascal@97 | 45 tftp dgram udp wait root tftpd tftpd -r /usr/share/boot |
pascal@7 | 46 EOT |
pascal@7 | 47 cat >> $1/etc/udhcpd.conf <<EOT |
pascal@7 | 48 opt bootfile gpxe.pxe |
pascal@7 | 49 EOT |
pascal@7 | 50 } |
pascal@7 | 51 |
pascal@7 | 52 config_form() |
pascal@7 | 53 { |
pascal@7 | 54 [ -n "$URLS" ] || |
pascal@7 | 55 URLS="$(dd if=$1/usr/share/boot/gpxe.pxe bs=1 skip=5 count=256 2> /dev/null | \ |
pascal@7 | 56 strings | sed s'/,/\n/g')" |
pascal@7 | 57 cat <<EOT |
pascal@7 | 58 Boot url list : |
pascal@7 | 59 <textarea name="URLS" cols="60" rows="5" wrap="off"> |
pascal@7 | 60 $URLS |
pascal@7 | 61 </textarea> |
pascal@7 | 62 EOT |
pascal@7 | 63 } |