db-move: moved gnome-clocks from [testing] to [extra] (x86_64)
[arch-packages.git] / gpgme / repos / testing-x86_64 / PKGBUILD
blobac251badde4b2e8f4649fa3ddf0837bdfbc47e5c
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-qt5 qgpgme-qt6 python-gpgme)
7 pkgver=1.20.0
8 pkgrel=3
9 pkgdesc='A C wrapper library for GnuPG'
10 arch=('x86_64')
11 url='https://www.gnupg.org/related_software/gpgme/'
12 license=('LGPL')
13 makedepends=(
14   'gnupg'
15   'libgpg-error'
16   'python'
17   'python-build'
18   'python-installer'
19   'python-setuptools'
20   'python-wheel'
21   'qt5-base'
22   'qt6-base'
23   'swig'
25 validpgpkeys=('6DAA6E64A76D2840571B4902528897B826403ADA'  # Werner Koch (dist signing 2020)
26               'AC8E115BF73E2D8D47FA9908E98E9B2D19C6C8BD') # Niibe Yutaka (GnuPG Release Key)
27 source=("https://www.gnupg.org/ftp/gcrypt/${pkgbase}/${pkgbase}-${pkgver}.tar.bz2"{,.sig})
28 sha256sums=('25a5785a5da356689001440926b94e967d02e13c49eb7743e35ef0cf22e42750'
29             'SKIP')
31 prepare() {
32 # Building qt5 and qt6 bindings in the same source tree is not supported
33   cp -r ${pkgbase}-${pkgver}{,-qt6}
36 build() {
37   cd ${pkgbase}-${pkgver}
39   ./configure \
40     --prefix=/usr \
41     --disable-fd-passing \
42     --disable-static \
43     --disable-gpgsm-test
44   make
46   (
47     # use a PEP517 workflow to get a reproducible Python package
48     # NOTE: top_builddir is required so that the build takes place against local gpgme, not system gpgme
49     cd lang/python/
50     top_builddir="$srcdir/$pkgbase-$pkgver" python -m build --wheel --no-isolation
51   )
53   cd ../${pkgbase}-${pkgver}-qt6
54   ./configure \
55     --prefix=/usr \
56     --disable-fd-passing \
57     --disable-static \
58     --disable-gpgsm-test \
59     --enable-languages=cpp,qt6
60   make
63 check() {
64   cd ${pkgbase}-${pkgver}
66   # this test fails with gnupg (FS#66572)
67   sed -i 's#"t-keylist-secret",##' tests/json/t-json.c
69   make check
72 package_gpgme() {
73   depends=('libgpg-error' 'gnupg>=2')
74   options+=('!emptydirs')
75   provides=('libgpgme.so'
76             'libgpgmepp.so')
78   cd ${pkgbase}-${pkgver}
80   make DESTDIR="${pkgdir}" install
82   # split qgpgme
83   rm -r "${pkgdir}"/usr/lib/{cmake/QGpgme/,libqgpgme.*}
84   rm -r "${pkgdir}"/usr/lib/python*
87 package_qgpgme-qt5() {
88   pkgdesc="Qt5 bindings for GPGme"
89   depends=('gpgme' 'qt5-base')
90   provides=('qgpgme')
91   replaces=('qgpgme')
93   cd ${pkgbase}-${pkgver}/lang/qt
95   make DESTDIR="${pkgdir}" install
96   rm -r "${pkgdir}"/usr/include
99 package_qgpgme-qt6() {
100   pkgdesc="Qt6 bindings for GPGme"
101   depends=('gpgme' 'qt6-base')
103   cd ${pkgbase}-${pkgver}-qt6/lang/qt
105   make DESTDIR="${pkgdir}" install
106   rm -r "${pkgdir}"/usr/include
109 package_python-gpgme() {
110   pkgdesc="Python bindings for GPGme"
111   depends=('gpgme' 'python')
113   cd ${pkgbase}-${pkgver}/lang/python
114   python -m installer --destdir="$pkgdir" dist/*.whl