1 # Maintainer: Tobias Powalowski <tpowa@archlinux.org>
2 # Contributor: Roman Kyrylych <roman@archlinux.org>
3 # Contributor: Sarah Hay <sarah@archlinux.org>
6 pkgname=(gpgme qgpgme python-gpgme)
10 pkgdesc='A C wrapper library for GnuPG'
12 url='https://www.gnupg.org/related_software/gpgme/'
14 makedepends=('libgpg-error' 'gnupg' 'qt5-base' 'python' 'swig')
16 validpgpkeys=('6DAA6E64A76D2840571B4902528897B826403ADA') # Werner Koch (dist signing 2020)
17 source=("https://www.gnupg.org/ftp/gcrypt/${pkgbase}/${pkgbase}-${pkgver}.tar.bz2"{,.sig}
19 sha256sums=('711eabf5dd661b9b04be9edc9ace2a7bc031f6bd9d37a768d02d0efdef108f5f'
21 '5de2f6bcb6b30642d0cbc3fbd86803c9460d732f44a526f44cedee8bb78d291a')
24 cd ${pkgbase}-${pkgver}
25 patch -Np1 -i ../python310.patch
29 cd ${pkgbase}-${pkgver}
33 --disable-fd-passing \
38 # ensure reproducibility of .pyc files
39 touch -d @$SOURCE_DATE_EPOCH lang/python/version.py
40 touch -d @$SOURCE_DATE_EPOCH lang/python/python${_python_ver}-gpg/lib.linux-x86_64-${_python_ver}/gpg/gpgme.py
42 # .pyc files will be created if check() is used - generate them here
47 cd ${pkgbase}-${pkgver}
49 # this test fails with gnupg (FS#66572)
50 sed -i 's#"t-keylist-secret",##' tests/json/t-json.c
54 # ensure reproducibilty whether test-suite is run or not
55 find . -name *.pyc -exec rm {} +
59 depends=('libgpg-error' 'gnupg>=2')
60 options+=('!emptydirs')
61 provides=('libgpgme.so'
64 cd ${pkgbase}-${pkgver}
66 make DESTDIR="${pkgdir}" install
69 rm -r "${pkgdir}"/usr/include/{qgpgme,QGpgME}/
70 rm -r "${pkgdir}"/usr/lib/{cmake/QGpgme/,libqgpgme.*}
71 rm -r "${pkgdir}"/usr/lib/python*
75 pkgdesc="Qt bindings for GPGme"
76 depends=('gpgme' 'qt5-base')
78 cd ${pkgbase}-${pkgver}/lang/qt
80 make DESTDIR="${pkgdir}" install
83 package_python-gpgme() {
84 pkgdesc="Python bindings for GPGme"
85 depends=('gpgme' 'python')
87 cd ${pkgbase}-${pkgver}/lang/python
88 make DESTDIR="${pkgdir}" install