jobcore/gpgme/PKGBUILD-arch

96 lines
2.2 KiB
Text
Raw Normal View History

2022-03-20 13:19:37 +01:00
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
# Contributor: Roman Kyrylych <roman@archlinux.org>
# Contributor: Sarah Hay <sarah@archlinux.org>
pkgbase=gpgme
2024-04-24 03:46:24 +02:00
pkgname=(gpgme qgpgme-qt6 python-gpgme)
2023-11-28 19:23:38 +01:00
pkgver=1.23.2
2024-04-24 03:46:24 +02:00
pkgrel=4
2022-03-20 13:19:37 +01:00
pkgdesc='A C wrapper library for GnuPG'
arch=('x86_64')
url='https://www.gnupg.org/related_software/gpgme/'
license=('LGPL')
2023-03-20 19:32:49 +01:00
makedepends=(
'gnupg'
'libgpg-error'
'python'
'python-build'
'python-installer'
'python-setuptools'
'python-wheel'
2023-07-08 23:45:43 +02:00
'qt6-base'
2023-03-20 19:32:49 +01:00
'swig'
)
2023-01-22 17:59:52 +01:00
validpgpkeys=('6DAA6E64A76D2840571B4902528897B826403ADA' # Werner Koch (dist signing 2020)
'AC8E115BF73E2D8D47FA9908E98E9B2D19C6C8BD') # Niibe Yutaka (GnuPG Release Key)
2023-10-25 15:50:20 +02:00
source=("https://www.gnupg.org/ftp/gcrypt/${pkgbase}/${pkgbase}-${pkgver}.tar.bz2"{,.sig})
2023-11-28 19:23:38 +01:00
sha256sums=('9499e8b1f33cccb6815527a1bc16049d35a6198a6c5fae0185f2bd561bce5224'
2023-10-25 15:50:20 +02:00
'SKIP')
2022-03-20 13:19:37 +01:00
2023-07-08 23:45:43 +02:00
prepare() {
2023-08-22 04:22:30 +02:00
cd ${pkgbase}-${pkgver}/
sed -i 's/-unknown//' autogen.sh
autoreconf -fi
2023-07-08 23:45:43 +02:00
}
2022-03-20 13:19:37 +01:00
build() {
cd ${pkgbase}-${pkgver}
./configure \
--prefix=/usr \
--disable-fd-passing \
--disable-static \
--disable-gpgsm-test
make
2023-03-20 19:32:49 +01:00
(
# use a PEP517 workflow to get a reproducible Python package
# NOTE: top_builddir is required so that the build takes place against local gpgme, not system gpgme
2023-03-20 19:32:49 +01:00
cd lang/python/
top_builddir="$srcdir/$pkgbase-$pkgver" python -m build --wheel --no-isolation
2023-03-20 19:32:49 +01:00
)
2022-03-20 13:19:37 +01:00
}
check() {
cd ${pkgbase}-${pkgver}
# this test fails with gnupg (FS#66572)
sed -i 's#"t-keylist-secret",##' tests/json/t-json.c
make check
}
package_gpgme() {
depends=('libgpg-error' 'gnupg>=2')
options+=('!emptydirs')
provides=('libgpgme.so'
'libgpgmepp.so')
cd ${pkgbase}-${pkgver}
make DESTDIR="${pkgdir}" install
# split qgpgme
2024-04-24 03:46:24 +02:00
rm -r "${pkgdir}"/usr/lib/{cmake/QGpgmeQt6/,libqgpgmeqt6.*}
2022-03-20 13:19:37 +01:00
rm -r "${pkgdir}"/usr/lib/python*
}
2023-07-08 23:45:43 +02:00
package_qgpgme-qt6() {
pkgdesc="Qt6 bindings for GPGme"
depends=('gpgme' 'qt6-base')
2024-04-24 03:46:24 +02:00
cd ${pkgbase}-${pkgver}/lang/qt
2023-07-08 23:45:43 +02:00
make DESTDIR="${pkgdir}" install
rm -r "${pkgdir}"/usr/include
2022-03-20 13:19:37 +01:00
}
package_python-gpgme() {
pkgdesc="Python bindings for GPGme"
depends=('gpgme' 'python')
cd ${pkgbase}-${pkgver}/lang/python
2023-03-20 19:32:49 +01:00
python -m installer --destdir="$pkgdir" dist/*.whl
2022-03-20 13:19:37 +01:00
}