OCaml 4.14.0 rebuild
[arch-packages.git] / gpgme / trunk / PKGBUILD
blobe99607346dbdb88e469157c815bcc8450401da52
1 # Maintainer: Tobias Powalowski <tpowa@archlinux.org>
2 # Contributor: Roman Kyrylych <roman@archlinux.org>
3 # Contributor: Sarah Hay <sarah@archlinux.org>
5 pkgbase=gpgme
6 pkgname=(gpgme qgpgme python-gpgme)
7 pkgver=1.17.1
8 pkgrel=1
9 _python_ver=3.10
10 pkgdesc='A C wrapper library for GnuPG'
11 arch=('x86_64')
12 url='https://www.gnupg.org/related_software/gpgme/'
13 license=('LGPL')
14 makedepends=('libgpg-error' 'gnupg' 'qt5-base' 'python' 'swig')
15 options=('debug')
16 validpgpkeys=('6DAA6E64A76D2840571B4902528897B826403ADA') # Werner Koch (dist signing 2020)
17 source=("https://www.gnupg.org/ftp/gcrypt/${pkgbase}/${pkgbase}-${pkgver}.tar.bz2"{,.sig}
18         python310.patch)
19 sha256sums=('711eabf5dd661b9b04be9edc9ace2a7bc031f6bd9d37a768d02d0efdef108f5f'
20             'SKIP'
21             '5de2f6bcb6b30642d0cbc3fbd86803c9460d732f44a526f44cedee8bb78d291a')
23 prepare() {
24   cd ${pkgbase}-${pkgver}
25   patch -Np1 -i ../python310.patch
28 build() {
29   cd ${pkgbase}-${pkgver}
31   ./configure \
32     --prefix=/usr \
33     --disable-fd-passing \
34     --disable-static \
35     --disable-gpgsm-test
36   make
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
46 check() {
47   cd ${pkgbase}-${pkgver}
49   # this test fails with gnupg (FS#66572)
50   sed -i 's#"t-keylist-secret",##' tests/json/t-json.c
52   make check
54   # ensure reproducibilty whether test-suite is run or not
55   find . -name *.pyc -exec rm {} +
58 package_gpgme() {
59   depends=('libgpg-error' 'gnupg>=2')
60   options+=('!emptydirs')
61   provides=('libgpgme.so'
62             'libgpgmepp.so')
64   cd ${pkgbase}-${pkgver}
66   make DESTDIR="${pkgdir}" install
68   # split qgpgme
69   rm -r "${pkgdir}"/usr/include/{qgpgme,QGpgME}/
70   rm -r "${pkgdir}"/usr/lib/{cmake/QGpgme/,libqgpgme.*}
71   rm -r "${pkgdir}"/usr/lib/python*
74 package_qgpgme() {
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