235.5. qgpgme-2.2.0
The Qt 6 binding to GnuPG Made Easy
| Version | 2.2.0, release 1 |
| Shelf | crypto — Cryptographic libraries, PKCS#11, smartcards and TPM |
| Phase | 43_toolkits (Toolkits), 82 of 344 in build order |
| Licence | GPL-2.0-or-later |
| Homepage | https://www.gnupg.org/software/gpgme/ |
| Build time | 1.8 SBU |
| Installed size | 2.5 MiB in 114 files |
| Recipe | ports/core/crypto/qgpgme/kpkgbuild |
About
QGpgME is the Qt binding to GPGME, built on gpgmepp: job classes that run GnuPG operations asynchronously and report through Qt signals. It is released separately from GPGME. In KDOS it serves kleopatra, the certificate manager; libkleo, KDE’s shared library of key-management classes and widgets; KMail’s messagelib and mailcommon for signed and encrypted mail; akonadi-calendar for signed and encrypted invitations; kget, which checks a download against its OpenPGP signature; and isoimagewriter, which checks an image’s signature before writing it.
Sources
qgpgme-2.2.0.tar.xz(189.5 KiB)
sha2563c6290ff5bfeab981bb48b2951703761f1dbea640cb637beb3560d5fefb0e0b3
upstream: https://gnupg.org/ftp/gcrypt/qgpgme/qgpgme-2.2.0.tar.xz
archive copy: sources-1/crypto--qgpgme-2.2.0.tar.xz
Dependencies
Depends on: cmake, ninja, pkgconf, qt6-qtbase, libgpg-error, gpgme, gpgmepp.
Required by (7): akonadi-calendar, isoimagewriter, kget, kleopatra, libkleo, mailcommon, messagelib.
Optional, off in KDOS
These switches in build.sh turn off a feature whose library is a port here. The recipe may turn each off on purpose, or because the library was not yet a port when the recipe was written; this list cannot tell which.
-DBUILD_WITH_QT5=OFF, line 20: qt5-qtbase (explained with the switches below)
Patches
build.sh applies these; kpkg applies nothing by itself.
release-tarball-version.patch— The same change as gpgmepp’s patch of the same name, to the samecmake/modules/G10GetFullVersion.cmake: a build with no.gitkeeps the plain release version instead of<version>-unknown. In this project the full version reaches only the dist and release targets and Doxygen’s project number.
Installation
From the repository root, inside the build container, this is the line kdosbuild runs for the port:
script/chroot/exec.sh bash -c 'source script/phases/43_toolkits/phase.env && kpkg install qgpgme'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/crypto/qgpgme.
1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.
cd /ports/core/crypto/qgpgme
echo '3c6290ff5bfeab981bb48b2951703761f1dbea640cb637beb3560d5fefb0e0b3 qgpgme-2.2.0.tar.xz' | sha256sum -c -
2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.
SRC_ROOT=/var/cache/kpkg/work/qgpgme
SRC=$SRC_ROOT/qgpgme-2.2.0
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf qgpgme-2.2.0.tar.xz -C "$SRC" --strip-components=1
Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.
3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
patch -p1 -i "$PORT_SRC/release-tarball-version.patch"
mkdir -p build && cd build
cmake .. -G Ninja \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_WITH_QT5=OFF \
-DBUILD_WITH_QT6=ON \
-DBUILD_TESTING=OFF \
-DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON
ninja
DESTDIR=$PKG ninja install
The switches, and why each is set:
-DBUILD_WITH_QT5=OFF,-DBUILD_WITH_QT6=ON— Upstream builds a Qt 5 and a Qt 6 library by default; only the Qt 6 one (libqgpgmeqt6) is built, on qt6-qtbase.-DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON— Do not look for Doxygen, so no API documentation is generated even when it is in the build root.
The common switches of each build system are explained in the Flag glossary.
4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/qgpgme, prunes what the image does not ship, lints the tree and rolls it reproducibly:
tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
--mtime=@$SOURCE_DATE_EPOCH \
--use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
-cf qgpgme-2.2.0-1.tar.xz -C "$PKG" .
5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/qgpgme, and runs the triggers its paths call for.
Contents
Installed libraries: libqgpgmeqt6.so.
Installed directories: /usr/include/qgpgme-qt6, /usr/lib/cmake/QGpgmeQt6, /usr/share/licenses/qgpgme.