pkgname=(gpgme python-gpgme) pkgbase=gpgme pkgver=1.24.1 pkgrel=1 pkgdesc="A C wrapper library for GnuPG" arch=('x86_64') url="https://www.gnupg.org/related_software/gpgme/" license=('GPL-2.0-or-later' 'LGPL-2.0-or-later' 'LGPL-2.1-or-later') makedepends=( 'gnupg' 'libgpg-error' 'libassuan' 'python' 'python-build' 'python-installer' 'python-setuptools' 'python-wheel' 'swig' ) source=(https://www.gnupg.org/ftp/gcrypt/${pkgbase}/${pkgbase}-${pkgver}.tar.bz2) sha256sums=(ea05d0258e71061d61716584ec34cef59330a91340571edc46b78374973ba85f) prepare() { cd ${pkgbase}-${pkgver} sed 's/\[3.12\]/&,[3.13]/' -i configure.ac sed 's/-unknown//' -i autogen.sh autoconf } build() { cd ${pkgbase}-${pkgver} local configure_args=( ${configure_options} ) ./configure ${configure_args[@]} make PYTHONS= ( cd lang/python top_builddir=${srcdir}/${pkgbase}-${pkgver} python3 -m build --wheel --no-isolation ) } package_gpgme() { depends=('gcc-libs' 'glibc' 'gnupg' 'libassuan' 'libgpg-error') options=('!emptydirs') cd ${pkgbase}-${pkgver} make DESTDIR=${pkgdir} install rm -r ${pkgdir}/usr/lib64/python* } package_python-gpgme() { pkgdesc="Python bindings for GPGme" depends=('glibc' 'gpgme' 'python') cd ${pkgbase}-${pkgver}/lang/python python3 -m installer --destdir=${pkgdir} dist/*.whl }