jobcore/gnupg/PKGBUILD-arch

112 lines
3.3 KiB
Text

# Maintainer: David Runge <dvzrv@archlinux.org>
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
# Contributor: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Tobias Powalowski <tpowa@archlinux.org>
# Contributor: Andreas Radke <andyrtr@archlinux.org>
# Contributor: Judd Vinet <jvinet@zeroflux.org>
pkgname=gnupg
pkgver=2.2.41
pkgrel=1
pkgdesc='Complete and free implementation of the OpenPGP standard'
arch=('x86_64')
url='https://www.gnupg.org/'
license=(BSD custom custom:CC0 GPL2 GPL3 LGPL3 LGPL2.1 MIT)
depends=(
'bzip2' 'libbz2.so'
'glibc'
'gnutls'
'libgcrypt'
'libgpg-error'
'libksba'
'libassuan' 'libassuan.so'
'npth' 'libnpth.so'
'pinentry'
'readline' 'libreadline.so'
'sqlite'
'zlib'
)
makedepends=('libldap' 'libusb-compat' 'pcsclite')
checkdepends=('openssh')
optdepends=(
'libldap: gpg2keys_ldap'
'libusb-compat: scdaemon'
'pcsclite: scdaemon'
)
install=$pkgname.install
source=(
"https://gnupg.org/ftp/gcrypt/${pkgname}/${pkgname}-${pkgver}.tar.bz2"{,.sig}
'drop-import-clean.patch'
'avoid-beta-warning.patch'
)
sha256sums=('13f3291007a5e8546fcb7bc0c6610ce44aaa9b3995059d4f8145ba09fd5be3e1'
'SKIP'
'02d375f0045f56f7dd82bacdb5ce559afd52ded8b75f6b2673c39ec666e81abc'
'22fdf9490fad477f225e731c417867d9e7571ac654944e8be63a1fbaccd5c62d')
b2sums=('0be2965a646a8636a127f89329030860908b0bbc447381782527459aed85f5276c29e7a2c89f87cb715407d9f1aabbf3ae1765073764d05e422035e8d5962569'
'SKIP'
'd598015e7f27b27840667d1656c083b4ad85d6acdd312e9929854067313a5f28415ee7eecf4d84a4b8da0385b667aaa01a9743461f5c785402a56c238274e376'
'7ea069e81e2d91a3154bcb62516b4b599f34596de277f95ad1ccaba73869c4f84f94f063b65026ba0bc8a72c0fd8e8e182b82346964f67ea78166b6399c923c5')
validpgpkeys=(
'5B80C5754298F0CB55D8ED6ABCEF7E294B092E28' # Andre Heinecke (Release Signing Key)
'6DAA6E64A76D2840571B4902528897B826403ADA' # Werner Koch (dist signing 2020)
'AC8E115BF73E2D8D47FA9908E98E9B2D19C6C8BD' # Niibe Yutaka (GnuPG Release Key)
'02F38DFF731FF97CB039A1DA549E695E905BA208' # GnuPG.com (Release Signing Key 2021)
)
prepare() {
cd "${pkgname}-${pkgver}"
local src
for src in "${source[@]}"; do
src="${src%%::*}"
src="${src##*/}"
[[ $src = *.patch ]] || continue
msg2 "Applying patch $src..."
patch -Np1 < "../$src"
done
# improve reproducibility
rm doc/gnupg.info*
./autogen.sh
}
build() {
cd "${pkgname}-${pkgver}"
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--sbindir=/usr/bin \
--libexecdir=/usr/lib/gnupg \
--enable-maintainer-mode \
make
}
check() {
cd "${pkgname}-${pkgver}"
make check
}
package() {
local units=({dirmngr,gpg-agent{,-{browser,extra,ssh}}}.socket)
local socket_target_dir="$pkgdir/usr/lib/systemd/user/sockets.target.wants/"
local unit
cd "${pkgname}-${pkgver}"
make DESTDIR="${pkgdir}" install
ln -s gpg "${pkgdir}"/usr/bin/gpg2
ln -s gpgv "${pkgdir}"/usr/bin/gpgv2
install -Dm 644 doc/examples/systemd-user/*.* -t "${pkgdir}/usr/lib/systemd/user"
install -Dm 644 COPYING.{CC0,other} -t "${pkgdir}/usr/share/licenses/$pkgname/"
install -vdm 755 "$socket_target_dir"
for unit in "${units[@]}"; do
ln -sv "../$unit" "$socket_target_dir$unit"
done
}
# vim: ts=2 sw=2 et: