1 # Maintainer: David Runge <dvzrv@archlinux.org>
2 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
3 # Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
4 # Contributor: Gaetan Bisson <bisson@archlinux.org>
5 # Contributor: Tobias Powalowski <tpowa@archlinux.org>
6 # Contributor: Andreas Radke <andyrtr@archlinux.org>
7 # Contributor: Judd Vinet <jvinet@zeroflux.org>
12 pkgdesc='Complete and free implementation of the OpenPGP standard'
13 url='https://www.gnupg.org/'
14 license=(BSD custom CC0 GPL2 GPL3 LGPL3 LGPL2.1 MIT)
16 checkdepends=('openssh')
17 makedepends=('libldap' 'libusb-compat' 'pcsclite')
18 depends=('npth' 'libgpg-error' 'libgcrypt' 'libksba' 'libassuan' 'pinentry'
19 'bzip2' 'libbz2.so' 'readline' 'libreadline.so' 'gnutls' 'sqlite'
22 'libldap: gpg2keys_ldap'
23 'libusb-compat: scdaemon'
28 '5B80C5754298F0CB55D8ED6ABCEF7E294B092E28' # Andre Heinecke (Release Signing Key)
29 '6DAA6E64A76D2840571B4902528897B826403ADA' # Werner Koch (dist signing 2020)
30 'AC8E115BF73E2D8D47FA9908E98E9B2D19C6C8BD' # Niibe Yutaka (GnuPG Release Key)
31 '02F38DFF731FF97CB039A1DA549E695E905BA208' # GnuPG.com (Release Signing Key 2021)
34 "https://gnupg.org/ftp/gcrypt/${pkgname}/${pkgname}-${pkgver}.tar.bz2"{,.sig}
35 # https://bugs.archlinux.org/task/74423 https://dev.gnupg.org/T5935
36 'gnupg-2.2.35-scd-dont-inhibit-ssh-authentication.patch::https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=patch;h=e8fb8e2b3e66d5ea8a3dc90afdc14611abf2c3da'
37 'drop-import-clean.patch'
38 'avoid-beta-warning.patch'
40 sha256sums=('bdfe783810fceca9703b9e811817acca63ee9ef0174e616598e8ea6590aa4c9c'
42 '1b7611a24e813429e56a7d0855c59d33109cb1b59b3586a3dd35935909a493e5'
43 '02d375f0045f56f7dd82bacdb5ce559afd52ded8b75f6b2673c39ec666e81abc'
44 '22fdf9490fad477f225e731c417867d9e7571ac654944e8be63a1fbaccd5c62d')
46 install=$pkgname.install
49 cd "${srcdir}/${pkgname}-${pkgver}"
52 for src in "${source[@]}"; do
55 [[ $src = *.patch ]] || continue
56 msg2 "Applying patch $src..."
57 patch -Np1 < "../$src"
60 # improve reproducibility
67 cd "${srcdir}/${pkgname}-${pkgver}"
72 --libexecdir=/usr/lib/gnupg \
73 --enable-maintainer-mode \
79 cd "${srcdir}/${pkgname}-${pkgver}"
84 local units=({dirmngr,gpg-agent{,-{browser,extra,ssh}}}.socket)
85 local socket_target_dir="$pkgdir/usr/lib/systemd/user/sockets.target.wants/"
88 cd "${srcdir}/${pkgname}-${pkgver}"
89 make DESTDIR="${pkgdir}" install
90 ln -s gpg "${pkgdir}"/usr/bin/gpg2
91 ln -s gpgv "${pkgdir}"/usr/bin/gpgv2
93 install -Dm 644 doc/examples/systemd-user/*.* -t "${pkgdir}/usr/lib/systemd/user"
94 install -Dm 644 COPYING.{CC0,other} -t "${pkgdir}/usr/share/licenses/$pkgname/"
96 install -vdm 755 "$socket_target_dir"
97 for unit in "${units[@]}"; do
98 ln -sv "../$unit" "$socket_target_dir$unit"