# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gnu-efi
pkgver=3.0.18
pkgrel=0
pkgdesc="Development Libraries and headers for EFI"
url="https://github.com/ncroxon/gnu-efi"
arch="all !armhf !s390x !ppc64le"
license="BSD-2-Clause"
subpackages="$pkgname-dev $pkgname-apps"
depends_dev="$pkgname"
source="https://github.com/ncroxon/gnu-efi/archive/refs/tags/$pkgver/gnu-efi-$pkgver.tar.gz
	CHAR16.patch
	"
options="!check"

build() {
	# LDFLAGS are passed directly to the linker
	LDFLAGS="${LDFLAGS//-Wl/}"
	LDFLAGS="${LDFLAGS//,/ }"
	make -j1
}

package() {
	make PREFIX=/usr INSTALLROOT="$pkgdir" install
}

apps() {
	pkgdesc="$pkgdesc (EFI test apps)"
	amove usr/lib/gnuefi/apps
}

sha512sums="
d1edeec6480cc0317f400627dde9e840257acf7d3fb6a1f47b7be4761d6d69040d034ae4f2123b1ab32bd615ff55c6a50010f80976e81cfb0c5716ce7f11dfdb  gnu-efi-3.0.18.tar.gz
1f9e739a1dab7ed2cb096a176d897d37e837fc1856caef65e524edf1207fb0359e560be8d10ab7801a0b81ceae83bb2417511e78d793add408ae18c51d26aeb7  CHAR16.patch
"
