PKGBUILDs/core/gpgme/PKGBUILD

127 lines
2.8 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-07-21 12:00:02 +00:00
pkgrel=6
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/'
2024-07-21 12:00:02 +00:00
license=(
GPL-2.0-or-later
LGPL-2.0-or-later
LGPL-2.1-or-later
)
2023-03-22 18:22:54 +00:00
makedepends=(
'gnupg'
2024-07-21 12:00:02 +00:00
'libassuan'
2023-03-22 18:22:54 +00:00
'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
2024-07-21 12:00:02 +00:00
# prevent excessive overlinking due to libtool
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
2020-05-24 01:05:59 +00:00
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() {
2024-07-21 12:00:02 +00:00
depends=(
'gcc-libs'
'glib2'
'glibc'
'libassuan'
'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')
2024-07-21 12:00:02 +00:00
license+=(MIT)
2020-05-24 01:05:59 +00:00
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*
2024-07-21 12:00:02 +00:00
install -vDm 644 LICENSES "$pkgdir/usr/share/licenses/$pkgname/MIT.txt"
2020-05-24 01:05:59 +00:00
}
2023-05-09 23:10:01 +00:00
package_qgpgme-qt6() {
pkgdesc="Qt6 bindings for GPGme"
2024-07-21 12:00:02 +00:00
depends=(
'gcc-libs'
'glibc'
'gpgme'
'libgpg-error'
'qt6-base'
)
2023-05-09 23:10:01 +00:00
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"
2024-07-21 12:00:02 +00:00
depends=(
'glibc'
'gpgme'
'python'
)
2020-05-24 01:05:59 +00:00
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
}