wok-6.x annotate gpxe/receipt @ rev 20212

Force host arch to i486
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Feb 24 12:51:10 2018 +0100 (2018-02-24)
parents beda06c66d60
children 0686e05d4ad3
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@955 9 TARBALL="$PACKAGE-$VERSION.tar.bz2"
pascal@955 10 WEB_SITE="http://www.etherboot.org/"
pascal@1459 11 WGET_URL="http://kernel.org/pub/software/utils/boot/$PACKAGE/Old/$TARBALL"
pankso@9695 12
pascal@2640 13 BUILD_DEPENDS="perl"
pascal@955 14
pascal@955 15 # Rules to configure and make the package.
pascal@955 16 compile_rules()
pascal@955 17 {
pascal@955 18 cd $src/src
pascal@20212 19 sed -i 's|uname -m|echo i486|' Makefile
pascal@4203 20 for i in prefix.u default_boot.u cmdline.u url_list.u gcc.u; do
pascal@1511 21 [ -f done.$i ] && continue
pascal@1121 22 echo "Apply $i..."
pankso@9695 23 patch -p2 < $stuff/$i || return 1
pascal@1511 24 touch done.$i
pascal@955 25 done
pascal@5737 26 sed -i 's/ = ++ns->cur_rx %/++; ns->cur_rx %=/' drivers/net/ns83820.c
pascal@5737 27 sed -i 's/ = (++tp->cur_rx) %/++; tp->cur_rx %=/' drivers/net/tulip.c
pascal@15613 28 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 29 }
pascal@955 30
pascal@955 31 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@955 32 genpkg_rules()
pascal@955 33 {
pascal@956 34 mkdir -p $fs/boot
pascal@956 35 cp $src/src/bin/gpxe.lkrn $fs/boot/gpxe
pascal@2338 36 # install 255 bytes of forced url at offset 519
pascal@2338 37 echo -n "\
pascal@2338 38 http://mirror.slitaz.org/pxe/pxelinux.0,\
pascal@4720 39 http://mirror.switch.ch/ftp/mirror/pxe/pxelinux.0,\
pascal@2338 40 http://download.tuxfamily.org/slitaz/pxe/pxelinux.0" | cat - /dev/zero | \
pascal@2338 41 dd bs=1 seek=519 count=255 conv=notrunc of=$fs/boot/gpxe
pascal@955 42 }
pascal@20210 43
pascal@20210 44 # Pre and post install commands for Tazpkg.
pascal@20210 45 post_install()
pascal@20210 46 {
pascal@20210 47 [ -s $1/boot/isolinux/isolinux.cfg ] &&
pascal@20210 48 ! grep -qs 'Web Boot' $1/boot/isolinux/isolinux.cfg &&
pascal@20210 49 sed -i 's|i18n.cfg|&\n\
pascal@20210 50 LABEL web zeb\
pascal@20210 51 MENU LABEL Web Boot\
pascal@20210 52 KERNEL /boot/gpxe|' $1/boot/isolinux/isolinux.cfg
pascal@20210 53 }