PKGBUILDs/core/gpgme/PKGBUILD

95 lines
2.5 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>
# - comment touch on x86 python file
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
pkgname=(gpgme qgpgme python-gpgme)
2022-02-08 13:47:03 +00:00
pkgver=1.17.0
pkgrel=1
2021-12-13 00:41:32 +00:00
_python_ver=3.10
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')
makedepends=('libgpg-error' 'gnupg' 'qt5-base' 'python' 'swig')
2022-02-08 13:47:03 +00:00
options=('debug')
2020-11-19 14:02:31 +00:00
validpgpkeys=('6DAA6E64A76D2840571B4902528897B826403ADA') # Werner Koch (dist signing 2020)
2021-12-13 00:41:32 +00:00
source=("https://www.gnupg.org/ftp/gcrypt/${pkgbase}/${pkgbase}-${pkgver}.tar.bz2"{,.sig}
python310.patch)
2022-02-08 13:47:03 +00:00
sha256sums=('4ed3f50ceb7be2fce2c291414256b20c9ebf4c03fddb922c88cda99c119a69f5'
2021-12-13 00:41:32 +00:00
'SKIP'
'5de2f6bcb6b30642d0cbc3fbd86803c9460d732f44a526f44cedee8bb78d291a')
prepare() {
cd ${pkgbase}-${pkgver}
patch -Np1 -i ../python310.patch
}
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
# ensure reproducibility of .pyc files
touch -d @$SOURCE_DATE_EPOCH lang/python/version.py
#touch -d @$SOURCE_DATE_EPOCH lang/python/python${_python_ver}-gpg/lib.linux-x86_64-${_python_ver}/gpg/gpgme.py
2020-11-19 14:02:31 +00:00
2020-05-24 01:05:59 +00:00
# .pyc files will be created if check() is used - generate them here
2020-11-19 14:02:31 +00:00
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
# ensure reproducibilty whether test-suite is run or not
find . -name *.pyc -exec rm {} +
}
package_gpgme() {
depends=('libgpg-error' 'gnupg>=2')
options=('!emptydirs')
provides=('libgpgme.so'
'libgpgmepp.so')
cd ${pkgbase}-${pkgver}
make DESTDIR="${pkgdir}" install
# split qgpgme
rm -r "${pkgdir}"/usr/include/{qgpgme,QGpgME}/
rm -r "${pkgdir}"/usr/lib/{cmake/QGpgme/,libqgpgme.*}
rm -r "${pkgdir}"/usr/lib/python*
}
package_qgpgme() {
pkgdesc="Qt bindings for GPGme"
depends=('gpgme' 'qt5-base')
cd ${pkgbase}-${pkgver}/lang/qt
make DESTDIR="${pkgdir}" install
}
package_python-gpgme() {
pkgdesc="Python bindings for GPGme"
depends=('gpgme' 'python')
cd ${pkgbase}-${pkgver}/lang/python
make DESTDIR="${pkgdir}" install
}