# Contributor: Leo # Maintainer: Natanael Copa pkgname=gpgme pkgver=1.21.0 pkgrel=2 pkgdesc="gnupg made easy" url="https://www.gnupg.org/related_software/gpgme/" arch="all" license="LGPL-2.1-or-later GPL-3.0-or-later" # NOTE: gpgme needs at least gpg or gpgsm, but most programs use only gpg. # Some packages depending on gpgme need more GnuPG components (e.g. # gnupg-dirmngr); these must be explicitly defined in the package's depends # (not here!). depends="gpg gpg-agent gpgsm" makedepends=" libassuan-dev libgpg-error-dev py3-setuptools py3-wheel python3-dev qt5-qtbase-dev qt6-qtbase-dev swig texinfo " checkdepends="gnupg" install="$pkgname.post-upgrade gpgmepp.post-upgrade qgpgme.post-upgrade" subpackages=" $pkgname-dev $pkgname-doc gpgmepp py3-gpgme-pyc py3-gpgme:py3 q$pkgname q${pkgname}6 $pkgname-lisp::noarch " source="https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-$pkgver.tar.bz2 lfs64.patch " case "$CARCH" in x86|armhf|armv7) # the tests fail here despite some fixes above; # # FAIL! : AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration() Compared values are not the same # Actual (result.code()) : 1 # Expected (static_cast(GPG_ERR_INV_TIME)): 161 # Loc: [t-addexistingsubkey.cpp(238)] options="$options !check" ;; esac prepare() { default_prepare # can't build qt5+qt6 at once or share the same tree cp -r "$builddir" "$srcdir"/qt6 } build() { ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --localstatedir=/var \ --enable-languages="python cl qt cpp" \ --enable-static \ --disable-dependency-tracking make cd "$srcdir"/qt6 ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --localstatedir=/var \ --enable-languages="qt6 cpp" \ --enable-static \ --disable-dependency-tracking make } package() { make DESTDIR="$pkgdir" install make -C "$srcdir"/qt6 DESTDIR="$pkgdir" install local eggdir="$(echo "$pkgdir"/usr/lib/python3*/site-packages/gpg-$pkgver-*.egg)" mv "$eggdir"/gpg "$pkgdir"/usr/lib/python3*/site-packages/ mv "$eggdir"/EGG-INFO "${eggdir/-linux*/.egg-info}" rm -r "$eggdir" } check() { make check } lisp() { pkgdesc="Common Lisp bindings for GPGME" depends="$depends $pkgname=$pkgver-r$pkgrel" amove usr/share } gpgmepp() { pkgdesc="C++ bindings for GPGME" amove usr/lib/libgpgmepp.so.* } py3() { pkgdesc="Python 3 bindings for $pkgname" depends="$depends $pkgname=$pkgver-r$pkgrel python3" amove usr/lib/python3* } qgpgme() { pkgdesc="Qt5 bindings for GPGME" amove usr/lib/libqgpgme.so.* } qgpgme6() { pkgdesc="Qt6 bindings for GPGME" amove usr/lib/libqgpgmeqt6.so.* } sha512sums=" eb70813d22920d6d54459a4271259edf55d5833edfdd053551ca245521e06a8c19ed02dc93e0c53132a699e6d8c82499f50caf8e390af28468e3549470595b7d gpgme-1.21.0.tar.bz2 14856041423365463d0e479b85c721f88761e507b480dfde3cda2deb2a323055f016125651a55f7c1b821cec76d2721196407c40c37dbe256959d9b3e1fdecf5 lfs64.patch "