wok annotate gpxe/receipt @ rev 25491

Up foomatic-db-nonfree (20221116)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Nov 17 12:13:24 2022 +0000 (23 months ago)
parents 22471cbea549
children
rev   line source
pascal@955 1 # SliTaz package receipt.
pascal@955 2
pascal@955 3 PACKAGE="gpxe"
pascal@955 4 VERSION="0.9.3"
pascal@955 5 CATEGORY="system-tools"
pascal@955 6 SHORT_DESC="Ethernet bootloader."
pascal@955 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@15001 8 LICENSE="GPL2"
pascal@25028 9 SOURCE="ipxe"
pascal@25028 10 TARBALL="$SOURCE-$VERSION.tar.bz2"
pascal@25438 11 WEB_SITE="http://etherboot.org/wiki/"
pascal@25028 12 WGET_URL="https://git.ipxe.org/release/$SOURCE/$TARBALL"
pankso@9695 13
pascal@2640 14 BUILD_DEPENDS="perl"
pascal@955 15
pascal@24491 16 # What is the latest version available today?
pascal@24491 17 current_version()
pascal@24491 18 {
pascal@24491 19 wget -O - http://etherboot.org/wiki/ 2>/dev/null | \
pascal@24491 20 sed '/released/!d;s|.*gPXE-||;s| rel.*||;q'
pascal@24491 21 }
pascal@24491 22
pascal@955 23 # Rules to configure and make the package.
pascal@955 24 compile_rules()
pascal@955 25 {
pascal@955 26 cd $src/src
pascal@20212 27 sed -i 's|uname -m|echo i486|' Makefile
pascal@4203 28 for i in prefix.u default_boot.u cmdline.u url_list.u gcc.u; do
pascal@1511 29 [ -f done.$i ] && continue
pascal@1121 30 echo "Apply $i..."
pankso@9695 31 patch -p2 < $stuff/$i || return 1
pascal@1511 32 touch done.$i
pascal@955 33 done
pascal@5737 34 sed -i 's/ = ++ns->cur_rx %/++; ns->cur_rx %=/' drivers/net/ns83820.c
pascal@5737 35 sed -i 's/ = (++tp->cur_rx) %/++; tp->cur_rx %=/' drivers/net/tulip.c
pascal@15613 36 make EXTRA_CFLAGS="-fno-strict-aliasing -Wno-error=unused-but-set-variable" bin/gpxe.lkrn bin/undionly.kpxe 2>&1 | grep -v housekeeping: | grep -v blib.list
pascal@955 37 }
pascal@955 38
pascal@955 39 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@955 40 genpkg_rules()
pascal@955 41 {
pascal@956 42 mkdir -p $fs/boot
pascal@956 43 cp $src/src/bin/gpxe.lkrn $fs/boot/gpxe
pascal@2338 44 # install 255 bytes of forced url at offset 519
pascal@2338 45 echo -n "\
pascal@2338 46 http://mirror.slitaz.org/pxe/pxelinux.0,\
pascal@4720 47 http://mirror.switch.ch/ftp/mirror/pxe/pxelinux.0,\
pascal@2338 48 http://download.tuxfamily.org/slitaz/pxe/pxelinux.0" | cat - /dev/zero | \
pascal@2338 49 dd bs=1 seek=519 count=255 conv=notrunc of=$fs/boot/gpxe
pascal@955 50 }
pascal@20210 51
pascal@20210 52 # Pre and post install commands for Tazpkg.
pascal@20210 53 post_install()
pascal@20210 54 {
pascal@20210 55 [ -s $1/boot/isolinux/isolinux.cfg ] &&
pascal@20210 56 ! grep -qs 'Web Boot' $1/boot/isolinux/isolinux.cfg &&
pascal@20210 57 sed -i 's|i18n.cfg|&\n\
pascal@20210 58 LABEL web zeb\
pascal@20210 59 MENU LABEL Web Boot\
pascal@20210 60 KERNEL /boot/gpxe|' $1/boot/isolinux/isolinux.cfg
pascal@20219 61 true
pascal@20210 62 }