wok-next annotate ipxe/receipt @ rev 20905

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