wok-current view gpxe/receipt @ rev 24913

updated mobile-broadband-provider-info and mobile-broadband-provider-info-dev (20190618 -> 20220315)
author Hans-G?nter Theisgen
date Sat Apr 09 15:53:04 2022 +0100 (2022-04-09)
parents 0686e05d4ad3
children 22471cbea549
line source
1 # SliTaz package receipt.
3 PACKAGE="gpxe"
4 VERSION="0.9.3"
5 CATEGORY="system-tools"
6 SHORT_DESC="Ethernet bootloader."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2"
9 TARBALL="$PACKAGE-$VERSION.tar.bz2"
10 WEB_SITE="http://www.etherboot.org/"
11 WGET_URL="http://kernel.org/pub/software/utils/boot/$PACKAGE/Old/$TARBALL"
13 BUILD_DEPENDS="perl"
15 # What is the latest version available today?
16 current_version()
17 {
18 wget -O - http://etherboot.org/wiki/ 2>/dev/null | \
19 sed '/released/!d;s|.*gPXE-||;s| rel.*||;q'
20 }
22 # Rules to configure and make the package.
23 compile_rules()
24 {
25 cd $src/src
26 sed -i 's|uname -m|echo i486|' Makefile
27 for i in prefix.u default_boot.u cmdline.u url_list.u gcc.u; do
28 [ -f done.$i ] && continue
29 echo "Apply $i..."
30 patch -p2 < $stuff/$i || return 1
31 touch done.$i
32 done
33 sed -i 's/ = ++ns->cur_rx %/++; ns->cur_rx %=/' drivers/net/ns83820.c
34 sed -i 's/ = (++tp->cur_rx) %/++; tp->cur_rx %=/' drivers/net/tulip.c
35 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
36 }
38 # Rules to gen a SliTaz package suitable for Tazpkg.
39 genpkg_rules()
40 {
41 mkdir -p $fs/boot
42 cp $src/src/bin/gpxe.lkrn $fs/boot/gpxe
43 # install 255 bytes of forced url at offset 519
44 echo -n "\
45 http://mirror.slitaz.org/pxe/pxelinux.0,\
46 http://mirror.switch.ch/ftp/mirror/pxe/pxelinux.0,\
47 http://download.tuxfamily.org/slitaz/pxe/pxelinux.0" | cat - /dev/zero | \
48 dd bs=1 seek=519 count=255 conv=notrunc of=$fs/boot/gpxe
49 }
51 # Pre and post install commands for Tazpkg.
52 post_install()
53 {
54 [ -s $1/boot/isolinux/isolinux.cfg ] &&
55 ! grep -qs 'Web Boot' $1/boot/isolinux/isolinux.cfg &&
56 sed -i 's|i18n.cfg|&\n\
57 LABEL web zeb\
58 MENU LABEL Web Boot\
59 KERNEL /boot/gpxe|' $1/boot/isolinux/isolinux.cfg
60 true
61 }