void-packages/srcpkgs/gnupg/template

66 lines
2.1 KiB
Bash

# Template file for 'gnupg'
# minor version updates (2.3-> 2.4) often need a fix in reverse dependencies
pkgname=gnupg
version=2.4.3
revision=1
# We're building outside of the source tree, because upstream told us to:
# https://dev.gnupg.org/T6313#166339
build_wrksrc=build
build_style=gnu-configure
configure_args="$(vopt_enable ldap)
--with-libgcrypt-prefix=${XBPS_CROSS_BASE}/usr
--with-libassuan-prefix=${XBPS_CROSS_BASE}/usr
--with-ksba-prefix=${XBPS_CROSS_BASE}/usr
--with-npth-prefix=${XBPS_CROSS_BASE}/usr
--enable-all-tests"
configure_script="../configure"
hostmakedepends="pkg-config gettext"
makedepends="bzip2-devel gnutls-devel libassuan-devel libcurl-devel
libksba-devel libldap-devel libusb-compat-devel npth-devel sqlite-devel
libgcrypt-devel libgpg-error-devel"
depends="pinentry"
short_desc="GNU Privacy Guard (2.x)"
maintainer="Jan Christian Grünhage <jan.christian@gruenhage.xyz>"
license="GPL-3.0-or-later"
homepage="https://www.gnupg.org/"
distfiles="https://gnupg.org/ftp/gcrypt/gnupg/gnupg-${version}.tar.bz2"
checksum=a271ae6d732f6f4d80c258ad9ee88dd9c94c8fdc33c3e45328c4d7c126bd219d
make_check_pre='env TESTFLAGS="--parallel=${XBPS_MAKEJOBS}"'
build_options="ldap"
build_options_default="ldap"
post_extract() {
mkdir build
}
post_install() {
vmkdir usr/share/examples
mv ${DESTDIR}/usr/share/doc/gnupg/examples \
${DESTDIR}/usr/share/examples/gnupg
}
gnupg2_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - compat package"
pkg_install() {
vmkdir usr/bin
ln -s gpg $PKGDESTDIR/usr/bin/gpg2
ln -s gpgv $PKGDESTDIR/usr/bin/gpgv2
vmkdir usr/share/examples
ln -s gnupg $PKGDESTDIR/usr/share/examples/gnupg2
vmkdir usr/share/doc
ln -s gnupg $PKGDESTDIR/usr/share/doc/gnupg2
}
}
gnupg2-scdaemon_package() {
depends="${sourcepkg}>=${version}_${revision} libpcsclite"
short_desc+=" - smartcard daemon"
pkg_install() {
vmove usr/libexec/scdaemon
vmove usr/share/man/man1/scdaemon.1
vinstall ${FILESDIR}/60-scdaemon.rules 644 /usr/lib/udev/rules.d
vdoc ${FILESDIR}/gnupg2-scdaemon-README.voidlinux README.voidlinux
}
}