void-packages/srcpkgs/sbsigntool/template
2019-06-13 16:32:55 +02:00

47 lines
1.4 KiB
Bash

# Template file for 'sbsigntool'
pkgname=sbsigntool
version=0.9.2
revision=2
build_style=gnu-configure
hostmakedepends="autoconf automake pkg-config"
makedepends="binutils-devel libressl-devel libuuid-devel gnu-efi-libs"
short_desc="Signing utility for UEFI secure boot"
maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
license="GPL-3.0-or-later"
homepage="https://git.kernel.org/pub/scm/linux/kernel/git/jejb/sbsigntools.git/"
distfiles="${DEBIAN_SITE}/main/s/${pkgname}/${pkgname}_${version}.orig.tar.gz"
checksum=1dc1e1de5f2dda50dbd2e6a83355fe7ae38ca0f79daeb404026421af70606653
patch_args="-Np1"
if [ ! "$CROSS_BUILD" ]; then
hostmakedepends+=" help2man"
fi
pre_patch() {
[ ! "$CROSS_BUILD" ] && return
case "${XBPS_TARGET_MACHINE}" in
arm*) _ARCH=arm ;;
i686*) _ARCH=ia32 ;;
*) _ARCH="${XBPS_TARGET_MACHINE%-musl}" ;;
esac
sed -i -e "/^EFI_ARCH=/s/=.*/=${_ARCH}/" \
-e "s,^\(for path in\).*;,\1 ${XBPS_CROSS_BASE}/usr/lib ;," \
-e "/^EFI_CPPFLAGS=/s,I\(/usr/include\),I${XBPS_CROSS_BASE}\1,g" \
configure.ac
sed -i -e "/^man/s/=.*/=/" docs/Makefile.am
}
pre_configure() {
autoreconf -i
}
post_install() {
vmkdir etc/
vinstall "${FILESDIR}/sbsigntool-kernel-hook.conf" 644 \
etc/default sbsigntool-kernel-hook
# grub is 50, I don't use grub
# and I'm not sure about their interaction
vinstall ${FILESDIR}/kernel.d/sbsigntool.post-install 744 \
etc/kernel.d/post-install 40-sbsigntool
}