void-packages/srcpkgs/gnu-efi-libs/template

51 lines
1.6 KiB
Bash

# Template file for 'gnu-efi-libs'
pkgname=gnu-efi-libs
reverts="3.0w_1" # Not an actual revert, xbps considers 3.0w higher than 3.0.8
version=3.0.14
revision=1
wrksrc="gnu-efi-${version}"
makedepends="pciutils-devel"
short_desc="Library for building UEFI Applications using GNU toolchain"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://sourceforge.net/projects/gnu-efi/"
distfiles="${SOURCEFORGE_SITE}/gnu-efi/gnu-efi-${version}.tar.bz2"
checksum=b73b643a0d5697d1f396d7431448e886dd805668789578e3e1a28277c9528435
nostrip=yes
# If we are cross-building we need to pass the cross-compilation triplet
# to the CROSS_COMPILE environment variable so the build system uses
# the cross tooling
if [ "$CROSS_BUILD" ]; then
export CROSS_COMPILE=${XBPS_CROSS_TRIPLET}-
fi
# Filter out arches for the host machine
# the makefile only accept specific names like ia32 for i686
# and arm for all armv*, we also get to remove the musl specifiers
case "$XBPS_MACHINE" in
x86_64*) HOST_ARCH=x86_64 ;;
i686*) HOST_ARCH=ia32 ;;
arm*) HOST_ARCH=arm ;;
aarch64*) HOST_ARCH=aarch64 ;;
esac
# Filter our arches for the target machines
# the same rules as above apply, we also get a chance to declare
# broken= here for unsupported configurations
case "$XBPS_TARGET_MACHINE" in
x86_64*) TARGET_ARCH=x86_64 ;;
i686*) TARGET_ARCH=ia32 ;;
arm*) TARGET_ARCH=arm ;;
aarch64*) TARGET_ARCH=aarch64 ;;
*) broken="${XBPS_TARGET_MACHINE} is untested, please add support if possible" ;;
esac
do_build() {
make ARCH=${TARGET_ARCH} HOSTARCH=${HOST_ARCH}
}
do_install() {
make ARCH=${TARGET_ARCH} INSTALLROOT=${DESTDIR} PREFIX=/usr LIBDIR=/usr/lib install
}