# SliTaz package receipt. PACKAGE="gpxe" VERSION="0.9.3" CATEGORY="system-tools" SHORT_DESC="Ethernet bootloader." MAINTAINER="pascal.bellard@slitaz.org" LICENSE="GPL2" SOURCE="ipxe" TARBALL="$SOURCE-$VERSION.tar.bz2" WEB_SITE="http://etherboot.org/wiki/" WGET_URL="https://git.ipxe.org/release/$SOURCE/$TARBALL" BUILD_DEPENDS="perl linld gcc49" # What is the latest version available today? current_version() { wget -O - http://etherboot.org/wiki/ 2>/dev/null | \ sed '/released/!d;s|.*gPXE-||;s| rel.*||;q' } # Rules to configure and make the package. compile_rules() { cd $src/src sed -i 's|uname -m|echo i486|' Makefile for i in prefix.u default_boot.u cmdline.u url_list.u gcc.u; do [ -f done.$i ] && continue echo "Apply $i..." patch -p2 < $stuff/$i || return 1 touch done.$i done sed -i 's/ = ++ns->cur_rx %/++; ns->cur_rx %=/' drivers/net/ns83820.c sed -i 's/ = (++tp->cur_rx) %/++; tp->cur_rx %=/' drivers/net/tulip.c make CC=gcc-49 EXTRA_CFLAGS="-fno-strict-aliasing -Wno-error=unused-but-set-variable -Wno-error=array-bounds" \ bin/gpxe.lkrn bin/undionly.kpxe 2>&1 | grep -v housekeeping: | grep -v blib.list } # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { mkdir -p $fs/boot cp $src/src/bin/gpxe.lkrn $fs/boot/gpxe # install 255 bytes of forced url at offset 519 echo -n "\ http://mirror.slitaz.org/pxe/pxelinux.0,\ http://mirror.switch.ch/ftp/mirror/pxe/pxelinux.0,\ http://download.tuxfamily.org/slitaz/pxe/pxelinux.0" | cat - /dev/zero | \ dd bs=1 seek=519 count=255 conv=notrunc of=$fs/boot/gpxe } # Pre and post install commands for Tazpkg. post_install() { [ -s $1/boot/isolinux/isolinux.cfg ] && ! grep -qs 'Web Boot' $1/boot/isolinux/isolinux.cfg && sed -i 's|i18n.cfg|&\n\ LABEL web zeb\ MENU LABEL Web Boot\ KERNEL /boot/gpxe|' $1/boot/isolinux/isolinux.cfg true }