wok-next annotate ipxe/receipt @ rev 20678

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