wok-current view gpxe/receipt @ rev 25582

Up gcc 6.3.0, fix grub4dos and others packages
author Stanislas Leduc <shann@slitaz.org>
date Sun May 21 15:09:45 2023 +0000 (18 months ago)
parents 8ea0030e77cb
children 35db2ca0cb06
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 SOURCE="ipxe"
10 TARBALL="$SOURCE-$VERSION.tar.bz2"
11 WEB_SITE="http://etherboot.org/wiki/"
12 WGET_URL="https://git.ipxe.org/release/$SOURCE/$TARBALL"
14 BUILD_DEPENDS="perl"
16 # What is the latest version available today?
17 current_version()
18 {
19 wget -O - http://etherboot.org/wiki/ 2>/dev/null | \
20 sed '/released/!d;s|.*gPXE-||;s| rel.*||;q'
21 }
23 # Rules to configure and make the package.
24 compile_rules()
25 {
26 cd $src/src
27 sed -i 's|uname -m|echo i486|' Makefile
28 for i in prefix.u default_boot.u cmdline.u url_list.u gcc.u; do
29 [ -f done.$i ] && continue
30 echo "Apply $i..."
31 patch -p2 < $stuff/$i || return 1
32 touch done.$i
33 done
34 sed -i 's/ = ++ns->cur_rx %/++; ns->cur_rx %=/' drivers/net/ns83820.c
35 sed -i 's/ = (++tp->cur_rx) %/++; tp->cur_rx %=/' drivers/net/tulip.c
36 make EXTRA_CFLAGS="-fno-strict-aliasing -Wno-error=unused-but-set-variable -Wno-error=array-bounds" \
37 bin/gpxe.lkrn bin/undionly.kpxe 2>&1 | grep -v housekeeping: | grep -v blib.list
38 }
40 # Rules to gen a SliTaz package suitable for Tazpkg.
41 genpkg_rules()
42 {
43 mkdir -p $fs/boot
44 cp $src/src/bin/gpxe.lkrn $fs/boot/gpxe
45 # install 255 bytes of forced url at offset 519
46 echo -n "\
47 http://mirror.slitaz.org/pxe/pxelinux.0,\
48 http://mirror.switch.ch/ftp/mirror/pxe/pxelinux.0,\
49 http://download.tuxfamily.org/slitaz/pxe/pxelinux.0" | cat - /dev/zero | \
50 dd bs=1 seek=519 count=255 conv=notrunc of=$fs/boot/gpxe
51 }
53 # Pre and post install commands for Tazpkg.
54 post_install()
55 {
56 [ -s $1/boot/isolinux/isolinux.cfg ] &&
57 ! grep -qs 'Web Boot' $1/boot/isolinux/isolinux.cfg &&
58 sed -i 's|i18n.cfg|&\n\
59 LABEL web zeb\
60 MENU LABEL Web Boot\
61 KERNEL /boot/gpxe|' $1/boot/isolinux/isolinux.cfg
62 true
63 }