133 lines
3.9 KiB
Bash
133 lines
3.9 KiB
Bash
#!/usr/bin/bash
|
|
# JOBoRun : Jwm OpenBox Obarun RUNit
|
|
# Maintainer : Joe Bo Run <joborun@disroot.org>
|
|
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
|
|
# Website : https://pozol.eu
|
|
#-----------------------------------------| DESCRIPTION |---------------------------------------
|
|
|
|
pkgbase=gpgme
|
|
#pkgname=(gpgme qgpgme-qt5 qgpgme-qt6 python-gpgme)
|
|
pkgname=(gpgme python-gpgme) # qgpgme)
|
|
pkgver=1.23.2
|
|
pkgrel=06
|
|
pkgdesc="A C wrapper library for GnuPG"
|
|
#options=('debug') ## uncomment this to have the debug pkg produced
|
|
url='https://www.gnupg.org/related_software/gpgme/'
|
|
makedepends=('gnupg' 'libgpg-error' 'python' 'python-setuptools' 'python-build' 'libassuan'
|
|
'python-installer' 'python-setuptools' 'python-wheel' 'swig') # 'qt5-base')
|
|
source=("https://www.gnupg.org/ftp/gcrypt/${pkgbase}/${pkgbase}-${pkgver}.tar.bz2"{,.sig})
|
|
|
|
prepare() {
|
|
|
|
cd ${pkgbase}-${pkgver}/
|
|
|
|
sed -i 's/-unknown//' autogen.sh
|
|
autoreconf -fi
|
|
|
|
# Building qt5 and qt6 bindings in the same source tree is not supported
|
|
cp -r ${srcdir}/${pkgbase}-${pkgver}{,-qt6}
|
|
}
|
|
|
|
build() {
|
|
cd ${pkgbase}-${pkgver}
|
|
|
|
./configure \
|
|
--prefix=/usr \
|
|
--disable-fd-passing \
|
|
--disable-static \
|
|
--disable-gpgsm-test
|
|
|
|
# prevent excessive overlinking due to libtool
|
|
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
|
|
make
|
|
|
|
(
|
|
# 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
|
|
)
|
|
|
|
# cd ../${pkgbase}-${pkgver}-qt6
|
|
# ./configure \
|
|
# --prefix=/usr \
|
|
# --disable-fd-passing \
|
|
# --disable-static \
|
|
# --disable-gpgsm-test \
|
|
# --enable-languages=cpp \
|
|
# --disable-languages=qt6,qt5
|
|
# make
|
|
}
|
|
|
|
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=('gcc-libs' 'glib2' 'glibc' 'libassuan' 'libgpg-error' 'gnupg>=2')
|
|
options+=('!emptydirs')
|
|
provides=('libgpgme.so'
|
|
'libgpgmepp.so')
|
|
license+=(MIT)
|
|
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*
|
|
install -vDm 644 LICENSES "$pkgdir/usr/share/licenses/$pkgname/MIT.txt"
|
|
}
|
|
|
|
#package_qgpgme-qt5() {
|
|
# pkgdesc="Qt5 bindings for GPGme"
|
|
# depends=('gpgme' 'qt5-base')
|
|
# provides=('qgpgme-qt5')
|
|
# conflicts=('qgpgme')
|
|
# cd ${pkgbase}-${pkgver}-qt5/lang/qt
|
|
#
|
|
# make DESTDIR="${pkgdir}" install
|
|
#}
|
|
#
|
|
#package_qgpgme-qt6() {
|
|
# pkgdesc="Qt6 bindings for GPGme"
|
|
# depends=('gcc-libs' 'glibc' 'gpgme' 'libgpg-error' 'qt6-base')
|
|
#
|
|
# cd ${pkgbase}-${pkgver}-qt6/lang/qt
|
|
#
|
|
# make DESTDIR="${pkgdir}" install
|
|
# rm -r "${pkgdir}"/usr/include
|
|
#}
|
|
|
|
package_python-gpgme() {
|
|
pkgdesc="Python bindings for GPGme"
|
|
depends=('glibc' 'gpgme' 'python')
|
|
cd ${pkgbase}-${pkgver}/lang/python
|
|
python -m installer --destdir="$pkgdir" dist/*.whl
|
|
}
|
|
|
|
#---- arch license gpg-key & sha256sums ----
|
|
|
|
arch=(x86_64)
|
|
|
|
license=(GPL-2.0-or-later LGPL-2.0-or-later LGPL-2.1-or-later)
|
|
|
|
validpgpkeys=('6DAA6E64A76D2840571B4902528897B826403ADA' # Werner Koch (dist signing 2020)
|
|
'AC8E115BF73E2D8D47FA9908E98E9B2D19C6C8BD') # Niibe Yutaka (GnuPG Release Key)
|
|
|
|
sha256sums=(9499e8b1f33cccb6815527a1bc16049d35a6198a6c5fae0185f2bd561bce5224 # gpgme-1.23.2.tar.bz2
|
|
23d825e204c13c22416c2387276a08fa654bfaa9a0dbb1e4e9c8e66044451547) # gpgme-1.23.2.tar.bz2.sig
|
|
|
|
## cc317455d7b5f68035ad994fb7c2cc60fb207df59e84ea4c4f68dd3eb8f5b592 gpgme-1.23.2-06-x86_64.pkg.tar.lz
|
|
## 947b1af6803f06aca523e20e9f40a31d9feb397b88f0fb78ee41b210a7673823 python-gpgme-1.23.2-06-x86_64.pkg.tar.lz
|
|
|
|
##
|