PKGBUILDs/core/gpgme/PKGBUILD

100 lines
2.4 KiB
Bash
Raw Normal View History

2020-05-24 01:05:59 +00:00
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
# Contributor: Roman Kyrylych <roman@archlinux.org>
# Contributor: Sarah Hay <sarah@archlinux.org>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
2022-02-08 14:08:13 +00:00
# - add -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 to v7 CPPFLAGS
2020-05-24 01:05:59 +00:00
pkgbase=gpgme
2024-04-27 15:28:10 +00:00
pkgname=(gpgme qgpgme-qt6 python-gpgme)
2023-12-02 00:21:54 +00:00
pkgver=1.23.2
2024-04-27 15:28:10 +00:00
pkgrel=4
2022-02-08 13:47:03 +00:00
pkgdesc='A C wrapper library for GnuPG'
2020-05-24 01:05:59 +00:00
arch=('x86_64')
url='https://www.gnupg.org/related_software/gpgme/'
license=('LGPL')
2023-03-22 18:22:54 +00:00
makedepends=(
'gnupg'
'libgpg-error'
'python'
'python-build'
'python-installer'
'python-setuptools'
'python-wheel'
2023-05-09 23:10:01 +00:00
'qt6-base'
2023-03-22 18:22:54 +00:00
'swig'
)
2023-01-18 00:31:05 +00:00
validpgpkeys=('6DAA6E64A76D2840571B4902528897B826403ADA' # Werner Koch (dist signing 2020)
'AC8E115BF73E2D8D47FA9908E98E9B2D19C6C8BD') # Niibe Yutaka (GnuPG Release Key)
2023-10-27 12:49:43 +00:00
source=("https://www.gnupg.org/ftp/gcrypt/${pkgbase}/${pkgbase}-${pkgver}.tar.bz2"{,.sig})
2023-12-02 00:21:54 +00:00
sha256sums=('9499e8b1f33cccb6815527a1bc16049d35a6198a6c5fae0185f2bd561bce5224'
2023-10-27 12:49:43 +00:00
'SKIP')
2020-05-24 01:05:59 +00:00
2023-05-09 23:10:01 +00:00
prepare() {
2023-08-24 12:58:12 +00:00
cd ${pkgbase}-${pkgver}/
sed -i 's/-unknown//' autogen.sh
autoreconf -fi
2023-05-09 23:10:01 +00:00
}
2020-05-24 01:05:59 +00:00
build() {
cd ${pkgbase}-${pkgver}
2022-02-08 14:08:13 +00:00
[[ $CARCH == "armv7h" ]] && CPPFLAGS+=' -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
2020-05-24 01:05:59 +00:00
./configure \
--prefix=/usr \
--disable-fd-passing \
--disable-static \
--disable-gpgsm-test
make
2023-03-22 18:22:54 +00: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
cd lang/python/
top_builddir="$srcdir/$pkgbase-$pkgver" python -m build --wheel --no-isolation
)
2020-05-24 01:05:59 +00: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')
2022-02-13 15:21:07 +00:00
options+=('!emptydirs')
2020-05-24 01:05:59 +00:00
provides=('libgpgme.so'
'libgpgmepp.so')
cd ${pkgbase}-${pkgver}
make DESTDIR="${pkgdir}" install
# split qgpgme
2024-04-27 15:28:10 +00:00
rm -r "${pkgdir}"/usr/lib/{cmake/QGpgmeQt6/,libqgpgmeqt6.*}
2020-05-24 01:05:59 +00:00
rm -r "${pkgdir}"/usr/lib/python*
}
2023-05-09 23:10:01 +00:00
package_qgpgme-qt6() {
pkgdesc="Qt6 bindings for GPGme"
depends=('gpgme' 'qt6-base')
2024-04-27 15:28:10 +00:00
cd ${pkgbase}-${pkgver}/lang/qt
2023-05-09 23:10:01 +00:00
make DESTDIR="${pkgdir}" install
rm -r "${pkgdir}"/usr/include
2020-05-24 01:05:59 +00:00
}
package_python-gpgme() {
pkgdesc="Python bindings for GPGme"
depends=('gpgme' 'python')
cd ${pkgbase}-${pkgver}/lang/python
2023-03-22 18:22:54 +00:00
python -m installer --destdir="$pkgdir" dist/*.whl
2020-05-24 01:05:59 +00:00
}