void-packages/srcpkgs/gpgme/template

161 lines
3.9 KiB
Bash

# Template file for 'gpgme'
pkgname=gpgme
version=1.23.2
revision=3
build_style=gnu-configure
build_helper="python3"
configure_args="--enable-fd-passing
--with-libgpg-error-prefix=$XBPS_CROSS_BASE/usr
--with-libassuan-prefix=$XBPS_CROSS_BASE/usr"
hostmakedepends="gnupg pkg-config qt5-host-tools qt5-qmake python3-setuptools
python3-installer python3-build python3-wheel swig qt6-base"
makedepends="libassuan-devel libgpg-error-devel python3-devel
qt5-devel qt6-base-devel"
checkdepends="which gnupg"
short_desc="GnuPG Made Easy"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later, LGPL-2.1-or-later"
homepage="https://www.gnupg.org/software/gpgme/index.html"
changelog="https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gpgme.git;a=blob_plain;f=NEWS;hb=HEAD"
distfiles="https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-${version}.tar.bz2"
checksum=9499e8b1f33cccb6815527a1bc16049d35a6198a6c5fae0185f2bd561bce5224
CXXFLAGS="-D_GLIBCXX_USE_C99_STDIO=1"
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
configure_args+=" ac_cv_sys_file_offset_bits=no"
elif [ "$XBPS_TARGET_WORDSIZE" = "32" ]; then
CFLAGS="-D_FILE_OFFSET_BITS=64 -DLARGEFILE_SOURCE=1"
CXXFLAGS+=" ${CFLAGS}"
fi
do_configure() {
mkdir -p build
mkdir -p build-qt6
cd build
../configure ${configure_args}
cd ../build-qt6
../configure ${configure_args} --enable-languages=qt6,cpp \
MOC=/usr/lib/qt6/libexec/moc
}
do_build() {
local f
make -C build ${makejobs}
make -C build-qt6 ${makejobs}
cd build/lang/python
top_builddir=../.. srcdir=../../../lang/python \
python -m build --wheel --no-isolation
}
do_check() {
make -C build ${makejobs} check
make -C build-qt6 ${makejobs} check
}
do_install() {
make -C build install DESTDIR=${DESTDIR}
make -C build-qt6 install DESTDIR=${DESTDIR}
cd build/lang/python
python -m installer --destdir="${DESTDIR}" dist/*.whl
}
libgpgme_package() {
# posix-util.c call gpgconf to get GnuPG binaries
depends="gnupg>=2"
short_desc+=" - library"
pkg_install() {
vmove "usr/lib/*.so.*"
}
}
gpgme-devel_package() {
depends="libassuan-devel libgpg-error-devel libgpgme>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/lib/pkgconfig
vmove usr/bin/gpgme-config
vmove usr/include/gpgme.h
vmove usr/share
vmove usr/lib/libgpgme.so
}
}
gpgmepp_package() {
short_desc+=" - C++ library"
pkg_install() {
vmove "usr/lib/libgpgmepp.so.*"
}
}
gpgmepp-devel_package() {
depends="gpgme-devel>=${version}_${revision} gpgmepp>=${version}_${revision}"
short_desc+=" - C++ library development files"
pkg_install() {
vmove usr/include/gpgme++
vmove usr/lib/libgpgmepp.so
vmove usr/lib/cmake/Gpgmepp/GpgmeppConfig.cmake
vmove usr/lib/cmake/Gpgmepp/GpgmeppConfigVersion.cmake
}
}
gpgmeqt_package() {
short_desc+=" - Qt5 binding"
pkg_install() {
vmove "usr/lib/libqgpgme.so.*"
}
}
gpgmeqt-headers_package() {
short_desc+=" - Qt binding headers"
pkg_install() {
vmove usr/include/QGpgME
vmove usr/include/qgpgme
}
}
gpgmeqt-devel_package() {
depends="gpgme-devel>=${version}_${revision}
gpgmeqt-headers>=${version}_${revision}
gpgmeqt>=${version}_${revision}"
short_desc+=" - Qt5 binding development files"
pkg_install() {
vmove usr/lib/libqgpgme.so
vmove usr/lib/cmake/QGpgme
}
}
gpgme-qt6_package() {
short_desc+=" - Qt 6 binding"
pkg_install() {
vmove "usr/lib/libqgpgmeqt6.so.*"
}
}
gpgme-qt6-devel_package() {
depends="gpgme-devel>=${version}_${revision}
gpgmeqt-headers>=${version}_${revision}
gpgme-qt6>=${version}_${revision}"
short_desc+=" - Qt 6 binding - development files"
pkg_install() {
vmove usr/lib/libqgpgmeqt6.la
vmove usr/lib/libqgpgmeqt6.so
vmove usr/lib/cmake/QGpgmeQt6
}
}
gpgme-python3_package() {
short_desc+=" - Python binding"
depends="gpgme"
pkg_install() {
vmove $py3_sitelib
rm -r ${PKGDESTDIR}/$py3_sitelib/gpg*.egg
}
}
python3-gpg_package() {
short_desc+=" - Python binding (transitional dummy package)"
build_style=meta
depends="gpgme-python3>=${version}_${revision}"
}