47 lines
1.3 KiB
Bash
47 lines
1.3 KiB
Bash
# Template file for 'efivar'
|
|
pkgname=efivar
|
|
version=31
|
|
revision=1
|
|
makedepends="popt-devel"
|
|
short_desc="Tools to manipulate EFI variables"
|
|
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
|
license="LGPL-2.1"
|
|
homepage="https://github.com/rhinstaller/efivar"
|
|
only_for_archs="i686 i686-musl x86_64 x86_64-musl"
|
|
distfiles="https://github.com/rhinstaller/efivar/archive/${version}/${version}.tar.gz>${pkgname}-${version}.tar.gz"
|
|
checksum=b825680dc8b2165cd71131277f5a9cd632f9e43a84a33756543b24e7a251b9e0
|
|
|
|
CFLAGS="-D_GNU_SOURCE"
|
|
|
|
do_build() {
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
*-musl)
|
|
cp ${FILESDIR}/bswap_constant.h src/include/efivar/
|
|
patch -p0 < ${FILESDIR}/makeguids.patch
|
|
;;
|
|
esac
|
|
sed -i Make.rules -e s';-o $@ $^ $(LDLIBS);-o $@ $^ $(LDLIBS) -lpopt;'
|
|
make ${makejobs} CC=$CC libdir="/usr/lib/"
|
|
make -C src/test ${makejobs} CC=$CC libdir="/usr/lib/"
|
|
}
|
|
do_install() {
|
|
make DESTDIR=${DESTDIR} libdir="/usr/lib/" 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="${makedepends} libefivar>=${version}_${revision}"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove usr/lib/pkgconfig
|
|
vmove usr/lib/*.so
|
|
vmove usr/share/man/man3
|
|
}
|
|
}
|