void-packages/srcpkgs/efivar/template

60 lines
1.6 KiB
Bash

# Template file for 'efivar'
pkgname=efivar
version=38
revision=1
build_style=gnu-makefile
make_build_args="libdir=/usr/lib"
make_check_args="GRUB_PREFIX=grub"
make_check_target="test"
make_install_args="libdir=/usr/lib"
hostmakedepends="pkg-config mdocml"
checkdepends="grub"
short_desc="Tools to manipulate EFI variables"
maintainer="Orphaned <orphan@voidlinux.org>"
license="LGPL-2.1-or-later"
homepage="https://github.com/rhboot/efivar"
distfiles="https://github.com/rhboot/efivar/releases/download/${version}/efivar-${version}.tar.bz2"
checksum=f018ed6e49c5f1c16d336d9fd7687ce87023276591921db1e49a314ad6515349
disable_parallel_check=yes
post_extract() {
vsed -e 's/-march=native//' -i src/include/defaults.mk
if [ "$CROSS_BUILD" ]; then
# we build makeguids manually, make sure its not rebuild
vsed -e '/$(MAKEGUIDS_OUTPUT) : makeguids/d' -i src/Makefile
fi
}
pre_build() {
if [ "$CROSS_BUILD" ]; then
# work around broken cross build support by building makeguids
# and then cleaning up shared objects.
make ${makejobs} -C src makeguids HOSTCC=gcc HOSTCCLD=gcc \
HOST_CFLAGS= HOST_LDFLAGS= SRCDIR=${wrksrc} TOPDIR=${wrksrc}
rm -f src/*.o
fi
}
post_install() {
vbin src/test/tester efivar-tester
}
libefivar_package() {
short_desc="Library to manipulate EFI variables"
pkg_install() {
vmove usr/lib/*.so.*
}
}
libefivar-devel_package() {
short_desc="Library to manipulate EFI variables - development files"
depends="libefivar-${version}_${revision}"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove usr/lib/*.so
vmove usr/share/man/man3
}
}