diff options
author | Carlo Landmeter <clandmeter@alpinelinux.org> | 2018-03-06 16:35:24 +0000 |
---|---|---|
committer | Carlo Landmeter <clandmeter@alpinelinux.org> | 2018-03-06 16:35:28 +0000 |
commit | 66dfb5548120c29f2d03a6114b756bd8b1e88b21 (patch) | |
tree | 3bc9c00d04b8c520682075d9e710bca18334fb34 | |
parent | 784c1e8e1270396f8c09e8aba01ec7a441cda2a7 (diff) | |
download | aports-66dfb5548120c29f2d03a6114b756bd8b1e88b21.tar.bz2 aports-66dfb5548120c29f2d03a6114b756bd8b1e88b21.tar.xz |
testing/alpine-ipxe: add aarch64 support and split bins
-rw-r--r-- | testing/alpine-ipxe/APKBUILD | 61 |
1 files changed, 35 insertions, 26 deletions
diff --git a/testing/alpine-ipxe/APKBUILD b/testing/alpine-ipxe/APKBUILD index 9f9d87c965..b0da130e8b 100644 --- a/testing/alpine-ipxe/APKBUILD +++ b/testing/alpine-ipxe/APKBUILD @@ -3,14 +3,14 @@ pkgname=alpine-ipxe pkgver=1.0_git20180220 _sha=47849be3a900c546cf92066849be0806f4e611d9 -pkgrel=1 +pkgrel=2 pkgdesc="iPXE build for Alpine Linux netboot" url="https://boot.alpinelinux.org" -arch="x86 x86_64" +arch="x86 x86_64 aarch64" license="GPL-2.0-or-later" depends="" makedepends="xz-dev perl coreutils bash syslinux xorriso" -options="!strip !check" # no tests +options="!strip !check !archcheck !tracedeps" # no tests install="" subpackages="" source="ipxe-$pkgver.tar.gz::https://github.com/ipxe/ipxe/archive/$_sha.tar.gz @@ -20,18 +20,29 @@ source="ipxe-$pkgver.tar.gz::https://github.com/ipxe/ipxe/archive/$_sha.tar.gz " builddir="$srcdir/ipxe-$_sha/src" +# default build targets for x86 systems +_targets="bin/ipxe.iso bin/ipxe.lkrn bin/ipxe.pxe bin/undionly.kpxe bin/ipxe.usb" + case $CARCH in -x86) _arch=i386;; -x86_64) _arch=x86_64;; +x86) _targets="$_targets bin-i386-efi/ipxe.efi";; +x86_64) _targets="$_targets bin-x86_64-efi/ipxe.efi";; +aarch64) + _targets="bin-arm64-efi/snp.efi" + makedepends="xz-dev perl coreutils bash";; esac +for _target in $_targets; do + _target=${_target##*/} + _target=${_target/./_} + subpackages="$subpackages $pkgname-$_target:_split" +done + prepare() { cd "$builddir" - local general opt - general="NET_PROTO_IPV6 DOWNLOAD_PROTO_HTTPS IMAGE_TRUST_CMD + local general="NET_PROTO_IPV6 DOWNLOAD_PROTO_HTTPS IMAGE_TRUST_CMD PING_CMD REBOOT_CMD" mkdir -p config/local - for opt in $general; do + local opt; for opt in $general; do echo "#define $opt" >> config/local/general.h echo "#define $opt" >> config/local/general.h.efi done @@ -40,29 +51,27 @@ prepare() { build() { cd "$builddir" # DST_Root_CA_X3.pem is need for https (letsencrypt) - make \ - EMBED="$srcdir/boot.ipxe" \ + make EMBED="$srcdir/boot.ipxe" \ CERT="$srcdir"/alpine-netboot-ca.crt,"$srcdir"/DST_Root_CA_X3.pem \ TRUST="$srcdir"/alpine-netboot-ca.crt,"$srcdir"/DST_Root_CA_X3.pem \ - bin/ipxe.iso \ - bin/ipxe.lkrn \ - bin/ipxe.pxe \ - bin/undionly.kpxe \ - bin-$_arch-efi/ipxe.efi + $_targets } package() { - cd "$builddir" - install -Dm644 bin/ipxe.lkrn \ - "$pkgdir"/usr/share/$pkgname/ipxe.lkrn - install -Dm644 bin/ipxe.pxe \ - "$pkgdir"/usr/share/$pkgname/ipxe.pxe - install -Dm644 bin-$_arch-efi/ipxe.efi \ - "$pkgdir"/usr/share/$pkgname/ipxe.efi - install -Dm644 bin/ipxe.iso \ - "$pkgdir"/usr/share/$pkgname/ipxe.iso - install -Dm644 bin/undionly.kpxe \ - "$pkgdir"/usr/share/$pkgname/undionly.kpxe + local target; for target in $_targets; do + install -Dm644 "$builddir"/$target \ + "$pkgdir"/usr/share/$pkgname/${target##*/} + done +} + +_split() { + local name=${subpkgname##*-} + name=${name/_/.} + pkgdesc="$pkgname $name binary" + install_if="$pkgname=$pkgver-r$pkgrel" + mkdir -p "$subpkgdir"/usr/share/$pkgname + mv "$pkgdir"/usr/share/$pkgname/$name \ + "$subpkgdir"/usr/share/$pkgname } sha512sums="abc070ed07970e5307f04f5da3da4916c98016bf0a4115ab04979ecc5e7c452ca5102799ddab926e0ae9867c37c311de785dc93a736bf8f0809d5ea8e3cd3732 ipxe-1.0_git20180220.tar.gz |