PKGBUILDs/core/gpgme/PKGBUILD

120 lines
2.9 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
2023-05-09 23:10:01 +00:00
pkgname=(gpgme qgpgme-qt5 qgpgme-qt6 python-gpgme)
2023-04-21 12:46:27 +00:00
pkgver=1.20.0
2023-05-09 23:10:01 +00:00
pkgrel=3
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'
'qt5-base'
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-03-22 18:22:54 +00:00
source=("https://www.gnupg.org/ftp/gcrypt/${pkgbase}/${pkgbase}-${pkgver}.tar.bz2"{,.sig})
2023-04-21 12:46:27 +00:00
sha256sums=('25a5785a5da356689001440926b94e967d02e13c49eb7743e35ef0cf22e42750'
2023-03-22 18:22:54 +00:00
'SKIP')
2020-05-24 01:05:59 +00:00
2023-05-09 23:10:01 +00:00
prepare() {
# Building qt5 and qt6 bindings in the same source tree is not supported
cp -r ${pkgbase}-${pkgver}{,-qt6}
}
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
)
2023-05-09 23:10:01 +00:00
cd ../${pkgbase}-${pkgver}-qt6
./configure \
--prefix=/usr \
--disable-fd-passing \
--disable-static \
--disable-gpgsm-test \
--enable-languages=cpp,qt6
make
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
rm -r "${pkgdir}"/usr/lib/{cmake/QGpgme/,libqgpgme.*}
rm -r "${pkgdir}"/usr/lib/python*
}
2023-05-09 23:10:01 +00:00
package_qgpgme-qt5() {
pkgdesc="Qt5 bindings for GPGme"
2020-05-24 01:05:59 +00:00
depends=('gpgme' 'qt5-base')
2023-05-09 23:10:01 +00:00
provides=('qgpgme')
replaces=('qgpgme')
2020-05-24 01:05:59 +00:00
cd ${pkgbase}-${pkgver}/lang/qt
make DESTDIR="${pkgdir}" install
2023-05-09 23:10:01 +00:00
rm -r "${pkgdir}"/usr/include
}
package_qgpgme-qt6() {
pkgdesc="Qt6 bindings for GPGme"
depends=('gpgme' 'qt6-base')
cd ${pkgbase}-${pkgver}-qt6/lang/qt
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
}