void-packages/srcpkgs/efitools/template
2019-06-14 17:40:41 +02:00

44 lines
1.3 KiB
Bash

# Template file for 'efitools'
pkgname=efitools
version=1.9.2
revision=2
archs="x86_64* i686* arm* aarch64*"
build_style=gnu-makefile
hostmakedepends="perl-File-Slurp"
makedepends="gnu-efi-libs libressl-devel"
short_desc="Tools to manipulate EFI secure boot platforms"
maintainer="Doan Tran Cong Danh <congdanhqx@gmail.com>"
license="GPL-2.0-only"
homepage="https://git.kernel.org/pub/scm/linux/kernel/git/jejb/efitools.git"
distfiles="https://git.kernel.org/pub/scm/linux/kernel/git/jejb/efitools.git/snapshot/${pkgname}-${version}.tar.gz"
checksum=0f315b36e7d1ba74bfc97ab9f304f0a3072c47578bbe5e42594acae381f9acfe
patch_args="-Nup1"
post_patch() {
[ ! "$CROSS_BUILD" ] && return
case "${XBPS_TARGET_MACHINE}" in
arm*) _ARCH=arm ;;
i686*) _ARCH=ia32 ;;
*) _ARCH="${XBPS_TARGET_MACHINE%-musl}" ;;
esac
# 1: correct target arch
# 2,3,4: include and lib inside sysroot
# 5: use cross-objcopy
sed -i -e "/^ARCH[[:space:]]*=/s/=.*/=${_ARCH}/" \
-e "s,^\(CRTPATH.*=\).*,\1${XBPS_CROSS_BASE}/usr/lib," \
-e "/^INCDIR/s,I\(/usr/include\),I${XBPS_CROSS_BASE}\1,g" \
-e "s,-L /usr/lib,-L ${XBPS_CROSS_BASE}/usr/lib,g" \
-e "/^OBJCOPY/d" \
Make.rules
}
efitools-efi_package() {
short_desc+=" - bare metal tools"
nostrip=yes
noverifyrdeps=yes
noshlibprovides=yes
pkg_install() {
vmove usr/share/efitools
}
}