wok-next view ipxe/receipt @ rev 21057

Deal with HOST_ARCH="any"
author Aleksej Bobylev <al.bobylev@gmail.com>
date Mon Dec 03 14:47:30 2018 +0200 (2018-12-03)
parents d5aab818505e
children e19ff076dc63
line source
1 # SliTaz package receipt v2.
3 PACKAGE="ipxe"
4 VERSION="20180708"
5 COMMIT="d2063b7"
6 CATEGORY="system-tools"
7 SHORT_DESC="Open source network boot firmware"
8 MAINTAINER="pascal.bellard@slitaz.org"
9 LICENSE="GPL2 UBDL"
10 WEB_SITE="http://ipxe.org/"
11 HOST_ARCH="any"
13 TARBALL="$PACKAGE-$VERSION.tar.gz"
14 WGET_URL="$GITHUB/ipxe/ipxe/tarball/$COMMIT"
16 BUILD_DEPENDS="perl xz-dev"
17 SPLIT="$PACKAGE-pxe"
19 compile_rules() {
20 cd $src/src
22 # Fix https://git.ipxe.org/ipxe.git/commit/163f8acba0fbb6e3c44aec5286d3d076e1f44f22
23 sed -i 's/.*.section ".pages".*/.if64 ;\n&/;$a.endif' \
24 arch/x86/transitions/librm.S
26 #sed -i 's/^ASFLAGS.*/& -adhlns=$(<:.S=.lst)/' Makefile
27 sed -i 's|-llzma|& -lpthread|' Makefile.*
28 sed -i '
29 s|//\(#define.*CONSOLE_FRAMEBUFFER\)|\1|;
30 s|//\(#define.*CONSOLE_SERIAL\)|\1|' config/console.h
31 sed -i '
32 s|//\(#define.*IMAGE_PNG\)|\1|;
33 s|//\(#define.*CONSOLE_CMD\)|\1|;
34 s|//\(#define.*REBOOT_CMD\)|\1|' config/general.h
35 # cp $stuff/lkrnprefix.S arch/i386/prefix
37 # refer to http://ipxe.org/appnote/buildtargets
38 case $ARCH in
39 i?86) platform='bin-i386-pcbios';;
40 x86_64) platform='bin-x86_64-pcbios';;
41 esac
43 make $platform || return 1
44 separator
46 make $platform/undionly.pxe $platform/undionly.kpxe \
47 $platform/undionly.kkpxe $platform/undionly.kkkpxe \
48 $platform/ipxe.pxe $platform/ipxe.kpxe \
49 $platform/ipxe.kkpxe $platform/ipxe.kkkpxe \
50 $platform/ipxe.nbi $platform/ipxe.lkrn \
51 EMBED=$stuff/ipxe.cmd || return 1
53 mkdir -p $install/boot/
54 cp -a $src/src/$platform/ipxe.lkrn $install/boot/ipxe
55 OFS=$((0x156))
56 unix2dos <<EOT | dd bs=1 of=$install/boot/ipxe conv=notrunc \
57 seek=$OFS count=$((0x1F0-$OFS))
58 $SHORT_DESC
59 EOT
61 mkdir -p $install/usr/share/boot/
62 cp -a $src/src/$platform/ipxe.kpxe $install/usr/share/boot/ipxe.pxe
63 cp -a $src/src/$platform/undionly.kpxe $install/usr/share/boot/undi.pxe
64 }
66 genpkg_rules() {
67 case $PACKAGE in
68 ipxe)
69 copy ipxe
70 ;;
71 ipxe-pxe)
72 copy *.pxe
73 CAT="system-tools|for pxe server"
74 ;;
75 esac
76 }