257.37. purpose-6.31.0
KDE Frameworks: the share menu and its local share targets
6.31.0-1 · LGPL-2.1-or-later AND LGPL-2.0-or-later AND GPL-2.0-or-later · 1.6 SBU · 1.6 MiB, 62 files · 43_toolkits, 98 of 344 · ports/core/kf6/purpose
Homepage: https://invent.kde.org/frameworks/purpose
Why it is in KDOS. The comment above the 61 ports from karchive to kfilemetadata in script/phases/43_toolkits/packages.d/kf6.txt:
The libraries KDE applications are built on, without Plasma.
Purpose is KDE’s share framework: the Share menu of dolphin, gwenview, okular and other KDE applications, and the share dialog Qt Quick applications open. A program asks for the targets that take a given MIME type, and Purpose lists every share plugin whose metadata accepts it and runs the one picked, showing that plugin’s configuration page (a device, a recipient, a file name) first. The port also installs the Share entry of Dolphin’s context menu. The targets it ships act on this machine or on a device the user owns: save as, copy to the clipboard, a mail draft in the default mail program, a Telegram chat, a QR code, a phone or SMS through kdeconnect, and Bluetooth.
Depends on: cmake, ninja, extra-cmake-modules, qt6-qtbase, qt6-qtdeclarative, kcmutils, kconfig, kcoreaddons, ki18n, kio, kirigami, kitemmodels, knotifications, kservice, prison, bluez-qt.
Required by (19): angelfish, audiotube, discover, falkon, gwenview, kamoso, kdenlive, kdevelop, kio-gdrive, koko, labplot, neochat, okular, pimcommon, plasma-browser-integration, plasmatube, skanpage, spectacle, tokodon.
Sources: purpose-6.31.0.tar.xz (189.3 KiB). Every step kpkg takes applies to this port.
Install: script/chroot/exec.sh bash -c 'source script/phases/43_toolkits/phase.env && kpkg install purpose'
build.sh:
cmake -S . -B build -G Ninja \
-D CMAKE_INSTALL_PREFIX=/usr \
-D KDE_INSTALL_LIBDIR=lib \
-D CMAKE_BUILD_TYPE=Release \
-D KDE_INSTALL_USE_QT_SYS_PATHS=ON \
-D BUILD_TESTING=OFF \
-D KF_SKIP_PO_PROCESSING=ON \
-D CMAKE_DISABLE_FIND_PACKAGE_KAccounts6=ON \
-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build
for t in imgur youtube nextcloud reviewboard phabricator; do
[ -n "$(find "$PKG" -name "${t}plugin.so")" ] || {
echo "purpose: no ${t}plugin.so to remove" >&2
exit 1
}
find "$PKG" \( -name "${t}plugin.so" -o -name "${t}plugin_config.qml" \
-o -name "${t}-purpose6.png" \) -delete
find "$PKG" -depth -type d -path "*/org/kde/purpose/$t" -exec rm -rf {} +
done
-D CMAKE_DISABLE_FIND_PACKAGE_KAccounts6=ON— No online-accounts integration. With KAccounts found, the YouTube and Nextcloud targets take their account from it, and theorg.kde.purpose.accountshelperQML module lists its accounts whenever no KOnlineAccounts service is on the session bus; without it the module lists accounts only from that service. kaccounts-integration is not in this port’sdepends, so the switch keeps the result from depending on what the build root holds, and both targets are removed from this package in any case.-D KF_SKIP_PO_PROCESSING=ON—ki18n_install(po)returns at once, so none of the message catalogues inpo/is compiled or installed. kpkg removes every non-English catalogue from the package anyway (see Size and language policy), so the switch only saves build time.
Libraries: libKF6Purpose.so, libKF6PurposeWidgets.so.
Directories: /usr/include/KF6/Purpose, /usr/include/KF6/PurposeWidgets, /usr/lib/cmake/KF6Purpose, /usr/lib/qt6/qml/org/kde/purpose, /usr/share/kf6/purpose, /usr/share/licenses/purpose.
Upstream builds every target it has and offers no switch for one, so the five that upload the file to an online service (imgur, YouTube, Nextcloud, Review Board and Phabricator) are deleted after the install: each target’s plugin, its configuration page, its icon and its QML directory. A target whose plugin is not found stops the build, so a renamed plugin cannot keep its target in the menu without anyone noticing; the loop’s list is the one place to change when a target is added or dropped.
The Bluetooth target stays. Its device list imports org.kde.bluezqt from bluez-qt, which is in depends, and sending runs bluedevil-sendfile from bluedevil. bluedevil is part of the Plasma session, which a 43_toolkits port cannot name in depends; the image installs it with the rest of the session, and where it is missing the target is listed and the send fails. The two KDE Connect targets reach kdeconnect at run time in the same way: the device target lists devices from the KDE Connect daemon, org.kde.kdeconnect on the session bus, and sends through it, and the SMS target starts kdeconnect-sms. The Telegram target starts Telegram Desktop through its desktop entry, failing with “Could not find telegram” where none is installed.