From d1cba29182acb398b7c60bd5a8abaf288603d50b Mon Sep 17 00:00:00 2001 From: Bart Ribbers Date: Tue, 16 Feb 2021 20:04:47 +0100 Subject: [PATCH] temp/plasma*: drop, newer version in Alpine repos --- temp/bluedevil/APKBUILD | 59 - temp/breeze-grub/APKBUILD | 32 - temp/breeze-gtk/APKBUILD | 43 - temp/breeze-plymouth/APKBUILD | 36 - temp/breeze/APKBUILD | 51 - temp/breeze/breeze-light-default.patch | 31 - ...support-for-Alpine-Linux-apk-backend.patch | 3331 ----------------- temp/discover/APKBUILD | 151 - temp/discover/alpine-appstream-data.json | 7 - temp/drkonqi/APKBUILD | 58 - temp/kactivitymanagerd/APKBUILD | 50 - temp/kde-cli-tools/APKBUILD | 70 - temp/kde-gtk-config/APKBUILD | 53 - temp/kdecoration/APKBUILD | 42 - temp/kdeplasma-addons/APKBUILD | 66 - temp/kgamma5/APKBUILD | 45 - temp/khotkeys/APKBUILD | 63 - temp/kinfocenter/APKBUILD | 72 - temp/kmenuedit/APKBUILD | 51 - temp/kscreen/APKBUILD | 57 - temp/kscreenlocker/APKBUILD | 74 - temp/kscreenlocker/kde-np.pam | 10 - temp/kscreenlocker/kde.pam | 11 - temp/ksshaskpass/APKBUILD | 46 - temp/ksysguard/APKBUILD | 55 - temp/kwallet-pam/APKBUILD | 39 - temp/kwayland-integration/APKBUILD | 39 - temp/kwayland-server/APKBUILD | 43 - temp/kwin/APKBUILD | 121 - temp/kwin/fix-build-with-musl.patch | 58 - temp/kwrited/APKBUILD | 39 - temp/libkscreen/APKBUILD | 47 - temp/libksysguard/APKBUILD | 60 - temp/mauikit/APKBUILD | 66 - ...compilation-with-master-kdecoration2.patch | 48 - ...-against-correct-kdecoration-version.patch | 48 - temp/milou/APKBUILD | 48 - temp/oxygen/APKBUILD | 57 - temp/plasma-browser-integration/APKBUILD | 61 - temp/plasma-desktop/APKBUILD | 108 - temp/plasma-disks/APKBUILD | 54 - temp/plasma-integration/APKBUILD | 62 - temp/plasma-nano/APKBUILD | 40 - temp/plasma-nm/APKBUILD | 86 - temp/plasma-pa/APKBUILD | 62 - ...-add-back-panels-if-they-disappeared.patch | 39 - .../0002-fix-logic-error.patch | 26 - .../0003-Use-loop-instead-of-recursion.patch | 53 - temp/plasma-phone-components/APKBUILD | 93 - .../set-postmarketos-wallpaper.patch | 15 - temp/plasma-sdk/APKBUILD | 66 - temp/plasma-thunderbolt/APKBUILD | 51 - temp/plasma-vault/APKBUILD | 52 - temp/plasma-wayland-protocols/APKBUILD | 24 - temp/plasma-workspace-wallpapers/APKBUILD | 31 - temp/plasma-workspace/APKBUILD | 116 - .../dont-crash-if-panelview-not-ready.patch | 30 - temp/plasma/APKBUILD | 78 - temp/plasma/sddm.conf | 3 - temp/plymouth-kcm/APKBUILD | 52 - temp/polkit-kde-agent-1/APKBUILD | 46 - temp/powerdevil/APKBUILD | 74 - temp/qqc2-breeze-style/APKBUILD | 49 - temp/sddm-kcm/APKBUILD | 68 - temp/systemsettings/APKBUILD | 72 - temp/xdg-desktop-portal-kde/APKBUILD | 49 - 66 files changed, 6837 deletions(-) delete mode 100644 temp/bluedevil/APKBUILD delete mode 100644 temp/breeze-grub/APKBUILD delete mode 100644 temp/breeze-gtk/APKBUILD delete mode 100644 temp/breeze-plymouth/APKBUILD delete mode 100644 temp/breeze/APKBUILD delete mode 100644 temp/breeze/breeze-light-default.patch delete mode 100644 temp/discover/0001-Add-support-for-Alpine-Linux-apk-backend.patch delete mode 100644 temp/discover/APKBUILD delete mode 100644 temp/discover/alpine-appstream-data.json delete mode 100644 temp/drkonqi/APKBUILD delete mode 100644 temp/kactivitymanagerd/APKBUILD delete mode 100644 temp/kde-cli-tools/APKBUILD delete mode 100644 temp/kde-gtk-config/APKBUILD delete mode 100644 temp/kdecoration/APKBUILD delete mode 100644 temp/kdeplasma-addons/APKBUILD delete mode 100644 temp/kgamma5/APKBUILD delete mode 100644 temp/khotkeys/APKBUILD delete mode 100644 temp/kinfocenter/APKBUILD delete mode 100644 temp/kmenuedit/APKBUILD delete mode 100644 temp/kscreen/APKBUILD delete mode 100644 temp/kscreenlocker/APKBUILD delete mode 100644 temp/kscreenlocker/kde-np.pam delete mode 100644 temp/kscreenlocker/kde.pam delete mode 100644 temp/ksshaskpass/APKBUILD delete mode 100644 temp/ksysguard/APKBUILD delete mode 100644 temp/kwallet-pam/APKBUILD delete mode 100644 temp/kwayland-integration/APKBUILD delete mode 100644 temp/kwayland-server/APKBUILD delete mode 100644 temp/kwin/APKBUILD delete mode 100644 temp/kwin/fix-build-with-musl.patch delete mode 100644 temp/kwrited/APKBUILD delete mode 100644 temp/libkscreen/APKBUILD delete mode 100644 temp/libksysguard/APKBUILD delete mode 100644 temp/mauikit/APKBUILD delete mode 100644 temp/mauikit/fix-compilation-with-master-kdecoration2.patch delete mode 100644 temp/mauikit/guard-against-correct-kdecoration-version.patch delete mode 100644 temp/milou/APKBUILD delete mode 100644 temp/oxygen/APKBUILD delete mode 100644 temp/plasma-browser-integration/APKBUILD delete mode 100644 temp/plasma-desktop/APKBUILD delete mode 100644 temp/plasma-disks/APKBUILD delete mode 100644 temp/plasma-integration/APKBUILD delete mode 100644 temp/plasma-nano/APKBUILD delete mode 100644 temp/plasma-nm/APKBUILD delete mode 100644 temp/plasma-pa/APKBUILD delete mode 100644 temp/plasma-phone-components/0001-add-back-panels-if-they-disappeared.patch delete mode 100644 temp/plasma-phone-components/0002-fix-logic-error.patch delete mode 100644 temp/plasma-phone-components/0003-Use-loop-instead-of-recursion.patch delete mode 100644 temp/plasma-phone-components/APKBUILD delete mode 100644 temp/plasma-phone-components/set-postmarketos-wallpaper.patch delete mode 100644 temp/plasma-sdk/APKBUILD delete mode 100644 temp/plasma-thunderbolt/APKBUILD delete mode 100644 temp/plasma-vault/APKBUILD delete mode 100644 temp/plasma-wayland-protocols/APKBUILD delete mode 100644 temp/plasma-workspace-wallpapers/APKBUILD delete mode 100644 temp/plasma-workspace/APKBUILD delete mode 100644 temp/plasma-workspace/dont-crash-if-panelview-not-ready.patch delete mode 100644 temp/plasma/APKBUILD delete mode 100644 temp/plasma/sddm.conf delete mode 100644 temp/plymouth-kcm/APKBUILD delete mode 100644 temp/polkit-kde-agent-1/APKBUILD delete mode 100644 temp/powerdevil/APKBUILD delete mode 100644 temp/qqc2-breeze-style/APKBUILD delete mode 100644 temp/sddm-kcm/APKBUILD delete mode 100644 temp/systemsettings/APKBUILD delete mode 100644 temp/xdg-desktop-portal-kde/APKBUILD diff --git a/temp/bluedevil/APKBUILD b/temp/bluedevil/APKBUILD deleted file mode 100644 index 873fabfa1..000000000 --- a/temp/bluedevil/APKBUILD +++ /dev/null @@ -1,59 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=bluedevil -pkgver=5.20.90 -pkgrel=0 -pkgdesc="Integrate the Bluetooth technology within KDE workspace and applications" -# armhf blocked by qt5-qtdeclarative -# s390x blocked by kiconthemes -arch="all !armhf !s390x !mips64" -url="https://kde.org/plasma-desktop/" -license="GPL-2.0-or-later AND LGPL-2.0-or-later AND (LGPL-2.1-only OR LGPL-3.0-only)" -depends=" - bluez - kded - " -makedepends=" - bluez-qt-dev - extra-cmake-modules - kcoreaddons-dev - kdbusaddons-dev - kded - kded-dev - ki18n-dev - kiconthemes-dev - kio-dev - knotifications-dev - kwidgetsaddons-dev - kwindowsystem-dev - plasma-framework-dev - qt5-qtbase-dev - qt5-qtdeclarative-dev - shared-mime-info - " - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/bluedevil-$pkgver.tar.xz" -subpackages="$pkgname-lang" - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -check() { - cd build - CTEST_OUTPUT_ON_FAILURE=TRUE ctest -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} - -sha512sums="5ec3db393b50783e713509d530a0559098ee5374892cb384052d04ec423a34cda841f73d7d68efc31bf550b7b8e86cd985519c34da88bfadd7f9f812cc73ed1a bluedevil-5.20.90.tar.xz" diff --git a/temp/breeze-grub/APKBUILD b/temp/breeze-grub/APKBUILD deleted file mode 100644 index 5e7089612..000000000 --- a/temp/breeze-grub/APKBUILD +++ /dev/null @@ -1,32 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=breeze-grub -pkgver=5.20.90 -pkgrel=0 -pkgdesc="Breeze theme for GRUB" -arch="noarch !s390x !armhf" # armhf blocked by extra-cmake-modules -url="https://kde.org/plasma-desktop/" -license="GPL-3.0-or-later" -depends="grub" -makedepends=" - extra-cmake-modules - grub-mkfont - unifont - " - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/breeze-grub-$pkgver.tar.xz" -options="!check" # No test suite available - -build() { - ./mkfont.sh -} - -package() { - install -d "$pkgdir"/usr/share/grub/themes - cp -r breeze "$pkgdir"/usr/share/grub/themes -} -sha512sums="177e01e4fd821f98f396134a40343b924586ed48ca15d92fc0b6786c2bbab06e9a477ab9da40d80e9fdc70d52a86d23bba623db5165b582980df060199c77a65 breeze-grub-5.20.90.tar.xz" diff --git a/temp/breeze-gtk/APKBUILD b/temp/breeze-gtk/APKBUILD deleted file mode 100644 index 25982f541..000000000 --- a/temp/breeze-gtk/APKBUILD +++ /dev/null @@ -1,43 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=breeze-gtk -pkgver=5.20.90 -pkgrel=0 -pkgdesc="A GTK Theme Built to Match KDE's Breeze" -# armhf blocked by extra-cmake-modules -# s390x blocked by breeze -arch="all !armhf !s390x !mips64" -url="https://kde.org/plasma-desktop/" -license="LGPL-2.1-only" -depends="gtk-engines" -makedepends=" - breeze - breeze-dev - extra-cmake-modules - py3-cairo - sassc - " - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/breeze-gtk-$pkgver.tar.xz" - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -check() { - cd build - CTEST_OUTPUT_ON_FAILURE=TRUE ctest -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} -sha512sums="937b888d66f5214d2576f7c1ad789a7a8a3f3dbc0da32132bc2bcfdbd98b9b6f8370662fd93223f81ba4cf98d74df3bda6a5a994e3fb341a15749cd8d2d11640 breeze-gtk-5.20.90.tar.xz" diff --git a/temp/breeze-plymouth/APKBUILD b/temp/breeze-plymouth/APKBUILD deleted file mode 100644 index c25d3a83b..000000000 --- a/temp/breeze-plymouth/APKBUILD +++ /dev/null @@ -1,36 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=breeze-plymouth -pkgver=5.20.90 -pkgrel=0 -arch="all !armhf" # armhf blocked by extra-cmake-modules -url="https://kde.org/" -pkgdesc="Breeze theme for Plymouth" -license="GPL-2.0-or-later" -depends="plymouth" -makedepends=" - extra-cmake-modules - plymouth-dev - " - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/breeze-plymouth-$pkgver.tar.xz" -options="!check" # No tests - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DDISTRO_NAME="$(grep PRETTY_NAME /etc/os-release | awk -F = '{ print $2 }')" \ - -DDISTRO_VERSION="$(grep VERSION_ID /etc/os-release | awk -F = '{ print $2 }')" - cmake --build build -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} - -sha512sums="e2e50afe6ff4c86cb5b1ed02f099183eff9ff41f8ec6788470413b392b340add12d5b9a614702ea2a8d23cf6675472fb1efc4bbcfedd4773725eda0308ffcb57 breeze-plymouth-5.20.90.tar.xz" diff --git a/temp/breeze/APKBUILD b/temp/breeze/APKBUILD deleted file mode 100644 index 00649a161..000000000 --- a/temp/breeze/APKBUILD +++ /dev/null @@ -1,51 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=breeze -pkgver=5.20.90 -pkgrel=0 -pkgdesc="Artwork, styles and assets for the Breeze visual style for the Plasma Desktop" -# armhf blocked by qt5-qtdeclarative -# mips, mips64, s390x blocked by kiconthemes -arch="all !armhf !s390x !mips !mips64" -url="https://kde.org/plasma-desktop/" -license="GPL-2.0-or-later" -depends_dev=" - kconfigwidgets-dev - kdecoration-dev - kguiaddons-dev - ki18n-dev - kiconthemes-dev - kpackage-dev - kwindowsystem-dev - " -makedepends="$depends_dev - extra-cmake-modules - " - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/breeze-$pkgver.tar.xz - breeze-light-default.patch - " -subpackages="$pkgname-dev $pkgname-lang" - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -check() { - cd build - CTEST_OUTPUT_ON_FAILURE=TRUE ctest -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} -sha512sums="9eb6bc4970c797a36e38b7bcd39aa4cc626df06e52b50fab568d780aea2726b86ff9aacfe0c301871fffe6fe0f0044d49f7e28ee8547d07aeea8ae117a34f520 breeze-5.20.90.tar.xz -cad3251cddf7b4eaccc7b259dbba3c111d149d85f873c8a7d39f22606254f74b56009bc0dfd62b89aef69e2967ca2ecd77faf60802e99b6643fa62647908ac88 breeze-light-default.patch" diff --git a/temp/breeze/breeze-light-default.patch b/temp/breeze/breeze-light-default.patch deleted file mode 100644 index 8ac70d73f..000000000 --- a/temp/breeze/breeze-light-default.patch +++ /dev/null @@ -1,31 +0,0 @@ -From f6a9d492115b7d57e9e0de8e9e2e89acccbe8857 Mon Sep 17 00:00:00 2001 -From: David Redondo -Date: Fri, 22 Jan 2021 16:11:02 +0000 -Subject: [PATCH] kde4breeze: Breeze Light is the new default - -Otherwise this kconf_update binary writes Breeze colors to the users kdeglobals. -I created a new user, added its ~/.config/kdeglobals to auditd and saw that this binary wrote to it. -BUG: 431917 - - -(cherry picked from commit 9d404df129774922efaa744423597f8af7ca9e32) ---- - misc/kde4breeze/src/main.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/misc/kde4breeze/src/main.cpp b/misc/kde4breeze/src/main.cpp -index d4d541b2..af6c9f6b 100644 ---- a/misc/kde4breeze/src/main.cpp -+++ b/misc/kde4breeze/src/main.cpp -@@ -88,7 +88,7 @@ void updateKdeGlobals() - } - - const QString widgetStyle = readConfigValue(lnfConfig, defaultLnfConfig, "KDE", "widgetStyle", "Breeze").toString(); -- const QString colorScheme = readConfigValue(lnfConfig, defaultLnfConfig, "General", "ColorScheme", "Breeze").toString(); -+ const QString colorScheme = readConfigValue(lnfConfig, defaultLnfConfig, "General", "ColorScheme", "BreezeLight").toString(); - const QString icons = readConfigValue(lnfConfig, defaultLnfConfig, "Icons", "Theme", "breeze").toString(); - - cloneColorScheme(colorScheme); --- -GitLab - diff --git a/temp/discover/0001-Add-support-for-Alpine-Linux-apk-backend.patch b/temp/discover/0001-Add-support-for-Alpine-Linux-apk-backend.patch deleted file mode 100644 index c78d78fe3..000000000 --- a/temp/discover/0001-Add-support-for-Alpine-Linux-apk-backend.patch +++ /dev/null @@ -1,3331 +0,0 @@ -From 6fbb948082bad66a821c8332e2fb9cb7965065f8 Mon Sep 17 00:00:00 2001 -From: Alexey Minnekhanov -Date: Sun, 12 Jan 2020 01:02:39 +0300 -Subject: [PATCH] Add support for Alpine Linux apk backend - -Alpine Package Keeper (apk) is package manager -for Alpine Linux. ---- - discover/FeaturedModel.cpp | 6 +- - .../AlpineApkAuthActionFactory.cpp | 118 ++++ - .../AlpineApkAuthActionFactory.h | 41 ++ - .../AlpineApkBackend/AlpineApkAuthHelper.cpp | 302 +++++++++++ - .../AlpineApkBackend/AlpineApkAuthHelper.h | 66 +++ - .../AlpineApkBackend/AlpineApkBackend.cpp | 503 ++++++++++++++++++ - .../AlpineApkBackend/AlpineApkBackend.h | 99 ++++ - .../AlpineApkBackend/AlpineApkResource.cpp | 341 ++++++++++++ - .../AlpineApkBackend/AlpineApkResource.h | 93 ++++ - .../AlpineApkReviewsBackend.cpp | 35 ++ - .../AlpineApkReviewsBackend.h | 52 ++ - .../AlpineApkSourcesBackend.cpp | 195 +++++++ - .../AlpineApkSourcesBackend.h | 57 ++ - .../AlpineApkBackend/AlpineApkTransaction.cpp | 141 +++++ - .../AlpineApkBackend/AlpineApkTransaction.h | 49 ++ - .../AlpineApkBackend/AlpineApkUpdater.cpp | 295 ++++++++++ - .../AlpineApkBackend/AlpineApkUpdater.h | 197 +++++++ - .../AppstreamDataDownloader.cpp | 303 +++++++++++ - .../AppstreamDataDownloader.h | 139 +++++ - .../backends/AlpineApkBackend/CMakeLists.txt | 85 +++ - .../org.kde.discover.alpineapkbackend.actions | 5 + - libdiscover/backends/CMakeLists.txt | 10 + - 22 files changed, 3129 insertions(+), 3 deletions(-) - create mode 100644 libdiscover/backends/AlpineApkBackend/AlpineApkAuthActionFactory.cpp - create mode 100644 libdiscover/backends/AlpineApkBackend/AlpineApkAuthActionFactory.h - create mode 100644 libdiscover/backends/AlpineApkBackend/AlpineApkAuthHelper.cpp - create mode 100644 libdiscover/backends/AlpineApkBackend/AlpineApkAuthHelper.h - create mode 100644 libdiscover/backends/AlpineApkBackend/AlpineApkBackend.cpp - create mode 100644 libdiscover/backends/AlpineApkBackend/AlpineApkBackend.h - create mode 100644 libdiscover/backends/AlpineApkBackend/AlpineApkResource.cpp - create mode 100644 libdiscover/backends/AlpineApkBackend/AlpineApkResource.h - create mode 100644 libdiscover/backends/AlpineApkBackend/AlpineApkReviewsBackend.cpp - create mode 100644 libdiscover/backends/AlpineApkBackend/AlpineApkReviewsBackend.h - create mode 100644 libdiscover/backends/AlpineApkBackend/AlpineApkSourcesBackend.cpp - create mode 100644 libdiscover/backends/AlpineApkBackend/AlpineApkSourcesBackend.h - create mode 100644 libdiscover/backends/AlpineApkBackend/AlpineApkTransaction.cpp - create mode 100644 libdiscover/backends/AlpineApkBackend/AlpineApkTransaction.h - create mode 100644 libdiscover/backends/AlpineApkBackend/AlpineApkUpdater.cpp - create mode 100644 libdiscover/backends/AlpineApkBackend/AlpineApkUpdater.h - create mode 100644 libdiscover/backends/AlpineApkBackend/AppstreamDataDownloader.cpp - create mode 100644 libdiscover/backends/AlpineApkBackend/AppstreamDataDownloader.h - create mode 100644 libdiscover/backends/AlpineApkBackend/CMakeLists.txt - create mode 100644 libdiscover/backends/AlpineApkBackend/org.kde.discover.alpineapkbackend.actions - -diff --git a/discover/FeaturedModel.cpp b/discover/FeaturedModel.cpp -index 1393e206..038f22c1 100644 ---- a/discover/FeaturedModel.cpp -+++ b/discover/FeaturedModel.cpp -@@ -98,13 +98,13 @@ void FeaturedModel::refresh() - setUris(uris); - } - --void FeaturedModel::setUris(const QVector& uris) -+void FeaturedModel::setUris(const QVector &uris) - { - if (!m_backend) - return; - -- QSet streams; -- foreach(const auto &uri, uris) { -+ QSet streams; -+ for (const QUrl &uri: uris) { - AbstractResourcesBackend::Filters filter; - filter.resourceUrl = uri; - streams << m_backend->search(filter); -diff --git a/libdiscover/backends/AlpineApkBackend/AlpineApkAuthActionFactory.cpp b/libdiscover/backends/AlpineApkBackend/AlpineApkAuthActionFactory.cpp -new file mode 100644 -index 00000000..972f8ec5 ---- /dev/null -+++ b/libdiscover/backends/AlpineApkBackend/AlpineApkAuthActionFactory.cpp -@@ -0,0 +1,118 @@ -+/*************************************************************************** -+ * Copyright © 2020 Alexey Min * -+ * * -+ * This program is free software; you can redistribute it and/or * -+ * modify it under the terms of the GNU General Public License as * -+ * published by the Free Software Foundation; either version 2 of * -+ * the License or (at your option) version 3 or any later version * -+ * accepted by the membership of KDE e.V. (or its successor approved * -+ * by the membership of KDE e.V.), which shall act as a proxy * -+ * defined in Section 14 of version 3 of the license. * -+ * * -+ * This program is distributed in the hope that it will be useful, * -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of * -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -+ * GNU General Public License for more details. * -+ * * -+ * You should have received a copy of the GNU General Public License * -+ * along with this program. If not, see . * -+ ***************************************************************************/ -+ -+#include -+#include -+ -+#include "AlpineApkAuthActionFactory.h" -+#include "alpineapk_backend_logging.h" -+ -+namespace ActionFactory { -+ -+static KAuth::Action createAlpineApkKAuthAction() -+{ -+ KAuth::Action action(QStringLiteral("org.kde.discover.alpineapkbackend.pkgmgmt")); -+ action.setHelperId(QStringLiteral("org.kde.discover.alpineapkbackend")); -+ if (!action.isValid()) { -+ qCWarning(LOG_ALPINEAPK) << "Created KAuth action is not valid!"; -+ return action; -+ } -+ -+ // set action description -+ // setDetails deprecated since KF 5.68, use setDetailsV2() with DetailsMap. -+#if KAUTH_VERSION < QT_VERSION_CHECK(5, 68, 0) -+ action.setDetails(i18n("Package management")); -+#else -+ static const KAuth::Action::DetailsMap details{ -+ { KAuth::Action::AuthDetail::DetailMessage, i18n("Package management") } -+ }; -+ action.setDetailsV2(details); -+#endif -+ -+ // change default timeout to 1 minute, bcause default DBus timeout -+ // of 25 seconds is not enough -+ action.setTimeout(1 * 60 * 1000); -+ -+ return action; -+} -+ -+KAuth::ExecuteJob *createUpdateAction(const QString &fakeRoot) -+{ -+ KAuth::Action action = createAlpineApkKAuthAction(); -+ if (!action.isValid()) { -+ return nullptr; -+ } -+ // update-action specific details -+ action.setTimeout(2 * 60 * 1000); // 2 minutes -+ action.addArgument(QLatin1String("pkgAction"), QLatin1String("update")); -+ action.addArgument(QLatin1String("fakeRoot"), fakeRoot); -+ return action.execute(); -+} -+ -+KAuth::ExecuteJob *createUpgradeAction(bool onlySimulate) -+{ -+ KAuth::Action action = createAlpineApkKAuthAction(); -+ if (!action.isValid()) { -+ return nullptr; -+ } -+ action.setTimeout(3 * 60 * 60 * 1000); // 3 hours, system upgrade can take really long -+ action.addArgument(QLatin1String("pkgAction"), QLatin1String("upgrade")); -+ action.addArgument(QLatin1String("onlySimulate"), onlySimulate); -+ return action.execute(); -+} -+ -+KAuth::ExecuteJob *createAddAction(const QString &pkgName) -+{ -+ KAuth::Action action = createAlpineApkKAuthAction(); -+ if (!action.isValid()) { -+ return nullptr; -+ } -+ action.setTimeout(1 * 60 * 60 * 1000); // 1 hour, in case package is really big? -+ action.addArgument(QLatin1String("pkgAction"), QLatin1String("add")); -+ action.addArgument(QLatin1String("pkgName"), pkgName); -+ return action.execute(); -+} -+ -+KAuth::ExecuteJob *createDelAction(const QString &pkgName) -+{ -+ KAuth::Action action = createAlpineApkKAuthAction(); -+ if (!action.isValid()) { -+ return nullptr; -+ } -+ action.setTimeout(1 * 60 * 60 * 1000); // although deletion is almost instant -+ action.addArgument(QLatin1String("pkgAction"), QLatin1String("del")); -+ action.addArgument(QLatin1String("pkgName"), pkgName); -+ return action.execute(); -+} -+ -+KAuth::ExecuteJob *createRepoconfigAction(const QVariant &repoUrls) -+{ -+ KAuth::Action action = createAlpineApkKAuthAction(); -+ if (!action.isValid()) { -+ return nullptr; -+ } -+ // should be instant, writes few lines to /etc/apk/repositories -+ action.setTimeout(1 * 60 * 1000); // 1 minute -+ action.addArgument(QLatin1String("pkgAction"), QLatin1String("repoconfig")); -+ action.addArgument(QLatin1String("repoList"), repoUrls); -+ return action.execute(); -+} -+ -+} // namespace ActionFactory -diff --git a/libdiscover/backends/AlpineApkBackend/AlpineApkAuthActionFactory.h b/libdiscover/backends/AlpineApkBackend/AlpineApkAuthActionFactory.h -new file mode 100644 -index 00000000..ff5667f8 ---- /dev/null -+++ b/libdiscover/backends/AlpineApkBackend/AlpineApkAuthActionFactory.h -@@ -0,0 +1,41 @@ -+/*************************************************************************** -+ * Copyright © 2020 Alexey Min * -+ * * -+ * This program is free software; you can redistribute it and/or * -+ * modify it under the terms of the GNU General Public License as * -+ * published by the Free Software Foundation; either version 2 of * -+ * the License or (at your option) version 3 or any later version * -+ * accepted by the membership of KDE e.V. (or its successor approved * -+ * by the membership of KDE e.V.), which shall act as a proxy * -+ * defined in Section 14 of version 3 of the license. * -+ * * -+ * This program is distributed in the hope that it will be useful, * -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of * -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -+ * GNU General Public License for more details. * -+ * * -+ * You should have received a copy of the GNU General Public License * -+ * along with this program. If not, see . * -+ ***************************************************************************/ -+ -+#ifndef AlpineApkAuthActionFactory_H -+#define AlpineApkAuthActionFactory_H -+ -+#include -+#include -+ -+#include -+#include -+#include -+ -+namespace ActionFactory { -+ -+KAuth::ExecuteJob *createUpdateAction(const QString &fakeRoot); -+KAuth::ExecuteJob *createUpgradeAction(bool onlySimulate = false); -+KAuth::ExecuteJob *createAddAction(const QString &pkgName); -+KAuth::ExecuteJob *createDelAction(const QString &pkgName); -+KAuth::ExecuteJob *createRepoconfigAction(const QVariant &repoUrls); -+ -+} // namespace ActionFactory -+ -+#endif -diff --git a/libdiscover/backends/AlpineApkBackend/AlpineApkAuthHelper.cpp b/libdiscover/backends/AlpineApkBackend/AlpineApkAuthHelper.cpp -new file mode 100644 -index 00000000..97affc01 ---- /dev/null -+++ b/libdiscover/backends/AlpineApkBackend/AlpineApkAuthHelper.cpp -@@ -0,0 +1,302 @@ -+/*************************************************************************** -+ * Copyright © 2020 Alexey Min * -+ * * -+ * This program is free software; you can redistribute it and/or * -+ * modify it under the terms of the GNU General Public License as * -+ * published by the Free Software Foundation; either version 2 of * -+ * the License or (at your option) version 3 or any later version * -+ * accepted by the membership of KDE e.V. (or its successor approved * -+ * by the membership of KDE e.V.), which shall act as a proxy * -+ * defined in Section 14 of version 3 of the license. * -+ * * -+ * This program is distributed in the hope that it will be useful, * -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of * -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -+ * GNU General Public License for more details. * -+ * * -+ * You should have received a copy of the GNU General Public License * -+ * along with this program. If not, see . * -+ ***************************************************************************/ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+#include "AlpineApkAuthHelper.h" -+ -+#ifdef QT_DEBUG -+Q_LOGGING_CATEGORY(LOG_AUTHHELPER, "org.kde.discover.alpineapkbackend.authhelper", QtDebugMsg) -+#else -+Q_LOGGING_CATEGORY(LOG_AUTHHELPER, "org.kde.discover.alpineapkbackend.authhelper", QtWarningMsg) -+#endif -+ -+using namespace KAuth; -+ -+AlpineApkAuthHelper::AlpineApkAuthHelper() {} -+ -+AlpineApkAuthHelper::~AlpineApkAuthHelper() -+{ -+ closeDatabase(); -+} -+ -+bool AlpineApkAuthHelper::openDatabase(const QVariantMap &args, bool readwrite) -+{ -+ // is already opened? -+ if (m_apkdb.isOpen()) { -+ return true; -+ } -+ -+ // maybe set fakeRoot (needs to be done before Database::open() -+ const QString fakeRoot = args.value(QLatin1String("fakeRoot"), QString()).toString(); -+ if (!fakeRoot.isEmpty()) { -+ m_apkdb.setFakeRoot(fakeRoot); -+ } -+ -+ // calculate flags to use during open -+ QtApk::DbOpenFlags fl = QtApk::QTAPK_OPENF_ENABLE_PROGRESSFD; -+ if (readwrite) { -+ fl |= QtApk::QTAPK_OPENF_READWRITE; -+ } -+ -+ if (!m_apkdb.open(fl)) { -+ return false; -+ } -+ return true; -+} -+ -+void AlpineApkAuthHelper::closeDatabase() -+{ -+ // close database only if opened -+ if (m_apkdb.isOpen()) { -+ // this also stops bg thread -+ m_apkdb.close(); -+ } -+} -+ -+void AlpineApkAuthHelper::setupTransactionPostCreate(QtApk::Transaction *trans) -+{ -+ m_currentTransaction = trans; // remember current transaction here -+ -+ // receive progress notifications -+ QObject::connect(trans, &QtApk::Transaction::progressChanged, -+ this, &AlpineApkAuthHelper::reportProgress); -+ -+ // receive error messages -+ QObject::connect(trans, &QtApk::Transaction::errorOccured, -+ this, &AlpineApkAuthHelper::onTransactionError); -+ -+ // what to do when transaction is complete -+ QObject::connect(trans, &QtApk::Transaction::finished, -+ this, &AlpineApkAuthHelper::onTransactionFinished); -+ -+ if (!m_loop) { -+ m_loop = new QEventLoop(this); -+ } -+} -+ -+void AlpineApkAuthHelper::reportProgress(float percent) -+{ -+ int p = static_cast(percent); -+ if (p < 0) p = 0; -+ if (p > 100) p = 100; -+ HelperSupport::progressStep(p); -+} -+ -+void AlpineApkAuthHelper::onTransactionError(const QString &msg) -+{ -+ qCWarning(LOG_AUTHHELPER).nospace() << "ERROR occured in transaction \"" -+ << m_currentTransaction->desc() -+ << "\": " << msg; -+ // construct error message to use in helper reply -+ const QString errMsg = m_currentTransaction->desc() + QLatin1String(" failed: ") + msg; -+ m_actionReply.setErrorDescription(errMsg); -+ m_actionReply.setData({ -+ { QLatin1String("errorString"), errMsg } -+ }); -+ m_trans_ok = false; -+} -+ -+void AlpineApkAuthHelper::onTransactionFinished() -+{ -+ m_lastChangeset = m_currentTransaction->changeset(); -+ m_currentTransaction->deleteLater(); -+ m_currentTransaction = nullptr; -+ m_loop->quit(); -+} -+ -+// single entry point for all package management actions -+ActionReply AlpineApkAuthHelper::pkgmgmt(const QVariantMap &args) -+{ -+ m_actionReply = ActionReply::HelperErrorReply(); -+ HelperSupport::progressStep(0); -+ -+ // actual package management action to perform is passed in "pkgAction" argument -+ if (!args.contains(QLatin1String("pkgAction"))) { -+ m_actionReply.setError(ActionReply::InvalidActionError); -+ m_actionReply.setErrorDescription(QLatin1String("Please pass \'pkgAction\' argument.")); -+ HelperSupport::progressStep(100); -+ return m_actionReply; -+ } -+ -+ const QString pkgAction = args.value(QLatin1String("pkgAction")).toString(); -+ -+ if (pkgAction == QStringLiteral("update")) { -+ update(args); -+ } else if (pkgAction == QStringLiteral("add")) { -+ add(args); -+ } else if (pkgAction == QStringLiteral("del")) { -+ del(args); -+ } else if (pkgAction == QStringLiteral("upgrade")) { -+ upgrade(args); -+ } else if (pkgAction == QStringLiteral("repoconfig")) { -+ repoconfig(args); -+ } else { -+ // error: unknown pkgAction -+ m_actionReply.setError(ActionReply::NoSuchActionError); -+ m_actionReply.setErrorDescription(QLatin1String("Please pass a valid \'pkgAction\' argument. " -+ "Action \"%1\" is not recognized.").arg(pkgAction)); -+ } -+ -+ HelperSupport::progressStep(100); -+ return m_actionReply; -+} -+ -+void AlpineApkAuthHelper::update(const QVariantMap &args) -+{ -+ if (!openDatabase(args)) { -+ m_actionReply.setErrorDescription(QStringLiteral("Failed to open database!")); -+ return; -+ } -+ -+ m_trans_ok = true; -+ QtApk::Transaction *trans = m_apkdb.updatePackageIndex(); -+ setupTransactionPostCreate(trans); -+ -+ trans->start(); -+ m_loop->exec(); -+ -+ if (m_trans_ok) { -+ int updatesCount = m_apkdb.upgradeablePackagesCount(); -+ m_actionReply = ActionReply::SuccessReply(); -+ m_actionReply.setData({ -+ { QLatin1String("updatesCount"), updatesCount } -+ }); -+ } -+} -+ -+void AlpineApkAuthHelper::add(const QVariantMap &args) -+{ -+ if (!openDatabase(args)) { -+ m_actionReply.setErrorDescription(QStringLiteral("Failed to open database!")); -+ return; -+ } -+ -+ const QString pkgName = args.value(QLatin1String("pkgName"), QString()).toString(); -+ if (pkgName.isEmpty()) { -+ m_actionReply.setErrorDescription(QStringLiteral("Specify pkgName for adding!")); -+ return; -+ } -+ -+ m_trans_ok = true; -+ QtApk::Transaction *trans = m_apkdb.add(pkgName); -+ setupTransactionPostCreate(trans); -+ -+ trans->start(); -+ m_loop->exec(); -+ -+ if (m_trans_ok) { -+ m_actionReply = ActionReply::SuccessReply(); -+ } -+} -+ -+void AlpineApkAuthHelper::del(const QVariantMap &args) -+{ -+ if (!openDatabase(args)) { -+ m_actionReply.setErrorDescription(QStringLiteral("Failed to open database!")); -+ return; -+ } -+ -+ const QString pkgName = args.value(QLatin1String("pkgName"), QString()).toString(); -+ if (pkgName.isEmpty()) { -+ m_actionReply.setErrorDescription(QStringLiteral("Specify pkgName for removing!")); -+ return; -+ } -+ -+ const bool delRdepends = args.value(QLatin1String("delRdepends"), false).toBool(); -+ -+ QtApk::DbDelFlags delFlags = QtApk::QTAPK_DEL_DEFAULT; -+ if (delRdepends) { -+ delFlags = QtApk::QTAPK_DEL_RDEPENDS; -+ } -+ -+ m_trans_ok = true; -+ QtApk::Transaction *trans = m_apkdb.del(pkgName, delFlags); -+ setupTransactionPostCreate(trans); -+ -+ trans->start(); -+ m_loop->exec(); -+ -+ if (m_trans_ok) { -+ m_actionReply = ActionReply::SuccessReply(); -+ } -+} -+ -+void AlpineApkAuthHelper::upgrade(const QVariantMap &args) -+{ -+ if (!openDatabase(args)) { -+ m_actionReply.setErrorDescription(QStringLiteral("Failed to open database!")); -+ return; -+ } -+ -+ bool onlySimulate = args.value(QLatin1String("onlySimulate"), false).toBool(); -+ QtApk::DbUpgradeFlags flags = QtApk::QTAPK_UPGRADE_DEFAULT; -+ if (onlySimulate) { -+ flags = QtApk::QTAPK_UPGRADE_SIMULATE; -+ qCDebug(LOG_AUTHHELPER) << "Simulating upgrade run."; -+ } -+ -+ m_trans_ok = true; -+ -+ QtApk::Transaction *trans = m_apkdb.upgrade(flags); -+ setupTransactionPostCreate(trans); -+ -+ trans->start(); -+ m_loop->exec(); -+ -+ if (m_trans_ok) { -+ m_actionReply = ActionReply::SuccessReply(); -+ QVariantMap replyData; -+ const QVector ch = m_lastChangeset.changes(); -+ QVector chVector; -+ QVector pkgVector; -+ for (const QtApk::ChangesetItem &it: ch) { -+ pkgVector << it.newPackage; -+ } -+ replyData.insert(QLatin1String("changes"), QVariant::fromValue(pkgVector)); -+ replyData.insert(QLatin1String("onlySimulate"), onlySimulate); -+ m_actionReply.setData(replyData); -+ } -+} -+ -+void AlpineApkAuthHelper::repoconfig(const QVariantMap &args) -+{ -+ if (args.contains(QLatin1String("repoList"))) { -+ const QVariant v = args.value(QLatin1String("repoList")); -+ const QVector repoVec = v.value>(); -+ if (QtApk::Database::saveRepositories(repoVec)) { -+ m_actionReply = ActionReply::SuccessReply(); // OK -+ } else { -+ m_actionReply.setErrorDescription(QStringLiteral("Failed to write repositories config!")); -+ } -+ } else { -+ m_actionReply.setErrorDescription(QStringLiteral("repoList parameter is missing in request!")); -+ } -+} -+ -+KAUTH_HELPER_MAIN("org.kde.discover.alpineapkbackend", AlpineApkAuthHelper) -diff --git a/libdiscover/backends/AlpineApkBackend/AlpineApkAuthHelper.h b/libdiscover/backends/AlpineApkBackend/AlpineApkAuthHelper.h -new file mode 100644 -index 00000000..240e6ed3 ---- /dev/null -+++ b/libdiscover/backends/AlpineApkBackend/AlpineApkAuthHelper.h -@@ -0,0 +1,66 @@ -+/*************************************************************************** -+ * Copyright © 2020 Alexey Min * -+ * * -+ * This program is free software; you can redistribute it and/or * -+ * modify it under the terms of the GNU General Public License as * -+ * published by the Free Software Foundation; either version 2 of * -+ * the License or (at your option) version 3 or any later version * -+ * accepted by the membership of KDE e.V. (or its successor approved * -+ * by the membership of KDE e.V.), which shall act as a proxy * -+ * defined in Section 14 of version 3 of the license. * -+ * * -+ * This program is distributed in the hope that it will be useful, * -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of * -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -+ * GNU General Public License for more details. * -+ * * -+ * You should have received a copy of the GNU General Public License * -+ * along with this program. If not, see . * -+ ***************************************************************************/ -+ -+#include -+#include -+#include -+#include -+ -+#include -+ -+using namespace KAuth; -+ -+class AlpineApkAuthHelper : public QObject -+{ -+ Q_OBJECT -+public: -+ AlpineApkAuthHelper(); -+ ~AlpineApkAuthHelper() override; -+ -+public Q_SLOTS: -+ // single entry point for all package management operations -+ ActionReply pkgmgmt(const QVariantMap &args); -+ -+protected: -+ // helpers -+ bool openDatabase(const QVariantMap &args, bool readwrite = true); -+ void closeDatabase(); -+ void setupTransactionPostCreate(QtApk::Transaction *trans); -+ -+ // individual pakckage management actions -+ void update(const QVariantMap &args); -+ void add(const QVariantMap &args); -+ void del(const QVariantMap &args); -+ void upgrade(const QVariantMap &args); -+ void repoconfig(const QVariantMap &args); -+ -+protected Q_SLOTS: -+ void reportProgress(float percent); -+ void onTransactionError(const QString &msg); -+ void onTransactionFinished(); -+ -+private: -+ QtApk::DatabaseAsync m_apkdb; // runs transactions in bg thread -+ QtApk::Transaction *m_currentTransaction = nullptr; -+ QEventLoop *m_loop = nullptr; // event loop that will run and wait while bg transaction is in progress -+ ActionReply m_actionReply; // return value for main action slots -+ bool m_trans_ok = true; // flag to indicate if bg transaction was successful -+ QtApk::Changeset m_lastChangeset; // changeset from last completed transaction -+}; -diff --git a/libdiscover/backends/AlpineApkBackend/AlpineApkBackend.cpp b/libdiscover/backends/AlpineApkBackend/AlpineApkBackend.cpp -new file mode 100644 -index 00000000..4bfe165b ---- /dev/null -+++ b/libdiscover/backends/AlpineApkBackend/AlpineApkBackend.cpp -@@ -0,0 +1,503 @@ -+/*************************************************************************** -+ * Copyright © 2020 Alexey Min * -+ * * -+ * This program is free software; you can redistribute it and/or * -+ * modify it under the terms of the GNU General Public License as * -+ * published by the Free Software Foundation; either version 2 of * -+ * the License or (at your option) version 3 or any later version * -+ * accepted by the membership of KDE e.V. (or its successor approved * -+ * by the membership of KDE e.V.), which shall act as a proxy * -+ * defined in Section 14 of version 3 of the license. * -+ * * -+ * This program is distributed in the hope that it will be useful, * -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of * -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -+ * GNU General Public License for more details. * -+ * * -+ * You should have received a copy of the GNU General Public License * -+ * along with this program. If not, see . * -+ ***************************************************************************/ -+ -+#include "AlpineApkBackend.h" -+#include "AlpineApkResource.h" -+#include "AlpineApkReviewsBackend.h" -+#include "AlpineApkTransaction.h" -+#include "AlpineApkSourcesBackend.h" -+#include "AlpineApkUpdater.h" -+#include "AppstreamDataDownloader.h" -+#include "alpineapk_backend_logging.h" // generated by ECM -+ -+#include "resources/SourcesModel.h" -+#include "Transaction/Transaction.h" -+#include "Category/Category.h" -+ -+#include -+ -+#include -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+DISCOVER_BACKEND_PLUGIN(AlpineApkBackend) -+ -+AlpineApkBackend::AlpineApkBackend(QObject *parent) -+ : AbstractResourcesBackend(parent) -+ , m_updater(new AlpineApkUpdater(this)) -+ , m_reviews(new AlpineApkReviewsBackend(this)) -+ , m_updatesTimeoutTimer(new QTimer(this)) -+{ -+#ifndef QT_DEBUG -+ const_cast(LOG_ALPINEAPK()).setEnabled(QtDebugMsg, false); -+#endif -+ -+ // connections with our updater -+ QObject::connect(m_updater, &AlpineApkUpdater::updatesCountChanged, -+ this, &AlpineApkBackend::updatesCountChanged); -+ QObject::connect(m_updater, &AlpineApkUpdater::checkForUpdatesFinished, -+ this, &AlpineApkBackend::finishCheckForUpdates); -+ QObject::connect(m_updater, &AlpineApkUpdater::fetchingUpdatesProgressChanged, -+ this, &AlpineApkBackend::setFetchingUpdatesProgress); -+ -+ // safety measure: make sure update check process can finish in some finite time -+ QObject::connect(m_updatesTimeoutTimer, &QTimer::timeout, -+ this, &AlpineApkBackend::finishCheckForUpdates); -+ m_updatesTimeoutTimer->setTimerType(Qt::CoarseTimer); -+ m_updatesTimeoutTimer->setSingleShot(true); -+ m_updatesTimeoutTimer->setInterval(5 * 60 * 1000); // 5 minutes -+ -+ // load packages data in a separate thread; it takes a noticeable amount of time -+ // and this way UI is not blocked here -+ m_fetching = true; // we are busy! -+ QFuture loadResFuture = QtConcurrent::run(QThreadPool::globalInstance(), this, -+ &AlpineApkBackend::loadResources); -+ -+ QObject::connect(&m_voidFutureWatcher, &QFutureWatcher::finished, -+ this, &AlpineApkBackend::onLoadResourcesFinished); -+ m_voidFutureWatcher.setFuture(loadResFuture); -+ -+ SourcesModel::global()->addSourcesBackend(new AlpineApkSourcesBackend(this)); -+} -+ -+// this fills in m_appStreamComponents -+void AlpineApkBackend::loadAppStreamComponents() -+{ -+ AppStream::Pool *appStreamPool = new AppStream::Pool(); -+ appStreamPool->setFlags(AppStream::Pool::FlagReadCollection | -+ AppStream::Pool::FlagReadMetainfo | -+ AppStream::Pool::FlagReadDesktopFiles); -+ appStreamPool->setCacheFlags(AppStream::Pool::CacheFlagUseUser | -+ AppStream::Pool::CacheFlagUseSystem); -+ -+ // hey hey! cool stuff -+ appStreamPool->addMetadataLocation(AppstreamDataDownloader::getAppStreamCacheDir()); -+ -+ if (!appStreamPool->load()) { -+ qCWarning(LOG_ALPINEAPK) << "backend: Failed to load appstream data:" -+ << appStreamPool->lastError(); -+ } else { -+ m_appStreamComponents = appStreamPool->components(); -+ qCDebug(LOG_ALPINEAPK) << "backend: loaded AppStream metadata OK:" -+ << m_appStreamComponents.size() << "components."; -+ // collect all categories present in appstream metadata -+ // QSet collectedCategories; -+ // for (const AppStream::Component &component : m_appStreamComponents) { -+ // const QStringList cats = component.categories(); -+ // for (const QString &cat : cats) { -+ // collectedCategories.insert(cat); -+ // } -+ // } -+ // for (const QString &cat : collectedCategories) { -+ // qCDebug(LOG_ALPINEAPK) << " collected category: " << cat; -+ // m_collectedCategories << cat; -+ // } -+ } -+ delete appStreamPool; -+} -+ -+// this uses m_appStreamComponents and m_availablePackages -+// to fill in m_resourcesAppstreamData -+void AlpineApkBackend::parseAppStreamMetadata() -+{ -+ if (m_availablePackages.size() > 0) { -+ -+ for (const QtApk::Package &pkg: qAsConst(m_availablePackages)) { -+ -+ // try to find appstream data for this package -+ AppStream::Component appstreamComponent; -+ for (const auto& appsC : qAsConst(m_appStreamComponents)) { -+ // find result which package name is exactly the one we want -+ if (appsC.packageNames().contains(pkg.name)) { -+ // workaround for kate (Kate Sessions is found first, but -+ // package name = "kate" too, bugged metadata?) -+ if (pkg.name == QStringLiteral("kate")) { -+ // qCDebug(LOG_ALPINEAPK) << appsC.packageNames() << appsC.id(); -+ // ^^ ("kate") "org.kde.plasma.katesessions" -+ if (appsC.id() != QStringLiteral("org.kde.kate")) { -+ continue; -+ } -+ } -+ appstreamComponent = appsC; -+ break; // exit for() loop -+ } -+ } -+ -+ const QString key = pkg.name.toLower(); -+ m_resourcesAppstreamData.insert(key, appstreamComponent); -+ } -+ } -+} -+ -+static AbstractResource::Type toDiscoverResourceType(const AppStream::Component &component) -+{ -+ AbstractResource::Type resType = AbstractResource::Type::Technical; // default -+ // determine resource type here -+ switch (component.kind()) { -+ case AppStream::Component::KindDesktopApp: -+ case AppStream::Component::KindConsoleApp: -+ case AppStream::Component::KindWebApp: -+ resType = AbstractResource::Type::Application; -+ break; -+ case AppStream::Component::KindAddon: -+ resType = AbstractResource::Type::Addon; -+ break; -+ default: -+ resType = AbstractResource::Type::Technical; -+ break; -+ } -+ return resType; -+} -+ -+void AlpineApkBackend::fillResourcesAndApplyAppStreamData() -+{ -+ // now the tricky part - we need to reapply appstream component metadata to each resource -+ if (m_availablePackages.size() > 0) { -+ for (const QtApk::Package &pkg: m_availablePackages) { -+ const QString key = pkg.name.toLower(); -+ -+ AppStream::Component &appsComponent = m_resourcesAppstreamData[key]; -+ const AbstractResource::Type resType = toDiscoverResourceType(appsComponent); -+ -+ AlpineApkResource *res = m_resources.value(key, nullptr); -+ if (res == nullptr) { -+ // during first run of this function during initial load -+ // m_resources hash is empty, so we need to insert new items -+ res = new AlpineApkResource(pkg, appsComponent, resType, this); -+ res->setCategoryName(QStringLiteral("alpine_packages")); -+ res->setOriginSource(QStringLiteral("apk")); -+ res->setSection(QStringLiteral("dummy")); -+ m_resources.insert(key, res); -+ QObject::connect(res, &AlpineApkResource::stateChanged, -+ this, &AlpineApkBackend::updatesCountChanged); -+ } else { -+ // this is not an initial run, just update existing resource -+ res->setAppStreamData(appsComponent); -+ } -+ } -+ } -+} -+ -+void AlpineApkBackend::reloadAppStreamMetadata() -+{ -+ // mark us as "Loading..." -+ m_fetching = true; -+ emit fetchingChanged(); -+ -+ loadAppStreamComponents(); -+ parseAppStreamMetadata(); -+ fillResourcesAndApplyAppStreamData(); -+ -+ // mark us as "done loading" -+ m_fetching = false; -+ emit fetchingChanged(); -+} -+ -+// this function is executed in the background thread -+void AlpineApkBackend::loadResources() -+{ -+ Q_EMIT this->passiveMessage(i18n("Loading, please wait...")); -+ -+ qCDebug(LOG_ALPINEAPK) << "backend: loading AppStream metadata..."; -+ -+ loadAppStreamComponents(); -+ -+ qCDebug(LOG_ALPINEAPK) << "backend: populating resources..."; -+ -+ if (m_apkdb.open(QtApk::QTAPK_OPENF_READONLY)) { -+ m_availablePackages = m_apkdb.getAvailablePackages(); -+ m_installedPackages = m_apkdb.getInstalledPackages(); -+ m_apkdb.close(); -+ } -+ -+ parseAppStreamMetadata(); -+ -+ qCDebug(LOG_ALPINEAPK) << " available" << m_availablePackages.size() -+ << "packages"; -+ qCDebug(LOG_ALPINEAPK) << " installed" << m_installedPackages.size() -+ << "packages"; -+} -+ -+void AlpineApkBackend::onLoadResourcesFinished() -+{ -+ qCDebug(LOG_ALPINEAPK) << "backend: appstream data loaded and sorted; fill in resources"; -+ -+ fillResourcesAndApplyAppStreamData(); -+ -+ // update "installed/not installed" state -+ if (m_installedPackages.size() > 0) { -+ for (const QtApk::Package &pkg: m_installedPackages) { -+ const QString key = pkg.name.toLower(); -+ if (m_resources.contains(key)) { -+ m_resources.value(key)->setState(AbstractResource::Installed); -+ } -+ } -+ } -+ -+ qCDebug(LOG_ALPINEAPK) << "backend: resources loaded."; -+ -+ m_fetching = false; -+ emit fetchingChanged(); -+ // ^^ this causes the UI to update "Featured" page and show -+ // to user that we actually have loaded packages data -+ -+ // schedule check for updates 1 sec after we've loaded all resources -+ QTimer::singleShot(1000, this, &AlpineApkBackend::checkForUpdates); -+ -+ // AppStream appdata downloader can download updated metadata files -+ // in a background thread. When potential download is finished, -+ // appstream data will be reloaded. -+ m_appstreamDownloader = new AppstreamDataDownloader(nullptr); -+ QObject::connect(m_appstreamDownloader, &AppstreamDataDownloader::downloadFinished, -+ this, &AlpineApkBackend::onAppstreamDataDownloaded, Qt::QueuedConnection); -+ m_appstreamDownloader->start(); -+} -+ -+void AlpineApkBackend::onAppstreamDataDownloaded() -+{ -+ if (m_appstreamDownloader) { -+ if (m_appstreamDownloader->cacheWasUpdated()) { -+ // it means we need to reload previously loaded appstream metadata -+ // m_fetching is true if loadResources() is still executing -+ // in a background thread -+ if (!m_fetching) { -+ qCDebug(LOG_ALPINEAPK) << "AppStream metadata was updated; re-applying it to all resources"; -+ reloadAppStreamMetadata(); -+ } else { -+ qCWarning(LOG_ALPINEAPK) << "AppStream metadata was updated, but cannot apply it: still fetching"; -+ // it should not really happen, but if it happens, -+ // then downloaded metadata will be used on the next -+ // discover launch anyway. -+ } -+ } -+ delete m_appstreamDownloader; -+ m_appstreamDownloader = nullptr; -+ } -+} -+ -+QVector AlpineApkBackend::category() const -+{ -+ static QPair s_apkFlt( -+ FilterType::CategoryFilter, QLatin1String("alpine_packages")); -+ -+ // Display a single root category -+ // we could add more, but Alpine apk does not have this concept -+ static Category *s_rootCat = new Category( -+ i18nc("Root category name", "Alpine Linux packages"), -+ QStringLiteral("package-x-generic"), // icon -+ { s_apkFlt }, // orFilters - include packages that match filter -+ { displayName() }, // pluginName -+ {}, // subCategories - none -+ QUrl(), // decoration (what is it?) -+ false // isAddons -+ ); -+ -+ return { s_rootCat }; -+ -+// static QVector s_cats; -+// if (s_cats.isEmpty()) { -+// // fill only once -+// s_cats << s_rootCat; -+// for (const QString &scat : m_collectedCategories) { -+// Category *cat = new Category( -+// scat, // name -+// QStringLiteral("package-x-generic"), // icon -+// {}, // orFilters -+// { displayName() }, // pluginName -+// {}, // subcategories -+// QUrl(), // decoration -+// false // isAddons -+// ); -+// s_cats << cat; -+// } -+// } -+// return s_cats; -+ // ^^ causes deep hang in discover in recalculating QML bindings -+} -+ -+int AlpineApkBackend::updatesCount() const -+{ -+ return m_updater->updatesCount(); -+} -+ -+ResultsStream *AlpineApkBackend::search(const AbstractResourcesBackend::Filters &filter) -+{ -+ QVector ret; -+ if (!filter.resourceUrl.isEmpty()) { -+ return findResourceByPackageName(filter.resourceUrl); -+ } else { -+ for (AbstractResource *resource: qAsConst(m_resources)) { -+ // skip technical package types (not apps/addons) -+ // that are not upgradeable -+ // (does not work because for now all Alpine packages are "technical" -+ // if (resource->type() == AbstractResource::Technical -+ // && filter.state != AbstractResource::Upgradeable) { -+ // continue; -+ // } -+ -+ // skip not-requested states -+ if (resource->state() < filter.state) { -+ continue; -+ } -+ -+ if(resource->name().contains(filter.search, Qt::CaseInsensitive) -+ || resource->comment().contains(filter.search, Qt::CaseInsensitive)) { -+ ret += resource; -+ } -+ } -+ } -+ return new ResultsStream(QStringLiteral("AlpineApkStream"), ret); -+} -+ -+ResultsStream *AlpineApkBackend::findResourceByPackageName(const QUrl &searchUrl) -+{ -+// if (search.isLocalFile()) { -+// AlpineApkResource* res = new AlpineApkResource( -+// search.fileName(), AbstractResource::Technical, this); -+// res->setSize(666); -+// res->setState(AbstractResource::None); -+// m_resources.insert(res->packageName(), res); -+// connect(res, &AlpineApkResource::stateChanged, this, &AlpineApkBackend::updatesCountChanged); -+// return new ResultsStream(QStringLiteral("AlpineApkStream-local"), { res }); -+// } -+ -+ AlpineApkResource *result = nullptr; -+ -+ // QUrl("appstream://org.kde.krita.desktop") -+ // smart workaround for appstream URLs - handle "featured" apps -+ if (searchUrl.scheme() == QLatin1String("appstream")) { -+ // remove leading "org.kde." -+ QString pkgName = searchUrl.host(); -+ if (pkgName.startsWith(QLatin1String("org.kde."))) { -+ pkgName = pkgName.mid(8); -+ } -+ // remove trailing ".desktop" -+ if (pkgName.endsWith(QLatin1String(".desktop"))) { -+ pkgName = pkgName.left(pkgName.length() - 8); -+ } -+ // now we can search for "krita" package -+ result = m_resources.value(pkgName); -+ } -+ -+ // QUrl("apk://krita") -+ // handle packages from Alpine repos -+ if (searchUrl.scheme() == QLatin1String("apk")) { -+ const QString pkgName = searchUrl.host(); -+ result = m_resources.value(pkgName); -+ } -+ -+ if (!result) { -+ return new ResultsStream(QStringLiteral("AlpineApkStream"), {}); -+ } -+ return new ResultsStream(QStringLiteral("AlpineApkStream"), { result }); -+} -+ -+AbstractBackendUpdater *AlpineApkBackend::backendUpdater() const -+{ -+ return m_updater; -+} -+ -+AbstractReviewsBackend *AlpineApkBackend::reviewsBackend() const -+{ -+ return m_reviews; -+} -+ -+Transaction* AlpineApkBackend::installApplication(AbstractResource *app, const AddonList &addons) -+{ -+ return new AlpineApkTransaction(qobject_cast(app), -+ addons, Transaction::InstallRole); -+} -+ -+Transaction* AlpineApkBackend::installApplication(AbstractResource *app) -+{ -+ return new AlpineApkTransaction(qobject_cast(app), -+ Transaction::InstallRole); -+} -+ -+Transaction* AlpineApkBackend::removeApplication(AbstractResource *app) -+{ -+ return new AlpineApkTransaction(qobject_cast(app), -+ Transaction::RemoveRole); -+} -+ -+int AlpineApkBackend::fetchingUpdatesProgress() const -+{ -+ if (!m_fetching) return 100; -+ return m_fetchProgress; -+} -+ -+void AlpineApkBackend::checkForUpdates() -+{ -+ if (m_fetching) { -+ qCDebug(LOG_ALPINEAPK) << "backend: checkForUpdates(): already fetching"; -+ return; -+ } -+ -+ qCDebug(LOG_ALPINEAPK) << "backend: start checkForUpdates()"; -+ -+ // safety measure - finish updates check in some time -+ m_updatesTimeoutTimer->start(); -+ -+ // let our updater do the job -+ m_updater->startCheckForUpdates(); -+ -+ // update UI -+ m_fetching = true; -+ m_fetchProgress = 0; -+ emit fetchingChanged(); -+ emit fetchingUpdatesProgressChanged(); -+} -+ -+void AlpineApkBackend::finishCheckForUpdates() -+{ -+ m_updatesTimeoutTimer->stop(); // stop safety timer -+ // update UI -+ m_fetching = false; -+ emit fetchingChanged(); -+ emit fetchingUpdatesProgressChanged(); -+} -+ -+QString AlpineApkBackend::displayName() const -+{ -+ return i18nc("Backend plugin display name", "Alpine APK backend"); -+} -+ -+bool AlpineApkBackend::hasApplications() const -+{ -+ return true; -+} -+ -+void AlpineApkBackend::setFetchingUpdatesProgress(int percent) -+{ -+ m_fetchProgress = percent; -+ emit fetchingUpdatesProgressChanged(); -+} -+ -+// needed because DISCOVER_BACKEND_PLUGIN(AlpineApkBackend) contains Q_OBJECT -+#include "AlpineApkBackend.moc" -diff --git a/libdiscover/backends/AlpineApkBackend/AlpineApkBackend.h b/libdiscover/backends/AlpineApkBackend/AlpineApkBackend.h -new file mode 100644 -index 00000000..07b6b7be ---- /dev/null -+++ b/libdiscover/backends/AlpineApkBackend/AlpineApkBackend.h -@@ -0,0 +1,99 @@ -+/*************************************************************************** -+ * Copyright © 2020 Alexey Min * -+ * * -+ * This program is free software; you can redistribute it and/or * -+ * modify it under the terms of the GNU General Public License as * -+ * published by the Free Software Foundation; either version 2 of * -+ * the License or (at your option) version 3 or any later version * -+ * accepted by the membership of KDE e.V. (or its successor approved * -+ * by the membership of KDE e.V.), which shall act as a proxy * -+ * defined in Section 14 of version 3 of the license. * -+ * * -+ * This program is distributed in the hope that it will be useful, * -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of * -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -+ * GNU General Public License for more details. * -+ * * -+ * You should have received a copy of the GNU General Public License * -+ * along with this program. If not, see . * -+ ***************************************************************************/ -+ -+#ifndef AlpineApkBackend_H -+#define AlpineApkBackend_H -+ -+#include -+ -+#include -+#include -+ -+#include -+ -+#include -+ -+class AlpineApkReviewsBackend; -+class AlpineApkUpdater; -+class AlpineApkResource; -+class AppstreamDataDownloader; -+class KJob; -+class QTimer; -+ -+class AlpineApkBackend : public AbstractResourcesBackend -+{ -+ Q_OBJECT -+ -+public: -+ explicit AlpineApkBackend(QObject *parent = nullptr); -+ -+ QVector category() const override; -+ int updatesCount() const override; -+ AbstractBackendUpdater *backendUpdater() const override; -+ AbstractReviewsBackend *reviewsBackend() const override; -+ ResultsStream *search(const AbstractResourcesBackend::Filters &filter) override; -+ ResultsStream *findResourceByPackageName(const QUrl &search); -+ QHash resources() const { return m_resources; } -+ QHash *resourcesPtr() { return &m_resources; } -+ bool isValid() const override { return true; } // No external file dependencies that could cause runtime errors -+ -+ Transaction *installApplication(AbstractResource *app) override; -+ Transaction *installApplication(AbstractResource *app, const AddonList &addons) override; -+ Transaction *removeApplication(AbstractResource *app) override; -+ bool isFetching() const override { return m_fetching; } -+ int fetchingUpdatesProgress() const override; -+ void checkForUpdates() override; -+ QString displayName() const override; -+ bool hasApplications() const override; -+ -+public Q_SLOTS: -+ void setFetchingUpdatesProgress(int percent); -+ -+private Q_SLOTS: -+ void finishCheckForUpdates(); -+ void loadAppStreamComponents(); -+ void parseAppStreamMetadata(); -+ void reloadAppStreamMetadata(); -+ void fillResourcesAndApplyAppStreamData(); -+ void loadResources(); -+ void onLoadResourcesFinished(); -+ void onAppstreamDataDownloaded(); -+ -+public: -+ QtApk::Database *apkdb() { return &m_apkdb; } -+ -+private: -+ QHash m_resources; -+ QHash m_resourcesAppstreamData; -+ AlpineApkUpdater *m_updater; -+ AlpineApkReviewsBackend *m_reviews; -+ QtApk::Database m_apkdb; -+ QVector m_availablePackages; -+ QVector m_installedPackages; -+ bool m_fetching = false; -+ int m_fetchProgress = 0; -+ QTimer *m_updatesTimeoutTimer; -+ QList m_appStreamComponents; -+ // QVector m_collectedCategories; -+ QFutureWatcher m_voidFutureWatcher; -+ AppstreamDataDownloader *m_appstreamDownloader; -+}; -+ -+#endif // AlpineApkBackend_H -diff --git a/libdiscover/backends/AlpineApkBackend/AlpineApkResource.cpp b/libdiscover/backends/AlpineApkBackend/AlpineApkResource.cpp -new file mode 100644 -index 00000000..8f493a49 ---- /dev/null -+++ b/libdiscover/backends/AlpineApkBackend/AlpineApkResource.cpp -@@ -0,0 +1,341 @@ -+/*************************************************************************** -+ * Copyright © 2020 Alexey Min * -+ * * -+ * This program is free software; you can redistribute it and/or * -+ * modify it under the terms of the GNU General Public License as * -+ * published by the Free Software Foundation; either version 2 of * -+ * the License or (at your option) version 3 or any later version * -+ * accepted by the membership of KDE e.V. (or its successor approved * -+ * by the membership of KDE e.V.), which shall act as a proxy * -+ * defined in Section 14 of version 3 of the license. * -+ * * -+ * This program is distributed in the hope that it will be useful, * -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of * -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -+ * GNU General Public License for more details. * -+ * * -+ * You should have received a copy of the GNU General Public License * -+ * along with this program. If not, see . * -+ ***************************************************************************/ -+ -+#include "AlpineApkResource.h" -+#include "alpineapk_backend_logging.h" // generated by ECM -+ -+#include -+#include -+#include -+ -+#include -+#include -+#include -+ -+// libdiscover -+#include "appstream/AppStreamUtils.h" -+#include "config-paths.h" -+#include "Transaction/AddonList.h" -+ -+AlpineApkResource::AlpineApkResource(const QtApk::Package &apkPkg, -+ AppStream::Component &component, -+ AbstractResource::Type typ, -+ AbstractResourcesBackend *parent) -+ : AbstractResource(parent) -+ , m_state(AbstractResource::State::None) -+ , m_type(typ) -+ , m_pkg(apkPkg) -+ , m_appsC(component) -+{ -+} -+ -+QList AlpineApkResource::addonsInformation() -+{ -+ return m_addons; -+} -+ -+QString AlpineApkResource::availableVersion() const -+{ -+ return m_availableVersion; -+} -+ -+QStringList AlpineApkResource::categories() -+{ -+ if (hasAppStreamData()) { -+ return m_appsC.categories(); -+ } -+ return { m_category }; -+} -+ -+QString AlpineApkResource::comment() -+{ -+ if (hasAppStreamData()) { -+ return m_appsC.summary(); -+ } -+ return m_pkg.description; -+} -+ -+int AlpineApkResource::size() -+{ -+ return static_cast(m_pkg.size); -+} -+ -+QUrl AlpineApkResource::homepage() -+{ -+ if (hasAppStreamData()) { -+ return m_appsC.url(AppStream::Component::UrlKindHomepage); -+ } -+ return QUrl::fromUserInput(m_pkg.url); -+} -+ -+QUrl AlpineApkResource::helpURL() -+{ -+ if (hasAppStreamData()) { -+ return m_appsC.url(AppStream::Component::UrlKindHelp); -+ } -+ return QUrl(); -+} -+ -+QUrl AlpineApkResource::bugURL() -+{ -+ if (hasAppStreamData()) { -+ return m_appsC.url(AppStream::Component::UrlKindBugtracker); -+ } -+ return QUrl(); -+} -+ -+QUrl AlpineApkResource::donationURL() -+{ -+ if (hasAppStreamData()) { -+ return m_appsC.url(AppStream::Component::UrlKindDonation); -+ } -+ return QUrl(); -+} -+ -+///xdg-compatible icon name to represent the resource, url or QIcon -+QVariant AlpineApkResource::icon() const -+{ -+ if (hasAppStreamData()) { -+ const QList icns = m_appsC.icons(); -+ if (icns.size() == 0) { -+ return QStringLiteral("package-x-generic"); -+ } -+ QIcon ico; -+ const AppStream::Icon &appIco = icns.first(); -+ -+ switch (appIco.kind()) { -+ case AppStream::Icon::KindStock: -+ // we can create icons of this type directly from theme -+ ico = QIcon::fromTheme(appIco.name()); -+ break; -+ case AppStream::Icon::KindLocal: -+ case AppStream::Icon::KindCached: { -+ // try from predefined standard Alpine path -+ const QString appstreamIconsPath = QLatin1String("/usr/share/app-info/icons/"); -+ const QString path = appstreamIconsPath + appIco.url().path(); -+ if (QFileInfo::exists(path)) { -+ ico.addFile(path, appIco.size()); -+ } else { -+ const QString altPath = appstreamIconsPath + -+ QStringLiteral("%1x%2/").arg(appIco.size().width()).arg(appIco.size().height()) + -+ appIco.url().path(); -+ if (QFileInfo::exists(altPath)) { -+ ico.addFile(altPath, appIco.size()); -+ } -+ } -+ } break; -+ default: break; -+ } -+ -+ // return icon only if we successfully loaded it -+ if (!ico.isNull()) { -+ return QVariant::fromValue(ico); -+ } -+ -+ // try to load from icon theme by package name, this is better -+ // than nothing and works surprisingly well for many packages -+ ico = QIcon::fromTheme(m_pkg.name); -+ if (!ico.isNull()) { -+ return QVariant::fromValue(ico); -+ } -+ } -+ return QStringLiteral("package-x-generic"); -+} -+ -+QString AlpineApkResource::installedVersion() const -+{ -+ return m_pkg.version; -+} -+ -+QJsonArray AlpineApkResource::licenses() -+{ -+ return { -+ QJsonObject { -+ { QStringLiteral("name"), m_pkg.license }, -+ { QStringLiteral("url"), QStringLiteral("https://spdx.org/license-list") }, -+ } -+ }; -+} -+ -+QString AlpineApkResource::longDescription() -+{ -+ if (hasAppStreamData()) { -+ return m_appsC.description(); -+ } -+ return m_pkg.description; -+} -+ -+QString AlpineApkResource::name() const -+{ -+ if (hasAppStreamData()) { -+ return m_appsC.name(); -+ } -+ return m_pkg.name; -+} -+ -+QString AlpineApkResource::origin() const -+{ -+ return m_originSoruce; -+} -+ -+QString AlpineApkResource::packageName() const -+{ -+ return m_pkg.name; -+} -+ -+QString AlpineApkResource::section() -+{ -+ return m_sectionName; -+} -+ -+AbstractResource::State AlpineApkResource::state() -+{ -+ return m_state; -+} -+ -+void AlpineApkResource::fetchChangelog() -+{ -+ if (hasAppStreamData()) { -+ emit changelogFetched(AppStreamUtils::changelogToHtml(m_appsC)); -+ } -+} -+ -+void AlpineApkResource::fetchScreenshots() -+{ -+ if (hasAppStreamData()) { -+ const QPair, QList > sc = AppStreamUtils::fetchScreenshots(m_appsC); -+ Q_EMIT screenshotsFetched(sc.first, sc.second); -+ } -+} -+ -+QString AlpineApkResource::appstreamId() const -+{ -+ if (hasAppStreamData()) { -+ return m_appsC.id(); -+ } -+ return QString(); -+} -+ -+void AlpineApkResource::setState(AbstractResource::State state) -+{ -+ m_state = state; -+ emit stateChanged(); -+} -+ -+void AlpineApkResource::setCategoryName(const QString &categoryName) -+{ -+ m_category = categoryName; -+} -+ -+void AlpineApkResource::setOriginSource(const QString &originSource) -+{ -+ m_originSoruce = originSource; -+} -+ -+void AlpineApkResource::setSection(const QString §ionName) -+{ -+ m_sectionName = sectionName; -+} -+ -+void AlpineApkResource::setAddons(const AddonList &addons) -+{ -+ const QStringList addonsToInstall = addons.addonsToInstall(); -+ for (const QString &toInstall : addonsToInstall) { -+ setAddonInstalled(toInstall, true); -+ } -+ const QStringList addonsToRemove = addons.addonsToRemove(); -+ for (const QString &toRemove : addonsToRemove) { -+ setAddonInstalled(toRemove, false); -+ } -+} -+ -+void AlpineApkResource::setAddonInstalled(const QString &addon, bool installed) -+{ -+ for(PackageState &elem : m_addons) { -+ if(elem.name() == addon) { -+ elem.setInstalled(installed); -+ } -+ } -+} -+ -+void AlpineApkResource::setAvailableVersion(const QString &av) -+{ -+ m_availableVersion = av; -+} -+ -+bool AlpineApkResource::hasAppStreamData() const -+{ -+ return !m_appsC.id().isEmpty(); -+} -+ -+void AlpineApkResource::setAppStreamData(const AppStream::Component &component) -+{ -+ m_appsC = component; -+} -+ -+bool AlpineApkResource::canExecute() const -+{ -+ if (hasAppStreamData()) { -+ return (m_appsC.kind() == AppStream::Component::KindDesktopApp && -+ (m_state == AbstractResource::Installed || m_state == AbstractResource::Upgradeable)); -+ } -+ return false; -+} -+ -+void AlpineApkResource::invokeApplication() const -+{ -+ const QString desktopFile = QLatin1String("/usr/share/applications/") + appstreamId(); -+ if (QFile::exists(desktopFile)) { -+ QProcess::startDetached(QStringLiteral("kstart5"), {QStringLiteral("--service"), desktopFile}); -+ } -+} -+ -+QUrl AlpineApkResource::url() const -+{ -+ if (hasAppStreamData()) { -+ return QUrl(QStringLiteral("appstream://") + appstreamId()); -+ } -+ return QUrl(QLatin1String("apk://") + packageName()); -+} -+ -+QString AlpineApkResource::author() const -+{ -+ if (hasAppStreamData()) { -+ return m_appsC.developerName(); -+ } -+ return m_pkg.maintainer; -+} -+ -+QString AlpineApkResource::sourceIcon() const -+{ -+ return QStringLiteral("player-time"); -+} -+ -+QDate AlpineApkResource::releaseDate() const -+{ -+ if (hasAppStreamData()) { -+ if (!m_appsC.releases().isEmpty()) { -+ auto release = m_appsC.releases().constFirst(); -+ return release.timestamp().date(); -+ } -+ } -+ // just build date is fine, too -+ return m_pkg.buildTime.date(); -+} -diff --git a/libdiscover/backends/AlpineApkBackend/AlpineApkResource.h b/libdiscover/backends/AlpineApkBackend/AlpineApkResource.h -new file mode 100644 -index 00000000..5304a877 ---- /dev/null -+++ b/libdiscover/backends/AlpineApkBackend/AlpineApkResource.h -@@ -0,0 +1,93 @@ -+/*************************************************************************** -+ * Copyright © 2020 Alexey Min * -+ * * -+ * This program is free software; you can redistribute it and/or * -+ * modify it under the terms of the GNU General Public License as * -+ * published by the Free Software Foundation; either version 2 of * -+ * the License or (at your option) version 3 or any later version * -+ * accepted by the membership of KDE e.V. (or its successor approved * -+ * by the membership of KDE e.V.), which shall act as a proxy * -+ * defined in Section 14 of version 3 of the license. * -+ * * -+ * This program is distributed in the hope that it will be useful, * -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of * -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -+ * GNU General Public License for more details. * -+ * * -+ * You should have received a copy of the GNU General Public License * -+ * along with this program. If not, see . * -+ ***************************************************************************/ -+ -+#ifndef ALPINEAPKRESOURCE_H -+#define ALPINEAPKRESOURCE_H -+ -+#include -+#include -+#include -+ -+class AddonList; -+ -+class AlpineApkResource : public AbstractResource -+{ -+ Q_OBJECT -+ -+public: -+ explicit AlpineApkResource(const QtApk::Package &apkPkg, -+ AppStream::Component &component, -+ AbstractResource::Type typ, -+ AbstractResourcesBackend *parent); -+ -+ QList addonsInformation() override; -+ QString section() override; -+ QString origin() const override; -+ QString longDescription() override; -+ QString availableVersion() const override; -+ QString installedVersion() const override; -+ QJsonArray licenses() override; -+ int size() override; -+ QUrl homepage() override; -+ QUrl helpURL() override; -+ QUrl bugURL() override; -+ QUrl donationURL() override; -+ QStringList categories() override; -+ AbstractResource::State state() override; -+ QVariant icon() const override; -+ QString comment() override; -+ QString name() const override; -+ QString packageName() const override; -+ AbstractResource::Type type() const override { return m_type; } -+ bool canExecute() const override; -+ void invokeApplication() const override; -+ void fetchChangelog() override; -+ void fetchScreenshots() override; -+ QString appstreamId() const override; -+ QUrl url() const override; -+ QString author() const override; -+ QString sourceIcon() const override; -+ QDate releaseDate() const override; -+ -+ void setState(State state); -+ void setCategoryName(const QString &categoryName); -+ void setOriginSource(const QString &originSource); -+ void setSection(const QString §ionName); -+ void setAddons(const AddonList &addons); -+ void setAddonInstalled(const QString &addon, bool installed); -+ void setAvailableVersion(const QString &av); -+ void setAppStreamData(const AppStream::Component &component); -+ -+private: -+ bool hasAppStreamData() const; -+ -+public: -+ AbstractResource::State m_state; -+ const AbstractResource::Type m_type; -+ QtApk::Package m_pkg; -+ QString m_availableVersion; -+ QString m_category; -+ QString m_originSoruce; -+ QString m_sectionName; -+ QList m_addons; -+ AppStream::Component m_appsC; -+}; -+ -+#endif // ALPINEAPKRESOURCE_H -diff --git a/libdiscover/backends/AlpineApkBackend/AlpineApkReviewsBackend.cpp b/libdiscover/backends/AlpineApkBackend/AlpineApkReviewsBackend.cpp -new file mode 100644 -index 00000000..fd7ad47f ---- /dev/null -+++ b/libdiscover/backends/AlpineApkBackend/AlpineApkReviewsBackend.cpp -@@ -0,0 +1,35 @@ -+/*************************************************************************** -+ * Copyright © 2020 Alexey Min * -+ * * -+ * This program is free software; you can redistribute it and/or * -+ * modify it under the terms of the GNU General Public License as * -+ * published by the Free Software Foundation; either version 2 of * -+ * the License or (at your option) version 3 or any later version * -+ * accepted by the membership of KDE e.V. (or its successor approved * -+ * by the membership of KDE e.V.), which shall act as a proxy * -+ * defined in Section 14 of version 3 of the license. * -+ * * -+ * This program is distributed in the hope that it will be useful, * -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of * -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -+ * GNU General Public License for more details. * -+ * * -+ * You should have received a copy of the GNU General Public License * -+ * along with this program. If not, see . * -+ ***************************************************************************/ -+ -+#include "AlpineApkReviewsBackend.h" -+#include "AlpineApkBackend.h" -+#include "resources/AbstractResource.h" -+ -+AlpineApkReviewsBackend::AlpineApkReviewsBackend(AlpineApkBackend *parent) -+ : AbstractReviewsBackend(parent) -+{ -+} -+ -+void AlpineApkReviewsBackend::fetchReviews(AbstractResource *app, int page) -+{ -+ Q_UNUSED(page) -+ static const QVector reviews; -+ Q_EMIT reviewsReady(app, reviews, false); -+} -diff --git a/libdiscover/backends/AlpineApkBackend/AlpineApkReviewsBackend.h b/libdiscover/backends/AlpineApkBackend/AlpineApkReviewsBackend.h -new file mode 100644 -index 00000000..435f845b ---- /dev/null -+++ b/libdiscover/backends/AlpineApkBackend/AlpineApkReviewsBackend.h -@@ -0,0 +1,52 @@ -+/*************************************************************************** -+ * Copyright © 2020 Alexey Min * -+ * * -+ * This program is free software; you can redistribute it and/or * -+ * modify it under the terms of the GNU General Public License as * -+ * published by the Free Software Foundation; either version 2 of * -+ * the License or (at your option) version 3 or any later version * -+ * accepted by the membership of KDE e.V. (or its successor approved * -+ * by the membership of KDE e.V.), which shall act as a proxy * -+ * defined in Section 14 of version 3 of the license. * -+ * * -+ * This program is distributed in the hope that it will be useful, * -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of * -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -+ * GNU General Public License for more details. * -+ * * -+ * You should have received a copy of the GNU General Public License * -+ * along with this program. If not, see . * -+ ***************************************************************************/ -+ -+#ifndef ALPINEAPKREVIEWSBACKEND_H -+#define ALPINEAPKREVIEWSBACKEND_H -+ -+#include "ReviewsBackend/AbstractReviewsBackend.h" -+ -+class AlpineApkBackend; -+ -+class AlpineApkReviewsBackend : public AbstractReviewsBackend -+{ -+ Q_OBJECT -+ -+public: -+ explicit AlpineApkReviewsBackend(AlpineApkBackend *parent = nullptr); -+ -+ QString userName() const override { return QStringLiteral("dummy"); } -+ void login() override {} -+ void logout() override {} -+ void registerAndLogin() override {} -+ -+ Rating *ratingForApplication(AbstractResource *) const override { return nullptr; } -+ bool hasCredentials() const override { return false; } -+ void deleteReview(Review *) override {} -+ void fetchReviews(AbstractResource *app, int page = 1) override; -+ bool isFetching() const override { return false; } -+ bool isReviewable() const override { return false; } -+ void submitReview(AbstractResource *, const QString &, const QString &, const QString &) override {} -+ void flagReview(Review *, const QString&, const QString&) override {} -+ void submitUsefulness(Review *, bool) override {} -+ bool isResourceSupported(AbstractResource *) const override { return false; } -+}; -+ -+#endif // ALPINEAPKREVIEWSBACKEND_H -diff --git a/libdiscover/backends/AlpineApkBackend/AlpineApkSourcesBackend.cpp b/libdiscover/backends/AlpineApkBackend/AlpineApkSourcesBackend.cpp -new file mode 100644 -index 00000000..a126483a ---- /dev/null -+++ b/libdiscover/backends/AlpineApkBackend/AlpineApkSourcesBackend.cpp -@@ -0,0 +1,195 @@ -+/*************************************************************************** -+ * Copyright © 2020 Alexey Min * -+ * * -+ * This program is free software; you can redistribute it and/or * -+ * modify it under the terms of the GNU General Public License as * -+ * published by the Free Software Foundation; either version 2 of * -+ * the License or (at your option) version 3 or any later version * -+ * accepted by the membership of KDE e.V. (or its successor approved * -+ * by the membership of KDE e.V.), which shall act as a proxy * -+ * defined in Section 14 of version 3 of the license. * -+ * * -+ * This program is distributed in the hope that it will be useful, * -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of * -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -+ * GNU General Public License for more details. * -+ * * -+ * You should have received a copy of the GNU General Public License * -+ * along with this program. If not, see . * -+ ***************************************************************************/ -+ -+#include "AlpineApkSourcesBackend.h" -+#include "AlpineApkAuthActionFactory.h" -+#include "alpineapk_backend_logging.h" // generated by ECM -+ -+#include -+#include -+#include -+ -+// KF5 -+#include -+#include -+ -+// libapk-qt -+#include -+ -+AlpineApkSourcesBackend::AlpineApkSourcesBackend(AbstractResourcesBackend *parent) -+ : AbstractSourcesBackend(parent) -+ , m_sourcesModel(new QStandardItemModel(this)) -+ , m_refreshAction(new QAction(QIcon::fromTheme(QStringLiteral("view-refresh")), -+ QStringLiteral("Reload"), this)) -+ , m_saveAction(new QAction(QIcon::fromTheme(QStringLiteral("document-save")), -+ QStringLiteral("Save"), this)) -+ // ^^ unfortunately QML side ignores icons for custom actions -+{ -+ loadSources(); -+ QObject::connect(m_refreshAction, &QAction::triggered, -+ this, &AlpineApkSourcesBackend::loadSources); -+ QObject::connect(m_saveAction, &QAction::triggered, -+ this, &AlpineApkSourcesBackend::saveSources); -+ // track enabling/disabling repo source -+ QObject::connect(m_sourcesModel, &QStandardItemModel::itemChanged, -+ this, &AlpineApkSourcesBackend::onItemChanged); -+} -+ -+QAbstractItemModel *AlpineApkSourcesBackend::sources() -+{ -+ return m_sourcesModel; -+} -+ -+QStandardItem *AlpineApkSourcesBackend::sourceForId(const QString& id) const -+{ -+ for (int i = 0; i < m_sourcesModel->rowCount(); ++i) { -+ QStandardItem *item = m_sourcesModel->item(i, 0); -+ if (item->data(AbstractSourcesBackend::IdRole) == id) { -+ return item; -+ } -+ } -+ return nullptr; -+} -+ -+bool AlpineApkSourcesBackend::addSource(const QString &id) -+{ -+ m_repos.append(QtApk::Repository(id, QString(), true)); -+ fillModelFromRepos(); -+ return true; -+} -+ -+void AlpineApkSourcesBackend::loadSources() -+{ -+ m_repos = QtApk::Database::getRepositories(); -+ fillModelFromRepos(); -+} -+ -+void AlpineApkSourcesBackend::fillModelFromRepos() -+{ -+ m_sourcesModel->clear(); -+ for (const QtApk::Repository &repo: m_repos) { -+ if (repo.url.isEmpty()) { -+ continue; -+ } -+ qCDebug(LOG_ALPINEAPK) << "source backend: Adding source:" << repo.url << repo.enabled; -+ QStandardItem *it = new QStandardItem(repo.url); -+ it->setData(repo.url, AbstractSourcesBackend::IdRole); -+ it->setData(repo.comment, Qt::ToolTipRole); -+ it->setCheckable(true); -+ it->setCheckState(repo.enabled ? Qt::Checked : Qt::Unchecked); -+ m_sourcesModel->appendRow(it); -+ } -+} -+ -+void AlpineApkSourcesBackend::saveSources() -+{ -+ const QVariant repoUrls = QVariant::fromValue>(m_repos); -+ -+ // run with elevated privileges -+ KAuth::ExecuteJob *reply = ActionFactory::createRepoconfigAction(repoUrls); -+ if (!reply) return; -+ -+ QObject::connect(reply, &KAuth::ExecuteJob::result, this, [this] (KJob *job) { -+ KAuth::ExecuteJob *reply = static_cast(job); -+ if (reply->error() != 0) { -+ const QString errMessage = reply->errorString(); -+ qCWarning(LOG_ALPINEAPK) << "KAuth helper returned error:" -+ << reply->error() << errMessage; -+ if (reply->error() == KAuth::ActionReply::Error::AuthorizationDeniedError) { -+ Q_EMIT passiveMessage(i18n("Authorization denied")); -+ } else { -+ Q_EMIT passiveMessage(i18n("Error: ") + errMessage); -+ } -+ } -+ this->loadSources(); -+ }); -+ -+ reply->start(); -+} -+ -+void AlpineApkSourcesBackend::onItemChanged(QStandardItem *item) -+{ -+ // update internal storage vector and reload model from it -+ // otherwise checks state are not updated in UI -+ const Qt::CheckState cs = item->checkState(); -+ const QModelIndex idx = m_sourcesModel->indexFromItem(item); -+ m_repos[idx.row()].enabled = (cs == Qt::Checked); -+ fillModelFromRepos(); -+} -+ -+bool AlpineApkSourcesBackend::removeSource(const QString &id) -+{ -+ const QStandardItem *it = sourceForId(id); -+ if (!it) { -+ qCWarning(LOG_ALPINEAPK) << "source backend: couldn't find " << id; -+ return false; -+ } -+ m_repos.remove(it->row()); -+ return m_sourcesModel->removeRow(it->row()); -+} -+ -+QString AlpineApkSourcesBackend::idDescription() -+{ -+ return i18nc("Adding repo", "Enter Alpine repository URL, for example: " -+ "http://dl-cdn.alpinelinux.org/alpine/edge/testing/"); -+} -+ -+QVariantList AlpineApkSourcesBackend::actions() const -+{ -+ static const QVariantList s_actions { -+ QVariant::fromValue(m_saveAction), -+ QVariant::fromValue(m_refreshAction), -+ }; -+ return s_actions; -+} -+ -+bool AlpineApkSourcesBackend::supportsAdding() const -+{ -+ return true; -+} -+ -+bool AlpineApkSourcesBackend::canMoveSources() const -+{ -+ return true; -+} -+ -+bool AlpineApkSourcesBackend::moveSource(const QString& sourceId, int delta) -+{ -+ int row = sourceForId(sourceId)->row(); -+ QList prevRow = m_sourcesModel->takeRow(row); -+ if (prevRow.isEmpty()) { -+ return false; -+ } -+ -+ const int destRow = row + delta; -+ m_sourcesModel->insertRow(destRow, prevRow); -+ if (destRow == 0 || row == 0) { -+ Q_EMIT firstSourceIdChanged(); -+ } -+ if (destRow == (m_sourcesModel->rowCount() - 1) -+ || row == (m_sourcesModel->rowCount() - 1)) { -+ Q_EMIT lastSourceIdChanged(); -+ } -+ -+ // swap also items in internal storage vector -+ m_repos.swapItemsAt(row, destRow); -+ -+ return true; -+} -diff --git a/libdiscover/backends/AlpineApkBackend/AlpineApkSourcesBackend.h b/libdiscover/backends/AlpineApkBackend/AlpineApkSourcesBackend.h -new file mode 100644 -index 00000000..eacda22d ---- /dev/null -+++ b/libdiscover/backends/AlpineApkBackend/AlpineApkSourcesBackend.h -@@ -0,0 +1,57 @@ -+/*************************************************************************** -+ * Copyright © 2020 Alexey Min * -+ * * -+ * This program is free software; you can redistribute it and/or * -+ * modify it under the terms of the GNU General Public License as * -+ * published by the Free Software Foundation; either version 2 of * -+ * the License or (at your option) version 3 or any later version * -+ * accepted by the membership of KDE e.V. (or its successor approved * -+ * by the membership of KDE e.V.), which shall act as a proxy * -+ * defined in Section 14 of version 3 of the license. * -+ * * -+ * This program is distributed in the hope that it will be useful, * -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of * -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -+ * GNU General Public License for more details. * -+ * * -+ * You should have received a copy of the GNU General Public License * -+ * along with this program. If not, see . * -+ ***************************************************************************/ -+ -+#ifndef ALPINEAPKSOURCESBACKEND_H -+#define ALPINEAPKSOURCESBACKEND_H -+ -+#include -+#include -+ -+#include -+ -+class AlpineApkSourcesBackend : public AbstractSourcesBackend -+{ -+public: -+ explicit AlpineApkSourcesBackend(AbstractResourcesBackend *parent); -+ -+ QAbstractItemModel *sources() override; -+ bool addSource(const QString &id) override; -+ bool removeSource(const QString &id) override; -+ QString idDescription() override; -+ QVariantList actions() const override; -+ bool supportsAdding() const override; -+ bool canMoveSources() const override; -+ bool moveSource(const QString &sourceId, int delta) override; -+ -+private: -+ QStandardItem *sourceForId(const QString &id) const; -+ bool addSourceFull(const QString &id, const QString &comment, bool enabled); -+ void loadSources(); -+ void saveSources(); -+ void fillModelFromRepos(); -+ void onItemChanged(QStandardItem* item); -+ -+ QStandardItemModel *m_sourcesModel = nullptr; -+ QAction *m_refreshAction = nullptr; -+ QAction *m_saveAction = nullptr; -+ QVector m_repos; -+}; -+ -+#endif // ALPINEAPKSOURCESBACKEND_H -diff --git a/libdiscover/backends/AlpineApkBackend/AlpineApkTransaction.cpp b/libdiscover/backends/AlpineApkBackend/AlpineApkTransaction.cpp -new file mode 100644 -index 00000000..26bf1bd0 ---- /dev/null -+++ b/libdiscover/backends/AlpineApkBackend/AlpineApkTransaction.cpp -@@ -0,0 +1,141 @@ -+/*************************************************************************** -+ * Copyright © 2020 Alexey Min * -+ * * -+ * This program is free software; you can redistribute it and/or * -+ * modify it under the terms of the GNU General Public License as * -+ * published by the Free Software Foundation; either version 2 of * -+ * the License or (at your option) version 3 or any later version * -+ * accepted by the membership of KDE e.V. (or its successor approved * -+ * by the membership of KDE e.V.), which shall act as a proxy * -+ * defined in Section 14 of version 3 of the license. * -+ * * -+ * This program is distributed in the hope that it will be useful, * -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of * -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -+ * GNU General Public License for more details. * -+ * * -+ * You should have received a copy of the GNU General Public License * -+ * along with this program. If not, see . * -+ ***************************************************************************/ -+ -+#include "AlpineApkTransaction.h" -+#include "AlpineApkBackend.h" -+#include "AlpineApkResource.h" -+#include "AlpineApkAuthActionFactory.h" -+#include "alpineapk_backend_logging.h" // generated by ECM -+ -+// Qt -+#include -+#include -+ -+// KF5 -+#include -+#include -+ -+AlpineApkTransaction::AlpineApkTransaction(AlpineApkResource *res, Role role) -+ : AlpineApkTransaction(res, {}, role) -+{ -+} -+ -+AlpineApkTransaction::AlpineApkTransaction(AlpineApkResource *res, const AddonList &addons, Transaction::Role role) -+ : Transaction(res->backend(), res, role, addons) -+ , m_resource(res) -+ , m_backend(static_cast(res->backend())) -+{ -+ setCancellable(false); -+ setStatus(QueuedStatus); -+ // seems like Discover's transactions are supposed to start -+ // automatically; no dedicated method to start transaction? -+ startTransaction(); -+} -+ -+void AlpineApkTransaction::proceed() -+{ -+ startTransaction(); -+} -+ -+void AlpineApkTransaction::cancel() -+{ -+ setStatus(CancelledStatus); -+} -+ -+void AlpineApkTransaction::startTransaction() -+{ -+ KAuth::ExecuteJob *reply = nullptr; -+ switch(role()) { -+ case InstallRole: -+ reply = ActionFactory::createAddAction(m_resource->m_pkg.name); -+ break; -+ case RemoveRole: -+ reply = ActionFactory::createDelAction(m_resource->m_pkg.name); -+ break; -+ case ChangeAddonsRole: -+ qCWarning(LOG_ALPINEAPK) << "Addons are not supported by Alpine APK Backend!"; -+ break; -+ } -+ -+ if (!reply) { -+ return; -+ } -+ -+ // get result of this job -+ QObject::connect(reply, &KAuth::ExecuteJob::result, this, [this](KJob *job) { -+ KAuth::ExecuteJob *reply = static_cast(job); -+ const QVariantMap &replyData = reply->data(); -+ if (reply->error() == 0) { -+ finishTransactionOK(); -+ } else { -+ QString message = replyData.value(QLatin1String("errorString"), -+ reply->errorString()).toString(); -+ if (reply->error() == KAuth::ActionReply::Error::AuthorizationDeniedError) { -+ message = i18n("Error: Authorization denied"); -+ } -+ finishTransactionWithError(message); -+ } -+ }); -+ -+ // get progress reports for this job -+ QObject::connect(reply, QOverload::of(&KAuth::ExecuteJob::percent), this, -+ [this](KJob *job, unsigned long percent) { -+ Q_UNUSED(job) -+ if (percent >= 40 && role() == InstallRole) { -+ setStatus(CommittingStatus); -+ } -+ setProgress(static_cast(percent)); -+ }); -+ -+ setProgress(0); -+ if (role() == InstallRole) { -+ setStatus(DownloadingStatus); -+ } else { -+ setStatus(CommittingStatus); -+ } -+ -+ reply->start(); -+} -+ -+void AlpineApkTransaction::finishTransactionOK() -+{ -+ AbstractResource::State newState; -+ switch(role()) { -+ case InstallRole: -+ case ChangeAddonsRole: -+ newState = AbstractResource::Installed; -+ break; -+ case RemoveRole: -+ newState = AbstractResource::None; -+ break; -+ } -+ m_resource->setAddons(addons()); -+ m_resource->setState(newState); -+ setStatus(DoneStatus); -+ deleteLater(); -+} -+ -+void AlpineApkTransaction::finishTransactionWithError(const QString &errMsg) -+{ -+ qCWarning(LOG_ALPINEAPK) << "Transaction finished with error:" << errMsg; -+ Q_EMIT passiveMessage(i18n("Error") + QStringLiteral(":\n") + errMsg); -+ setStatus(DoneWithErrorStatus); -+ deleteLater(); -+} -diff --git a/libdiscover/backends/AlpineApkBackend/AlpineApkTransaction.h b/libdiscover/backends/AlpineApkBackend/AlpineApkTransaction.h -new file mode 100644 -index 00000000..cab1f6b9 ---- /dev/null -+++ b/libdiscover/backends/AlpineApkBackend/AlpineApkTransaction.h -@@ -0,0 +1,49 @@ -+/*************************************************************************** -+ * Copyright © 2020 Alexey Min * -+ * * -+ * This program is free software; you can redistribute it and/or * -+ * modify it under the terms of the GNU General Public License as * -+ * published by the Free Software Foundation; either version 2 of * -+ * the License or (at your option) version 3 or any later version * -+ * accepted by the membership of KDE e.V. (or its successor approved * -+ * by the membership of KDE e.V.), which shall act as a proxy * -+ * defined in Section 14 of version 3 of the license. * -+ * * -+ * This program is distributed in the hope that it will be useful, * -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of * -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -+ * GNU General Public License for more details. * -+ * * -+ * You should have received a copy of the GNU General Public License * -+ * along with this program. If not, see . * -+ ***************************************************************************/ -+ -+#ifndef ALPINEAPKTRANSACTION_H -+#define ALPINEAPKTRANSACTION_H -+ -+#include -+ -+class AlpineApkBackend; -+class AlpineApkResource; -+ -+class AlpineApkTransaction : public Transaction -+{ -+Q_OBJECT -+public: -+ AlpineApkTransaction(AlpineApkResource *res, Role role); -+ AlpineApkTransaction(AlpineApkResource *res, const AddonList &list, Role role); -+ -+ void cancel() override; -+ void proceed() override; -+ -+private Q_SLOTS: -+ void startTransaction(); -+ void finishTransactionOK(); -+ void finishTransactionWithError(const QString &errMsg); -+ -+private: -+ AlpineApkResource *m_resource; -+ AlpineApkBackend *m_backend; -+}; -+ -+#endif // ALPINEAPKTRANSACTION_H -diff --git a/libdiscover/backends/AlpineApkBackend/AlpineApkUpdater.cpp b/libdiscover/backends/AlpineApkBackend/AlpineApkUpdater.cpp -new file mode 100644 -index 00000000..14df959c ---- /dev/null -+++ b/libdiscover/backends/AlpineApkBackend/AlpineApkUpdater.cpp -@@ -0,0 +1,295 @@ -+/*************************************************************************** -+ * Copyright © 2020 Alexey Min * -+ * * -+ * This program is free software; you can redistribute it and/or * -+ * modify it under the terms of the GNU General Public License as * -+ * published by the Free Software Foundation; either version 2 of * -+ * the License or (at your option) version 3 or any later version * -+ * accepted by the membership of KDE e.V. (or its successor approved * -+ * by the membership of KDE e.V.), which shall act as a proxy * -+ * defined in Section 14 of version 3 of the license. * -+ * * -+ * This program is distributed in the hope that it will be useful, * -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of * -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -+ * GNU General Public License for more details. * -+ * * -+ * You should have received a copy of the GNU General Public License * -+ * along with this program. If not, see . * -+ ***************************************************************************/ -+ -+#include "AlpineApkUpdater.h" -+#include "AlpineApkResource.h" -+#include "AlpineApkBackend.h" -+#include "AlpineApkAuthActionFactory.h" -+#include "alpineapk_backend_logging.h" -+#include "utils.h" -+ -+#include -+#include -+ -+#include -+ -+ -+AlpineApkUpdater::AlpineApkUpdater(AbstractResourcesBackend *parent) -+ : AbstractBackendUpdater(parent) -+ , m_backend(static_cast(parent)) -+{ -+ // -+} -+ -+void AlpineApkUpdater::prepare() -+{ -+ QtApk::Database *db = m_backend->apkdb(); -+ -+ if (db->isOpen()) { -+ return; -+ } -+ -+ // readonly is fine for a simulation of upgrade -+ if (!db->open(QtApk::QTAPK_OPENF_READONLY)) { -+ emit passiveMessage(i18n("Failed to open APK database!")); -+ return; -+ } -+ -+ if (!db->upgrade(QtApk::QTAPK_UPGRADE_SIMULATE, &m_upgradeable)) { -+ emit passiveMessage(i18n("Failed to get a list of packages to upgrade!")); -+ db->close(); -+ return; -+ } -+ // close DB ASAP -+ db->close(); -+ -+ m_updatesCount = m_upgradeable.changes().size(); -+ qCDebug(LOG_ALPINEAPK) << "updater: prepare: updates count" << m_updatesCount; -+ -+ m_allUpdateable.clear(); -+ m_markedToUpdate.clear(); -+ QHash *resources = m_backend->resourcesPtr(); -+ for (const QtApk::ChangesetItem &it : qAsConst(m_upgradeable.changes())) { -+ const QtApk::Package &oldPkg = it.oldPackage; -+ const QString newVersion = it.newPackage.version; -+ AlpineApkResource *res = resources->value(oldPkg.name); -+ if (res) { -+ res->setAvailableVersion(newVersion); -+ m_allUpdateable.insert(res); -+ m_markedToUpdate.insert(res); -+ } -+ } -+ -+ // emitting this signal here leads to infinite recursion -+ // emit updatesCountChanged(m_updatesCount); -+} -+ -+bool AlpineApkUpdater::hasUpdates() const -+{ -+ return (m_updatesCount > 0); -+} -+ -+qreal AlpineApkUpdater::progress() const -+{ -+ return m_upgradeProgress; -+} -+ -+void AlpineApkUpdater::removeResources(const QList &apps) -+{ -+ const QSet checkSet = kToSet(apps); -+ m_markedToUpdate -= checkSet; -+} -+ -+void AlpineApkUpdater::addResources(const QList &apps) -+{ -+ const QSet checkSet = kToSet(apps); -+ m_markedToUpdate += checkSet; -+} -+ -+QList AlpineApkUpdater::toUpdate() const -+{ -+ return m_allUpdateable.values(); -+} -+ -+QDateTime AlpineApkUpdater::lastUpdate() const -+{ -+ qCDebug(LOG_ALPINEAPK) << Q_FUNC_INFO; -+ return QDateTime(); -+} -+ -+bool AlpineApkUpdater::isCancelable() const -+{ -+ qCDebug(LOG_ALPINEAPK) << Q_FUNC_INFO; -+ return false; -+} -+ -+bool AlpineApkUpdater::isProgressing() const -+{ -+ qCDebug(LOG_ALPINEAPK) << Q_FUNC_INFO << m_progressing; -+ return m_progressing; -+} -+ -+bool AlpineApkUpdater::isMarked(AbstractResource *res) const -+{ -+ return m_markedToUpdate.contains(res); -+} -+ -+void AlpineApkUpdater::fetchChangelog() const -+{ -+ qCDebug(LOG_ALPINEAPK) << Q_FUNC_INFO; -+} -+ -+double AlpineApkUpdater::updateSize() const -+{ -+ double sum = 0.0; -+ for (AbstractResource *res : m_markedToUpdate) { -+ sum += res->size(); -+ } -+ return sum; -+} -+ -+quint64 AlpineApkUpdater::downloadSpeed() const -+{ -+ qCDebug(LOG_ALPINEAPK) << Q_FUNC_INFO; -+ return 0; -+} -+ -+void AlpineApkUpdater::cancel() -+{ -+ qCDebug(LOG_ALPINEAPK) << Q_FUNC_INFO; -+} -+ -+void AlpineApkUpdater::start() -+{ -+ qCDebug(LOG_ALPINEAPK) << Q_FUNC_INFO; -+ -+ // run upgrade with elevated privileges -+ KAuth::ExecuteJob *reply = ActionFactory::createUpgradeAction(); -+ if (!reply) return; -+ -+ QObject::connect(reply, &KAuth::ExecuteJob::result, -+ this, &AlpineApkUpdater::handleKAuthUpgradeHelperReply); -+ // qOverload is needed because of conflict with getter named percent() -+ QObject::connect(reply, QOverload::of(&KAuth::ExecuteJob::percent), -+ this, &AlpineApkUpdater::handleKAuthUpgradeHelperProgress); -+ -+ m_progressing = true; -+ m_upgradeProgress = 0.0; -+ Q_EMIT progressingChanged(m_progressing); -+ -+ reply->start(); -+} -+ -+void AlpineApkUpdater::proceed() -+{ -+ qCDebug(LOG_ALPINEAPK) << Q_FUNC_INFO; -+} -+ -+int AlpineApkUpdater::updatesCount() -+{ -+ return m_updatesCount; -+} -+ -+void AlpineApkUpdater::startCheckForUpdates() -+{ -+ QtApk::Database *db = m_backend->apkdb(); -+ -+ // run updates check with elevated privileges to access -+ // system package manager files -+ KAuth::ExecuteJob *reply = ActionFactory::createUpdateAction(db->fakeRoot()); -+ if (!reply) return; -+ QObject::connect(reply, &KAuth::ExecuteJob::result, -+ this, &AlpineApkUpdater::handleKAuthUpdateHelperReply); -+ // qOverload is needed because of conflict with getter named percent() -+ QObject::connect(reply, QOverload::of(&KAuth::ExecuteJob::percent), -+ this, &AlpineApkUpdater::handleKAuthUpdateHelperProgress); -+ -+ m_progressing = true; -+ Q_EMIT progressingChanged(m_progressing); -+ Q_EMIT progressChanged(0); -+ -+ reply->start(); -+} -+ -+void AlpineApkUpdater::handleKAuthUpdateHelperReply(KJob *job) -+{ -+ KAuth::ExecuteJob *reply = static_cast(job); -+ const QVariantMap &replyData = reply->data(); -+ if (reply->error() == 0) { -+ m_updatesCount = replyData.value(QLatin1String("updatesCount")).toInt(); -+ qCDebug(LOG_ALPINEAPK) << "KAuth helper update reply received, updatesCount:" << m_updatesCount; -+ Q_EMIT updatesCountChanged(m_updatesCount); -+ } else { -+ handleKAuthHelperError(reply, replyData); -+ } -+ -+ m_progressing = false; -+ Q_EMIT progressingChanged(m_progressing); -+ -+ // we are not in the state "Fetching updates" now, update UI -+ Q_EMIT checkForUpdatesFinished(); -+} -+ -+void AlpineApkUpdater::handleKAuthUpdateHelperProgress(KJob *job, unsigned long percent) -+{ -+ Q_UNUSED(job) -+ qCDebug(LOG_ALPINEAPK) << " fetch updates progress: " << percent; -+ Q_EMIT fetchingUpdatesProgressChanged(percent); -+ Q_EMIT progressChanged(static_cast(percent)); -+} -+ -+void AlpineApkUpdater::handleKAuthUpgradeHelperProgress(KJob *job, unsigned long percent) -+{ -+ Q_UNUSED(job) -+ qCDebug(LOG_ALPINEAPK) << " upgrade progress: " << percent; -+ qreal newProgress = static_cast(percent); -+ if (newProgress != m_upgradeProgress) { -+ m_upgradeProgress = newProgress; -+ Q_EMIT progressChanged(m_upgradeProgress); -+ } -+} -+ -+void AlpineApkUpdater::handleKAuthUpgradeHelperReply(KJob *job) -+{ -+ KAuth::ExecuteJob *reply = static_cast(job); -+ const QVariantMap &replyData = reply->data(); -+ if (reply->error() == 0) { -+ QVariant pkgsV = replyData.value(QLatin1String("changes")); -+ bool onlySimulate = replyData.value(QLatin1String("onlySimulate"), false).toBool(); -+ if (onlySimulate) { -+ qCDebug(LOG_ALPINEAPK) << "KAuth helper upgrade reply received, simulation mode"; -+ QVector pkgVector = pkgsV.value>(); -+ qCDebug(LOG_ALPINEAPK) << " num changes:" << pkgVector.size(); -+ for (const QtApk::Package &pkg : pkgVector) { -+ qCDebug(LOG_ALPINEAPK) << " " << pkg.name << pkg.version; -+ } -+ } -+ } else { -+ handleKAuthHelperError(reply, replyData); -+ } -+ -+ m_progressing = false; -+ Q_EMIT progressingChanged(m_progressing); -+} -+ -+void AlpineApkUpdater::handleKAuthHelperError( -+ KAuth::ExecuteJob *reply, -+ const QVariantMap &replyData) -+{ -+ // error message should be received as part of JSON reply from helper -+ QString message = replyData.value(QLatin1String("errorString"), -+ reply->errorString()).toString(); -+ if (reply->error() == KAuth::ActionReply::Error::AuthorizationDeniedError) { -+ qCWarning(LOG_ALPINEAPK) << "updater: KAuth helper returned AuthorizationDeniedError"; -+ Q_EMIT passiveMessage(i18n("Authorization denied")); -+ } else { -+ // if received error message is empty, try other ways to get error text for user -+ // there are multiple ways to get error messages in kauth/kjob -+ if (message.isEmpty()) { -+ message = reply->errorString(); -+ if (message.isEmpty()) { -+ message = reply->errorText(); -+ } -+ } -+ qCDebug(LOG_ALPINEAPK) << "updater: KAuth helper returned error:" << message << reply->error(); -+ Q_EMIT passiveMessage(i18n("Error") + QStringLiteral(":\n") + message); -+ } -+} -+ -diff --git a/libdiscover/backends/AlpineApkBackend/AlpineApkUpdater.h b/libdiscover/backends/AlpineApkBackend/AlpineApkUpdater.h -new file mode 100644 -index 00000000..6ca3ce07 ---- /dev/null -+++ b/libdiscover/backends/AlpineApkBackend/AlpineApkUpdater.h -@@ -0,0 +1,197 @@ -+/*************************************************************************** -+ * Copyright © 2020 Alexey Min * -+ * * -+ * This program is free software; you can redistribute it and/or * -+ * modify it under the terms of the GNU General Public License as * -+ * published by the Free Software Foundation; either version 2 of * -+ * the License or (at your option) version 3 or any later version * -+ * accepted by the membership of KDE e.V. (or its successor approved * -+ * by the membership of KDE e.V.), which shall act as a proxy * -+ * defined in Section 14 of version 3 of the license. * -+ * * -+ * This program is distributed in the hope that it will be useful, * -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of * -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -+ * GNU General Public License for more details. * -+ * * -+ * You should have received a copy of the GNU General Public License * -+ * along with this program. If not, see . * -+ ***************************************************************************/ -+ -+#ifndef ALPINEAPKUPDATER_H -+#define ALPINEAPKUPDATER_H -+ -+#include "resources/AbstractBackendUpdater.h" -+#include "resources/AbstractResourcesBackend.h" -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+ -+class AbstractResourcesBackend; -+class AlpineApkBackend; -+class KJob; -+namespace KAuth { -+ class ExecuteJob; -+} -+ -+class AlpineApkUpdater : public AbstractBackendUpdater -+{ -+ Q_OBJECT -+ Q_PROPERTY(int updatesCount READ updatesCount NOTIFY updatesCountChanged) -+ -+public: -+ explicit AlpineApkUpdater(AbstractResourcesBackend *parent = nullptr); -+ -+ /** -+ * This method is called, when Muon switches to the updates view. -+ * Here the backend should mark all upgradeable packages as to be upgraded. -+ */ -+ void prepare() override; -+ -+ /** -+ * @returns true if the backend contains packages which can be updated -+ */ -+ bool hasUpdates() const override; -+ /** -+ * @returns the progress of the update in percent -+ */ -+ qreal progress() const override; -+ -+ /** -+ * This method is used to remove resources from the list of packages -+ * marked to be upgraded. It will potentially be called before \start. -+ */ -+ void removeResources(const QList &apps) override; -+ -+ /** -+ * This method is used to add resource to the list of packages marked to be upgraded. -+ * It will potentially be called before \start. -+ */ -+ void addResources(const QList &apps) override; -+ -+ /** -+ * @returns the list of updateable resources in the system -+ */ -+ QList toUpdate() const override; -+ -+ /** -+ * @returns the QDateTime when the last update happened -+ */ -+ QDateTime lastUpdate() const override; -+ -+ /** -+ * @returns whether the updater can currently be canceled or not -+ * @see cancelableChanged -+ */ -+ bool isCancelable() const override; -+ -+ /** -+ * @returns whether the updater is currently running or not -+ * this property decides, if there will be progress reporting in the GUI. -+ * This has to stay true during the whole transaction! -+ * @see progressingChanged -+ */ -+ bool isProgressing() const override; -+ -+ /** -+ * @returns whether @p res is marked for update -+ */ -+ bool isMarked(AbstractResource* res) const override; -+ -+ void fetchChangelog() const override; -+ -+ /** -+ * @returns the size of all the packages set to update combined -+ */ -+ double updateSize() const override; -+ -+ /** -+ * @returns the speed at which we are downloading -+ */ -+ quint64 downloadSpeed() const override; -+ -+public Q_SLOTS: -+ /** -+ * If \isCancelable is true during the transaction, this method has -+ * to be implemented and will potentially be called when the user -+ * wants to cancel the update. -+ */ -+ void cancel() override; -+ -+ /** -+ * This method starts the update. All packages which are in \toUpdate -+ * are going to be updated. -+ * -+ * From this moment on the AbstractBackendUpdater should continuously update -+ * the other methods to show its progress. -+ * -+ * @see progress -+ * @see progressChanged -+ * @see isProgressing -+ * @see progressingChanged -+ */ -+ void start() override; -+ -+ /** -+ * Answers a proceed request -+ */ -+ void proceed() override; -+ -+Q_SIGNALS: -+ void checkForUpdatesFinished(); -+ void updatesCountChanged(int updatesCount); -+ void fetchingUpdatesProgressChanged(int progress); -+ //void cancelTransaction(); -+ -+public Q_SLOTS: -+ int updatesCount(); -+ void startCheckForUpdates(); -+ -+ // KAuth handler slots -+ // update -+ void handleKAuthUpdateHelperReply(KJob *job); -+ void handleKAuthUpdateHelperProgress(KJob *job, unsigned long percent); -+ // upgrade -+ void handleKAuthUpgradeHelperReply(KJob *job); -+ void handleKAuthUpgradeHelperProgress(KJob *job, unsigned long percent); -+ -+ //void transactionRemoved(Transaction* t); -+ //void cleanup(); -+ -+public: -+ QVector &changes() { return m_upgradeable.changes(); } -+ const QVector &changes() const { return m_upgradeable.changes(); } -+ -+protected: -+ void handleKAuthHelperError(KAuth::ExecuteJob *reply, const QVariantMap &replyData); -+ -+private: -+ AlpineApkBackend *const m_backend; -+ int m_updatesCount = 0; -+ QtApk::Changeset m_upgradeable; -+ QSet m_allUpdateable; -+ QSet m_markedToUpdate; -+// void resourcesChanged(AbstractResource* res, const QVector& props); -+// void refreshUpdateable(); -+// void transactionAdded(Transaction* newTransaction); -+// void transactionProgressChanged(); -+// void refreshProgress(); -+// QVector transactions() const; -+ -+// QSet m_upgradeable; -+// QSet m_pendingResources; -+ bool m_progressing = false; -+ qreal m_upgradeProgress = 0.0; -+// QDateTime m_lastUpdate; -+// QTimer m_timer; -+// bool m_canCancel = false; -+}; -+ -+ -+#endif // ALPINEAPKUPDATER_H -diff --git a/libdiscover/backends/AlpineApkBackend/AppstreamDataDownloader.cpp b/libdiscover/backends/AlpineApkBackend/AppstreamDataDownloader.cpp -new file mode 100644 -index 00000000..16587994 ---- /dev/null -+++ b/libdiscover/backends/AlpineApkBackend/AppstreamDataDownloader.cpp -@@ -0,0 +1,303 @@ -+/*************************************************************************** -+ * Copyright © 2020 Alexey Min * -+ * * -+ * This program is free software; you can redistribute it and/or * -+ * modify it under the terms of the GNU General Public License as * -+ * published by the Free Software Foundation; either version 2 of * -+ * the License or (at your option) version 3 or any later version * -+ * accepted by the membership of KDE e.V. (or its successor approved * -+ * by the membership of KDE e.V.), which shall act as a proxy * -+ * defined in Section 14 of version 3 of the license. * -+ * * -+ * This program is distributed in the hope that it will be useful, * -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of * -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -+ * GNU General Public License for more details. * -+ * * -+ * You should have received a copy of the GNU General Public License * -+ * along with this program. If not, see . * -+ ***************************************************************************/ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "AppstreamDataDownloader.h" -+#include "alpineapk_backend_logging.h" -+ -+namespace DiscoverVersion { -+// contains static QLatin1String version("5.20.5"); definition -+// autogenerated from top CMakeLists.txt -+#include "../../../DiscoverVersion.h" -+} -+ -+#ifdef ALPINE_LINUX_BUILD -+/** -+ * @brief ApkAppstreamDataDownloader::getApkArch -+ * Reads current configured system apk architecture -+ * from "/etc/apk/arch" file. -+ * @return "x86_64" / "armhf" / "armv7" / "aarch64" and so on -+ */ -+static QString getApkArch() -+{ -+ static QString s_retArch; -+ if (!s_retArch.isEmpty()) { -+ return s_retArch; -+ } -+ QFile archFile(QStringLiteral("/etc/apk/arch")); -+ if (!archFile.open(QIODevice::ReadOnly)) { -+ // TODO: we could try to guess at compile time by checking presence of -+ // defines like __x86_64__ (check with: "gcc -march=native -dM -E - = m_cacheExpireSeconds) { -+ m_urlsToDownload.append(url); -+ } -+ qCDebug(LOG_ALPINEAPK) << " appstream metadata file: " << localFi.fileName() -+ << " was last modified " << modifiedSecsAgo << " seconds ago"; -+ } else { -+ // locally downloaded file does not even exist, we need to download it -+ m_urlsToDownload.append(url); -+ qCDebug(LOG_ALPINEAPK) << " appstream metadata file: " << localFi.fileName() -+ << " does not exist, queued for downloading"; -+ } -+ } -+ -+ if (m_urlsToDownload.size() > 0) { -+ // some files are outdated; download is needed -+ qCDebug(LOG_ALPINEAPK) << "appstream_downloader: We will need to download " -+ << m_urlsToDownload.size() << " file(s)"; -+ -+ // start downloader in a background thread -+ QFuture downloaderFuture = QtConcurrent::run( -+ QThreadPool::globalInstance(), this, &AppstreamDataDownloader::download); -+ -+ // directly connect signal to signal -+ QObject::connect(&m_voidFutureWatcher, &QFutureWatcher::finished, -+ this, &AppstreamDataDownloader::downloadFinished); -+ m_voidFutureWatcher.setFuture(downloaderFuture); -+ } else { -+ // no need to download anything -+ qCDebug(LOG_ALPINEAPK) << "appstream_downloader: All appstream data files " -+ "are up to date, not downloading anything"; -+ Q_EMIT downloadFinished(); -+ return; -+ } -+} -+ -+// this function runs in background thread -+void AppstreamDataDownloader::download() -+{ -+ QNetworkAccessManager nam; -+ QList replies; -+ QEventLoop loop; -+ -+ // start a HTTP GET request for each URL -+ const QStringList urls = m_urlsToDownload; -+ const QString discoverVersion(QStringLiteral("plasma-discover %1").arg(DiscoverVersion::version)); -+ for (const QString &url : urls) { -+ const QUrl uurl(url, QUrl::TolerantMode); -+ QNetworkRequest req(uurl); -+ req.setHeader(QNetworkRequest::UserAgentHeader, discoverVersion); -+ replies.push_back(nam.get(req)); -+ } -+ -+ for (QNetworkReply *rep : replies) { -+ // lambda that stops the loop when all requests have finished -+ // intentionaly use contextless lambda, it is not called otherwise -+ QObject::connect(rep, &QNetworkReply::finished, [&loop, &replies, rep] () { -+ const int numReplies = replies.size(); -+ int numFinished = 0; -+ for (QNetworkReply *arep : replies) { -+ if (arep->isFinished()) { -+ numFinished++; -+ } -+ } -+ if (numFinished >= numReplies) { -+ loop.quit(); -+ } -+ qCDebug(LOG_ALPINEAPK).nospace() -+ << "appstream_downloader: " << rep->url() -+ << " request finished (" << numFinished << "/" << numReplies << ")"; -+ }); -+ } -+ -+ // wait for all requests to finish -+ loop.exec(); -+ -+ qCDebug(LOG_ALPINEAPK) << "appstream_downloader: all downloads have finished!"; -+ -+ int numErrors = 0; -+ for (QNetworkReply *rep : replies) { -+ const QString localCacheFile = getLocalFileSavePath(rep->url()); -+ -+ if (rep->error() == QNetworkReply::NoError) { -+ // read received reply contents and save it to file -+ const QByteArray data = rep->readAll(); -+ QFile fout(localCacheFile); -+ if (fout.open(QIODevice::WriteOnly | QIODevice::Truncate)) { -+ fout.write(data); -+ fout.close(); -+ m_cacheWasUpdated = true; -+ qCDebug(LOG_ALPINEAPK) << "appstream_downloader: saved: " << localCacheFile; -+ } else { -+ qCWarning(LOG_ALPINEAPK) << "appstream_downloader: failed to save:" << localCacheFile; -+ } -+ } else { -+ // download failed for some reason -+ QFileInfo urlinfo(rep->url().path()); -+ qCWarning(LOG_ALPINEAPK) << "appstream_downloader: failed to download" -+ << urlinfo.fileName() << rep->errorString(); -+ numErrors++; -+ } -+ } -+ -+ // cleanup: delete all replies objects -+ for (QNetworkReply *arep : replies) { -+ arep->deleteLater(); -+ } -+} -diff --git a/libdiscover/backends/AlpineApkBackend/AppstreamDataDownloader.h b/libdiscover/backends/AlpineApkBackend/AppstreamDataDownloader.h -new file mode 100644 -index 00000000..05771982 ---- /dev/null -+++ b/libdiscover/backends/AlpineApkBackend/AppstreamDataDownloader.h -@@ -0,0 +1,139 @@ -+/*************************************************************************** -+ * Copyright © 2020 Alexey Min * -+ * * -+ * This program is free software; you can redistribute it and/or * -+ * modify it under the terms of the GNU General Public License as * -+ * published by the Free Software Foundation; either version 2 of * -+ * the License or (at your option) version 3 or any later version * -+ * accepted by the membership of KDE e.V. (or its successor approved * -+ * by the membership of KDE e.V.), which shall act as a proxy * -+ * defined in Section 14 of version 3 of the license. * -+ * * -+ * This program is distributed in the hope that it will be useful, * -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of * -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -+ * GNU General Public License for more details. * -+ * * -+ * You should have received a copy of the GNU General Public License * -+ * along with this program. If not, see . * -+ ***************************************************************************/ -+ -+#ifndef AlpineAppstreamDataDownloader_H -+#define AlpineAppstreamDataDownloader_H -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+/** -+ * @brief The AppstreamDataDownloader class -+ * -+ * @details The job of this class is to download appstream data -+ * gzipped XMLs from the Web server hosted somewhere (for -+ * Alpine Linux - at https://appstream.alpinelinux.org). -+ * -+ * Some distros (for example, Alpine Linux) do not provide -+ * appstream data as installable package, instead they host it -+ * on the internet and you have to download and install them -+ * manually. -+ * -+ * Logic behind this decision is beyond my understanding, but we -+ * have what we have... Those files are not very large (from few -+ * kilobytes to couple of megabytes) but we still need them. -+ * -+ * URLs to download archives from are stored in JSON files in -+ * /usr/share/libdiscover/external-appstream-urls/ directory -+ * (QStandardPaths::GenericDataLocation/libdiscover/external-appstream-urls -+ * from C++/Qt code, ${DATA_INSTALL_DIR}/libdiscover/external-appstream-urls -+ * from cmake). -+ * -+ * JSON file format: -+ * --------------------- -+ * { -+ * "urls": [ "https://url1", "https://url2", ... ] -+ * } -+ * --------------------- -+ * -+ * This class can load any amount of those JSON files, -+ * fetch URLs from them and download all files pointed by -+ * those URLs to discover's cache directory: -+ * "~/.cache/discover/appstream_data" (aka QStandardPaths::CacheLocation). -+ * If files are already present in cache and not outdated, -+ * they are not downloaded again. Default cache expiration -+ * time is 2 days. -+ */ -+class AppstreamDataDownloader: public QObject -+{ -+ Q_OBJECT -+public: -+ explicit AppstreamDataDownloader(QObject *parent = nullptr); -+ -+ /** -+ * @brief getAppstreamCacheDir -+ * @details Use return value of this function to add extra metadata -+ * directories to AppStream loader, in case of AppStreamQt: -+ * AppStream::Pool::addMetadataLocation(). -+ * This method creates a cache dir if it does not exist. -+ * @return directory where downloaded files are stored. -+ */ -+ static QString getAppStreamCacheDir(); -+ -+ /** -+ * @brief cacheWasUpdated -+ * @details Call this after receiving downloadFinished() signal to -+ * test if there actually was something new downloaded. -+ * -+ * @return true, if new files were actually downloaded, or -+ * false is files already present in cache are up to date. -+ */ -+ bool cacheWasUpdated() const { return m_cacheWasUpdated; } -+ -+ /** -+ * @brief getCacheExpirePeriodSecs -+ * @return cache expire timeout in seconds -+ */ -+ qint64 getCacheExpirePeriodSecs() const { return m_cacheExpireSeconds; } -+ -+ /** -+ * @brief setCacheExpirePeriodSecs -+ * @param secs - new cache expiration timeout, in seconds. -+ */ -+ void setCacheExpirePeriodSecs(qint64 secs); -+ -+public Q_SLOTS: -+ /** -+ * @brief start -+ * Start the background thread that does all the job. -+ * downloadFinished() signal will be emitted when everything is done. -+ * start() may finish immediately if all cached files are -+ * up to date and no downloads are needed. -+ */ -+ void start(); -+ -+Q_SIGNALS: -+ /** -+ * @brief downloadFinished -+ * This signal is emitted when download job is finished. -+ * To check if there were actual downloads performed, call -+ * cacheWasUpdated(). -+ */ -+ void downloadFinished(); -+ -+private: -+ QString getLocalFileSavePath(const QUrl &urlTodownload); -+ void loadUrlsJson(const QString &path); -+ void download(); -+ -+protected: -+ qint64 m_cacheExpireSeconds = 2 * 24 * 3600; // 2 days -+ QStringList m_urls; -+ QStringList m_urlsToDownload; -+ QHash m_urlPrefixes; -+ QFutureWatcher m_voidFutureWatcher; -+ bool m_cacheWasUpdated = false; -+}; -+ -+#endif -diff --git a/libdiscover/backends/AlpineApkBackend/CMakeLists.txt b/libdiscover/backends/AlpineApkBackend/CMakeLists.txt -new file mode 100644 -index 00000000..8602dce7 ---- /dev/null -+++ b/libdiscover/backends/AlpineApkBackend/CMakeLists.txt -@@ -0,0 +1,85 @@ -+find_package(KF5Auth CONFIG REQUIRED) # Probably should be moved to top CMakeLists -+ -+set(alpineapkbackend_SRCS -+ AlpineApkAuthActionFactory.h -+ AlpineApkAuthActionFactory.cpp -+ AlpineApkBackend.cpp -+ AlpineApkBackend.h -+ AlpineApkResource.cpp -+ AlpineApkResource.h -+ AlpineApkReviewsBackend.cpp -+ AlpineApkReviewsBackend.h -+ AlpineApkSourcesBackend.cpp -+ AlpineApkSourcesBackend.h -+ AlpineApkUpdater.cpp -+ AlpineApkUpdater.h -+ AlpineApkTransaction.cpp -+ AlpineApkTransaction.h -+ AppstreamDataDownloader.h -+ AppstreamDataDownloader.cpp -+) -+ -+ecm_qt_declare_logging_category( -+ alpineapkbackend_SRCS # sources_var -+ HEADER alpineapk_backend_logging.h -+ IDENTIFIER LOG_ALPINEAPK -+ CATEGORY_NAME org.kde.plasma.discover.alpineapk -+ DEFAULT_SEVERITY Debug -+) -+ -+add_library( -+ alpineapk-backend -+ MODULE -+ ${alpineapkbackend_SRCS} -+) -+ -+target_link_libraries( -+ alpineapk-backend -+ PRIVATE -+ Qt5::Core -+ Qt5::Widgets -+ Qt5::Concurrent -+ KF5::CoreAddons -+ KF5::ConfigCore -+ KF5::AuthCore -+ Discover::Common -+ ApkQt::ApkQt -+ AppStreamQt -+) -+ -+# KAuth helper exe -+add_executable(alpineapk_kauth_helper -+ AlpineApkAuthHelper.cpp -+ AlpineApkAuthHelper.h -+ org.kde.discover.alpineapkbackend.actions -+) -+set_source_files_properties( -+ org.kde.discover.alpineapkbackend.actions -+ PROPERTIES HEADER_FILE_ONLY ON -+) -+target_link_libraries(alpineapk_kauth_helper -+ Qt5::Core -+ KF5::AuthCore -+ ApkQt::ApkQt -+) -+ -+kauth_install_actions(org.kde.discover.alpineapkbackend org.kde.discover.alpineapkbackend.actions) -+kauth_install_helper_files(alpineapk_kauth_helper org.kde.discover.alpineapkbackend root) -+ -+install( -+ TARGETS alpineapk-backend -+ DESTINATION ${PLUGIN_INSTALL_DIR}/discover -+) -+ -+install( -+ TARGETS alpineapk_kauth_helper -+ DESTINATION ${KAUTH_HELPER_INSTALL_DIR} -+) -+ -+# add_library(AlpineApkNotifier MODULE AlpineApkNotifier.cpp) -+ -+# target_link_libraries(AlpineApkNotifier Discover::Notifiers) -+ -+# set_target_properties(AlpineApkNotifier PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}/plasma-discover) -+ -+# install(TARGETS AlpineApkNotifier DESTINATION ${PLUGIN_INSTALL_DIR}/discover-notifier) -diff --git a/libdiscover/backends/AlpineApkBackend/org.kde.discover.alpineapkbackend.actions b/libdiscover/backends/AlpineApkBackend/org.kde.discover.alpineapkbackend.actions -new file mode 100644 -index 00000000..c9bb5f9f ---- /dev/null -+++ b/libdiscover/backends/AlpineApkBackend/org.kde.discover.alpineapkbackend.actions -@@ -0,0 +1,5 @@ -+[org.kde.discover.alpineapkbackend.pkgmgmt] -+Name=Package management -+Description=Install or remove packages, upgrade system -+Policy=auth_admin -+Persistence=session -diff --git a/libdiscover/backends/CMakeLists.txt b/libdiscover/backends/CMakeLists.txt -index 5f87f639..18947339 100644 ---- a/libdiscover/backends/CMakeLists.txt -+++ b/libdiscover/backends/CMakeLists.txt -@@ -45,4 +45,14 @@ if(BUILD_FwupdBackend AND TARGET PkgConfig::Fwupd) - add_subdirectory(FwupdBackend) - endif() - -+find_package(ApkQt CONFIG) -+set_package_properties(ApkQt PROPERTIES -+ DESCRIPTION "C++/Qt interface library for Alpine package keeper" -+ URL "https://www.alpinelinux.org" -+ PURPOSE "Required to build the Alpine APK backend" -+ TYPE OPTIONAL) - -+option(BUILD_AlpineApkBackend "Build Alpine APK support." "ON") -+if(BUILD_AlpineApkBackend AND ApkQt_FOUND) -+ add_subdirectory(AlpineApkBackend) -+endif() --- -2.30.0 - diff --git a/temp/discover/APKBUILD b/temp/discover/APKBUILD deleted file mode 100644 index 5795cbe92..000000000 --- a/temp/discover/APKBUILD +++ /dev/null @@ -1,151 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=discover -pkgver=5.20.90 -pkgrel=0 -# armhf blocked by qt5-qtdeclarative -# s390x blocked by flatpak -arch="all !armhf !s390x !mips64" -url="https://userbase.kde.org/Discover" -pkgdesc="KDE Plasma resources management GUI" -license="LGPL-2.0-or-later AND (GPL-2.0-only OR GPL-3.0-only) AND GFDL-1.2-only" -depends="kirigami2" -makedepends=" - appstream-dev - attica-dev - extra-cmake-modules - flatpak-dev - karchive-dev - kauth-dev - kcmutils-dev - kconfig-dev - kcoreaddons-dev - kcrash-dev - kdbusaddons-dev - kdeclarative-dev - ki18n-dev - kidletime-dev - kio-dev - kitemmodels-dev - knewstuff-dev - kxmlgui-dev - libapk-qt-dev - plasma-framework-dev - qt5-qtbase-dev - qt5-qtdeclarative-dev - " -checkdepends="xvfb-run" - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/discover-$pkgver.tar.xz - 0001-Add-support-for-Alpine-Linux-apk-backend.patch - alpine-appstream-data.json - " -subpackages=" - $pkgname-lang - $pkgname-backend-flatpak:backend_flatpak - $pkgname-backend-apk:backend_apk - " - -case "$CARCH" in - x86|x86_64) - makedepends="$makedepends fwupd-dev" - subpackages="$subpackages $pkgname-backend-fwupd:backend_fwupd" - ;; - *) ;; -esac - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DCMAKE_DISABLE_FIND_PACKAGE_Snapd=ON - cmake --build build -} - -check() { - cd build - # knsbackendtest and flatpaktest fail to find their required executables - CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest -E "(knsbackend|flatpak)test" -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} - -backend_flatpak() { - pkgdesc="Flatpak backend for $pkgname" - depends="" - install_if="$pkgname flatpak" - - mkdir -p \ - "$subpkgdir"/usr/lib/qt5/plugins/discover \ - "$subpkgdir"/usr/share/libdiscover/categories \ - "$subpkgdir"/usr/lib/qt5/plugins/discover-notifier \ - "$subpkgdir"/usr/share/applications \ - "$subpkgdir"/usr/share/metainfo \ - "$subpkgdir"/usr/share/icons/hicolor/scalable/apps - - mv "$pkgdir"/usr/lib/qt5/plugins/discover/flatpak-backend.so \ - "$subpkgdir"/usr/lib/qt5/plugins/discover/ - mv "$pkgdir"/usr/share/libdiscover/categories/flatpak-backend-categories.xml \ - "$subpkgdir"/usr/share/libdiscover/categories/ - mv "$pkgdir"/usr/lib/qt5/plugins/discover-notifier/FlatpakNotifier.so \ - "$subpkgdir"/usr/lib/qt5/plugins/discover-notifier/ - mv "$pkgdir"/usr/share/applications/org.kde.discover-flatpak.desktop \ - "$subpkgdir"/usr/share/applications/ - mv "$pkgdir"/usr/share/metainfo/org.kde.discover.flatpak.appdata.xml \ - "$subpkgdir"/usr/share/metainfo/ - mv "$pkgdir"/usr/share/icons/hicolor/scalable/apps/flatpak-discover.svg \ - "$subpkgdir"/usr/share/icons/hicolor/scalable/apps/ -} - -backend_apk() { - pkgdesc="Apk backend for $pkgname" - depends="" - install_if="$pkgname apk-tools" - - mkdir -p \ - "$subpkgdir"/usr/lib/qt5/plugins/discover \ - "$subpkgdir"/usr/share/libdiscover/external-appstream-urls \ - "$subpkgdir"/usr/lib/libexec/kauth/ \ - "$subpkgdir"/usr/share/polkit-1/actions/ \ - "$subpkgdir"/usr/share/dbus-1/system.d/ \ - "$subpkgdir"/usr/share/dbus-1/system-services/ - - mv "$pkgdir"/usr/lib/qt5/plugins/discover/alpineapk-backend.so \ - "$subpkgdir"/usr/lib/qt5/plugins/discover/ - mv "$pkgdir"/usr/lib/libexec/kauth/alpineapk_kauth_helper \ - "$subpkgdir"/usr/lib/libexec/kauth/ - mv "$pkgdir"/usr/share/polkit-1/actions/org.kde.discover.alpineapkbackend.policy \ - "$subpkgdir"/usr/share/polkit-1/actions/ - mv "$pkgdir"/usr/share/dbus-1/system.d/org.kde.discover.alpineapkbackend.conf \ - "$subpkgdir"/usr/share/dbus-1/system.d/ - mv "$pkgdir"/usr/share/dbus-1/system-services/org.kde.discover.alpineapkbackend.service \ - "$subpkgdir"/usr/share/dbus-1/system-services/ - - # JSON file contains placeholder for replacement - @CARCH@ - sed -i "s/@CARCH@/$CARCH/g" "$srcdir"/alpine-appstream-data.json - install -Dm644 "$srcdir"/alpine-appstream-data.json \ - "$subpkgdir"/usr/share/libdiscover/external-appstream-urls/alpine-appstream-data.json -} - -backend_fwupd() { - pkgdesc="fwupd backend for $pkgname" - depends="" - install_if="$pkgname fwupd" - - mkdir -p \ - "$subpkgdir"/usr/lib/qt5/plugins/discover - - mv "$pkgdir"/usr/lib/qt5/plugins/discover/fwupd-backend.so \ - "$subpkgdir"/usr/lib/qt5/plugins/discover/ -} - -sha512sums="f5cde987e5026eece047a32285421bf1eada4ed9496c514378c16ccd99dcfe768fc5d64caf63bbcad53295d60e21c567fd6712a09006f0adbcb66f809413ac9e discover-5.20.90.tar.xz -11240b3a8b461acc73e76fee37790e2f7c48dcb034dca8b25dc3728f97259736f2475dbd141a9fa1d7dbe44453bfcafa93178156f21db5010a3d3cd9a7c6ec73 0001-Add-support-for-Alpine-Linux-apk-backend.patch -f9f73888f8e20b317987da55028bd578de854fb34293466d1bc5deb82e32dc164916f724411de64a42235ecda37205d3f1ba26621ed7ab710b94273acce34aa3 alpine-appstream-data.json" diff --git a/temp/discover/alpine-appstream-data.json b/temp/discover/alpine-appstream-data.json deleted file mode 100644 index 810d42768..000000000 --- a/temp/discover/alpine-appstream-data.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "urls": [ - "https://appstream.alpinelinux.org/data/edge/main/Components-main-@CARCH@.xml.gz", - "https://appstream.alpinelinux.org/data/edge/community/Components-community-@CARCH@.xml.gz", - "https://appstream.alpinelinux.org/data/edge/testing/Components-testing-@CARCH@.xml.gz" - ] -} diff --git a/temp/drkonqi/APKBUILD b/temp/drkonqi/APKBUILD deleted file mode 100644 index a1dc5520f..000000000 --- a/temp/drkonqi/APKBUILD +++ /dev/null @@ -1,58 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=drkonqi -pkgver=5.20.90 -pkgrel=0 -pkgdesc="The KDE crash handler" -# armhf blocked by extra-cmake-modules -# s390x blocked by kconfigwidgets -arch="all !armhf !s390x !mips64" -url="https://kde.org/plasma-desktop/" -license="GPL-2.0-or-later" -makedepends=" - extra-cmake-modules - kcompletion-dev - kconfigwidgets-dev - kcoreaddons-dev - kcrash-dev - ki18n-dev - kidletime-dev - kio-dev - kjobwidgets-dev - knotifications-dev - kservice-dev - kwallet-dev - kwidgetsaddons-dev - kxmlrpcclient-dev - qt5-qtbase-dev - qt5-qtx11extras-dev - syntax-highlighting-dev - " - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/drkonqi-$pkgver.tar.xz" -subpackages="$pkgname-lang" -options="!check" # Broken - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DBUILD_TESTING=OFF # Broken - cmake --build build -} - -check() { - cd build - CTEST_OUTPUT_ON_FAILURE=TRUE ctest -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} - -sha512sums="a96efef5ae5c506875b3e56d9709003368946b81459abb2d63d779b7d994473cf802a68fbb04969c6ae4fd18a682d532c7091484257ed80368639436f264a667 drkonqi-5.20.90.tar.xz" diff --git a/temp/kactivitymanagerd/APKBUILD b/temp/kactivitymanagerd/APKBUILD deleted file mode 100644 index 8a4fec0a5..000000000 --- a/temp/kactivitymanagerd/APKBUILD +++ /dev/null @@ -1,50 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=kactivitymanagerd -pkgver=5.20.90 -pkgrel=0 -pkgdesc="System service to manage user's activities and track the usage patterns" -# armhf blocked by qt5-qtdeclarative -# s390x, mips64 blocked by kxmlgui, kio -arch="all !armhf !s390x !mips64" -url="https://kde.org/plasma-desktop/" -license="GPL-2.0-only OR GPL-3.0-only" -depends="qt5-qtbase-sqlite" -makedepends=" - boost-dev - extra-cmake-modules - kconfig-dev - kcoreaddons-dev - kdbusaddons-dev - kglobalaccel-dev - ki18n-dev - kio-dev - kwindowsystem-dev - kxmlgui-dev - qt5-qtbase-dev - " - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/kactivitymanagerd-$pkgver.tar.xz" -subpackages="$pkgname-lang" - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -check() { - cd build - CTEST_OUTPUT_ON_FAILURE=TRUE ctest -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} -sha512sums="cec65e26726fdd549fa28930765bd7961e72c6e10d35c0ac086461e87dfe3392a1c41eab64c8ee59065a7f067ed3a90d49003f31ab1289ce1d45a118c609a278 kactivitymanagerd-5.20.90.tar.xz" diff --git a/temp/kde-cli-tools/APKBUILD b/temp/kde-cli-tools/APKBUILD deleted file mode 100644 index 91a5c54ef..000000000 --- a/temp/kde-cli-tools/APKBUILD +++ /dev/null @@ -1,70 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=kde-cli-tools -pkgver=5.20.90 -pkgrel=0 -pkgdesc="Tools based on KDE Frameworks 5 to better interact with the system" -# armhf blocked by extra-cmake-modules -# s390x blocked by libksysguard -arch="all !armhf !s390x !mips64" -url="https://invent.kde.org/plasma/kde-cli-tools" -license="(GPL-2.0-only OR GPL-3.0-only) AND GPL-2.0-or-later AND GPL-2.0-only AND LGPL-2.1-only" -makedepends=" - extra-cmake-modules - kactivities-dev - kcmutils-dev - kconfig-dev - kdeclarative-dev - kdesu-dev - kdoctools-dev - ki18n-dev - kiconthemes-dev - kinit-dev - kio-dev - kservice-dev - kwindowsystem-dev - plasma-workspace-dev - qt5-qtbase-dev - qt5-qtsvg-dev - qt5-qtx11extras-dev - " -checkdepends="xvfb-run" - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/kde-cli-tools-$pkgver.tar.xz" -subpackages="$pkgname-doc $pkgname-lang" -options="!check" # Broken - -# Workaround a circular dependency https://gitlab.alpinelinux.org/alpine/aports/-/issues/11785 -install_if="plasma-workspace" - -prepare() { - default_prepare - - # qmlplugindump fails for armv7+qemu (pmb#1970). This is purely for - # packager knowledge and doesn't affect runtime, so we can disable it. - if [ "$CARCH" = "armv7" ]; then - sed -i "s/ecm_find_qmlmodule/# ecm_find_qmlmodule/g" CMakeLists.txt - fi -} - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -check() { - cd build - CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} -sha512sums="dcf18a4537c4d8592d952d634be4a18c1c43a37d146b42d344acc82500b321b9886a9cc6e9916a079b2c2718f79e503a89cc1aadb0d0d7f6d0384fd71fcdf774 kde-cli-tools-5.20.90.tar.xz" diff --git a/temp/kde-gtk-config/APKBUILD b/temp/kde-gtk-config/APKBUILD deleted file mode 100644 index 5ca46c78c..000000000 --- a/temp/kde-gtk-config/APKBUILD +++ /dev/null @@ -1,53 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=kde-gtk-config -pkgver=5.20.90 -pkgrel=0 -pkgdesc="GTK2 and GTK3 Configurator for KDE" -# armhf blocked by qt5-qtdeclarative -# s390x blocked by kcmutils -arch="all !armhf !s390x !mips64" -url="https://invent.kde.org/plasma/kde-gtk-config" -license="GPL-2.0 AND LGPL-2.1-only OR LGPL-3.0-only" -depends="gsettings-desktop-schemas" -makedepends=" - extra-cmake-modules - gsettings-desktop-schemas-dev - gtk+2.0-dev - gtk+3.0-dev - karchive-dev - kcmutils-dev - kconfigwidgets-dev - kdecoration-dev - ki18n-dev - kiconthemes-dev - kio-dev - knewstuff-dev - qt5-qtbase-dev - qt5-qtsvg-dev - sassc - " - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/kde-gtk-config-$pkgver.tar.xz" - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -check() { - cd build - CTEST_OUTPUT_ON_FAILURE=TRUE ctest -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} -sha512sums="e7be60e48d1b1f3e2e4ec9c47999ac79026a78658c627122ccedc51340b9422c268305f58d26802debf06162819e116a2bb5b75f81fcbbf3188e43c0b2a2d5ef kde-gtk-config-5.20.90.tar.xz" diff --git a/temp/kdecoration/APKBUILD b/temp/kdecoration/APKBUILD deleted file mode 100644 index 0e6adf9b5..000000000 --- a/temp/kdecoration/APKBUILD +++ /dev/null @@ -1,42 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=kdecoration -pkgver=5.20.90 -pkgrel=0 -pkgdesc="Plugin based library to create window decorations" -arch="all !armhf" -url="https://kde.org/plasma-desktop/" -license="LGPL-2.1-only OR LGPL-3.0-only" -depends_dev=" - ki18n-dev - qt5-qtbase-dev - " -makedepends="$depends_dev - extra-cmake-modules - " -checkdepends="xvfb-run" - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/kdecoration-$pkgver.tar.xz" -subpackages="$pkgname-dev $pkgname-lang" - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -check() { - cd build - CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} -sha512sums="e37d5c84ce6ad7b34e89e005d7e8d4c52e553a2cea093e20793cd4acf44dd2c9c2b16dc2fb27594fa5812714010564f363ff41b47f714ce0000726eb8a31e33f kdecoration-5.20.90.tar.xz" diff --git a/temp/kdeplasma-addons/APKBUILD b/temp/kdeplasma-addons/APKBUILD deleted file mode 100644 index 25e143c85..000000000 --- a/temp/kdeplasma-addons/APKBUILD +++ /dev/null @@ -1,66 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=kdeplasma-addons -pkgver=5.20.90 -pkgrel=0 -pkgdesc="All kind of addons to improve your Plasma experience" -# mips, ppc64le and s390x blocked by qt5-qtwebengine -# armhf blocked by qt5-qtdeclarative -arch="all !ppc64le !s390x !armhf !mips !mips64" -url="https://kde.org/plasma-desktop/" -license="LGPL-2.0-only AND GPL-2.0-or-later" -depends="purpose" -depends_dev=" - karchive-dev - kcmutils-dev - kconfig-dev - kcoreaddons-dev - kdeclarative-dev - kholidays-dev - ki18n-dev - kiconthemes-dev - kio-dev - knewstuff-dev - knotifications-dev - kross-dev - krunner-dev - kservice-dev - kunitconversion-dev - kwindowsystem-dev - plasma-framework-dev - qt5-qtbase-dev - qt5-qtdeclarative-dev - qt5-qtwebengine-dev - sonnet-dev - " - -makedepends="$depends_dev - extra-cmake-modules - " -checkdepends="xvfb-run" - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/kdeplasma-addons-$pkgver.tar.xz" -subpackages="$pkgname-dev $pkgname-lang" - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -check() { - cd build - # converterrunnertest is broken - CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest -E "converterrunnertest" -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} -sha512sums="5c8b3f9828ffde42d62b75f9a46a1597765a922b5a93c9ff10444a6284fbae430d58ac107baec530e4e1858915daa33f960a892dc1ce5ea3d47b108bf3d91a44 kdeplasma-addons-5.20.90.tar.xz" diff --git a/temp/kgamma5/APKBUILD b/temp/kgamma5/APKBUILD deleted file mode 100644 index 3d27a46bc..000000000 --- a/temp/kgamma5/APKBUILD +++ /dev/null @@ -1,45 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=kgamma5 -pkgver=5.20.90 -pkgrel=0 -pkgdesc="Adjust your monitor's gamma settings" -# armhf blocked by extra-cmake-modules -# s390x blocked by kconfigwidgets -arch="all !armhf !s390x !mips64" -url="https://kde.org/plasma-desktop/" -license="GPL-2.0-or-later" -makedepends=" - extra-cmake-modules - kconfig-dev - kconfigwidgets-dev - kdoctools-dev - ki18n-dev - qt5-qtbase-dev - " - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/kgamma5-$pkgver.tar.xz" -subpackages="$pkgname-doc $pkgname-lang" - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -check() { - cd build - CTEST_OUTPUT_ON_FAILURE=TRUE ctest -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} - -sha512sums="e958edb06b22d0acfae6d4184d955111435ac35deced22590574f274f5048dc83c3bf05fb6c9ecec69b31730e0f5aab94e7b9cce5d05ceacd034e58e044b00d0 kgamma5-5.20.90.tar.xz" diff --git a/temp/khotkeys/APKBUILD b/temp/khotkeys/APKBUILD deleted file mode 100644 index 1821cdfef..000000000 --- a/temp/khotkeys/APKBUILD +++ /dev/null @@ -1,63 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=khotkeys -pkgver=5.20.90 -pkgrel=0 -# armhf blocked by extra-cmake-modules -# s390x blocked by libksysguard -arch="all !armhf !s390x !mips64" -url="https://kde.org/plasma-desktop/" -pkgdesc="Key Accelerator Application" -license="GPL-2.0-only AND LGPL-2.0-or-later" -makedepends=" - extra-cmake-modules - kcmutils-dev - kdbusaddons-dev - kdelibs4support-dev - kdoctools-dev - kglobalaccel-dev - ki18n-dev - kio-dev - kxmlgui-dev - plasma-framework-dev - plasma-workspace-dev - qt5-qtbase-dev - qt5-qtx11extras-dev - " - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/khotkeys-$pkgver.tar.xz" -subpackages="$pkgname-doc $pkgname-lang $pkgname-dev" -options="!check" # No tests - -prepare() { - default_prepare - - # qmlplugindump fails for armv7+qemu (pmb#1970). This is purely for - # packager knowledge and doesn't affect runtime, so we can disable it. - if [ "$CARCH" = "armv7" ]; then - sed -i "s/ecm_find_qmlmodule/# ecm_find_qmlmodule/g" CMakeLists.txt - fi -} - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -check() { - cd build - CTEST_OUTPUT_ON_FAILURE=TRUE ctest -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} - -sha512sums="d6d01c63e26b362fbc58d0f27032a9aeb95a53b901a89c0cbf2925ca65980dec565999961061d9c746d4d3fc6441fb6579ae323ced86a48b485f26711c73b901 khotkeys-5.20.90.tar.xz" diff --git a/temp/kinfocenter/APKBUILD b/temp/kinfocenter/APKBUILD deleted file mode 100644 index e62875b78..000000000 --- a/temp/kinfocenter/APKBUILD +++ /dev/null @@ -1,72 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=kinfocenter -pkgver=5.20.90 -pkgrel=0 -pkgdesc="A utility that provides information about a computer system" -# armhf blocked by extra-cmake-modules -# mips64, s390x blocked by kconfigwidgets, polkit-qt -arch="all !armhf !s390x !mips !mips64" -url="https://kde.org/plasma-desktop/" -license="(GPL-2.0-only OR GPL-3.0-only) AND (LGPL-2.1-only OR LGPL-3.0-only)" -makedepends=" - extra-cmake-modules - glu-dev - kcmutils-dev - kcompletion-dev - kconfig-dev - kconfigwidgets-dev - kcoreaddons-dev - kcrash-dev - kdbusaddons-dev - kdeclarative-dev - kdoctools-dev - ki18n-dev - kiconthemes-dev - kio-dev - kpackage-dev - kservice-dev - kwayland-dev - kwidgetsaddons-dev - kwindowsystem-dev - kxmlgui-dev - qt5-qtbase-dev - solid-dev - solid-dev - " - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/kinfocenter-$pkgver.tar.xz" -subpackages="$pkgname-doc $pkgname-lang" - -prepare() { - default_prepare - - # qmlplugindump fails for armv7+qemu (pmb#1970). This is purely for - # packager knowledge and doesn't affect runtime, so we can disable it. - if [ "$CARCH" = "armv7" ]; then - sed -i "s/ecm_find_qmlmodule/# ecm_find_qmlmodule/g" CMakeLists.txt - fi -} - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -check() { - cd build - CTEST_OUTPUT_ON_FAILURE=TRUE ctest -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} - -sha512sums="ae185908db0f59199fef49d4a684e32971efb7b76f4372c9110b820b93b9a7b9676b80412c659ff172eaa6ed7562d88fdf5568b87e246dbea43f9d508bb52cac kinfocenter-5.20.90.tar.xz" diff --git a/temp/kmenuedit/APKBUILD b/temp/kmenuedit/APKBUILD deleted file mode 100644 index 6e58fee08..000000000 --- a/temp/kmenuedit/APKBUILD +++ /dev/null @@ -1,51 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=kmenuedit -pkgver=5.20.90 -pkgrel=0 -pkgdesc="KDE menu editor" -# armhf blocked by qt5-qtdeclarative -# s390x and mips64 blocked by polkit (blocked by mozjs, blocked by rust) -arch="all !armhf !s390x !mips64" -url="https://kde.org/plasma-desktop/" -license="GPL-2.0-or-later" -makedepends=" - extra-cmake-modules - kdbusaddons-dev - kdoctools-dev - kglobalaccel-dev - ki18n-dev - kiconthemes-dev - kinit-dev - kio-dev - kitemviews-dev - kxmlgui-dev - qt5-qtbase-dev - sonnet-dev - " - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/kmenuedit-$pkgver.tar.xz" -subpackages="$pkgname-doc $pkgname-lang" - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -check() { - cd build - CTEST_OUTPUT_ON_FAILURE=TRUE ctest -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} - -sha512sums="86482093b8667922b19a983c575cc6ffe3657c9c1354efaefed0a70d039a3ca138b1a2ffff306f3b61dff3c6695efbcbcd7713626781252030dd4a51e4de456d kmenuedit-5.20.90.tar.xz" diff --git a/temp/kscreen/APKBUILD b/temp/kscreen/APKBUILD deleted file mode 100644 index 6353ffc6a..000000000 --- a/temp/kscreen/APKBUILD +++ /dev/null @@ -1,57 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=kscreen -pkgver=5.20.90 -pkgrel=0 -pkgdesc="KDE's screen management software" -# armhf blocked by qt5-qtdeclarative -# s390x blocked by kconfigwidgets -arch="all !armhf !s390x !mips64" -url="https://kde.org/plasma-desktop/" -license="GPL-2.0-or-later AND LGPL-2.1-or-later" -depends="hicolor-icon-theme" -makedepends=" - extra-cmake-modules - kcmutils-dev - kconfig-dev - kconfigwidgets-dev - kdbusaddons-dev - kdeclarative-dev - kglobalaccel-dev - ki18n-dev - kiconthemes-dev - kwidgetsaddons-dev - kxmlgui-dev - libkscreen-dev - plasma-framework-dev - qt5-qtbase-dev - qt5-qtsensors-dev - " -checkdepends="xvfb-run" - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/kscreen-$pkgver.tar.xz" -subpackages="$pkgname-lang" - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -check() { - cd build - # kscreen-kded-configtest is broken - CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest -E "kscreen-kded-configtest" -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} - -sha512sums="ae3e28aecb62479fec4b5f5e9f4d971cb4a80640182f726841ff7d232b9b8a8d1520e279d16d7a968280529e835883fc3cdc3f96a9f3e0ac8dbbd0493ffe46b5 kscreen-5.20.90.tar.xz" diff --git a/temp/kscreenlocker/APKBUILD b/temp/kscreenlocker/APKBUILD deleted file mode 100644 index 7bdc3a4cc..000000000 --- a/temp/kscreenlocker/APKBUILD +++ /dev/null @@ -1,74 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=kscreenlocker -pkgver=5.20.90 -pkgrel=0 -pkgdesc="Library and components for secure lock screen architecture" -# armhf blocked by extra-cmake-modules -# s390x, mips64 blocked by kdeclarative-dev, kcmutils-dev, ktextwidgets-dev, kxmlgui-dev -arch="all !armhf !s390x !mips64" -url="https://kde.org/plasma-desktop/" -license="GPL-2.0-or-later AND (GPL-2.0-only OR GPL-3.0-only)" -depends=" - elogind - linux-pam - " -depends_dev=" - elogind-dev - kcmutils-dev - kcrash-dev - kdeclarative-dev - kglobalaccel-dev - ki18n-dev - kidletime-dev - knotifications-dev - ktextwidgets-dev - kwayland-dev - kwindowsystem-dev - kxmlgui-dev - libseccomp-dev - linux-pam-dev - qt5-qtbase-dev - qt5-qtx11extras-dev - solid-dev - xcb-util-keysyms-dev - " -makedepends="$depends_dev - extra-cmake-modules - " -checkdepends="xvfb-run" - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/kscreenlocker-$pkgver.tar.xz - kde.pam - kde-np.pam - " -subpackages="$pkgname-dev $pkgname-lang" -options="!check" # Requires running loginctl - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -check() { - cd build - CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest -} - -package() { - DESTDIR="$pkgdir" cmake --install build - - install -D -m644 "$srcdir"/kde.pam "$pkgdir"/etc/pam.d/kde - install -m644 "$srcdir"/kde-np.pam "$pkgdir"/etc/pam.d/kde-np -} - -sha512sums="be176a5f34bf2a0d82a604937354680cb2c04e5d7f21d88c5db2e19e4069d7a83bea5fdbd55c9fd0bb2636086d8ce348f0641c034f8b052ebbb3a210e9a137cb kscreenlocker-5.20.90.tar.xz -56e87d02d75c4a8cc4ed183faed416fb4972e7f223b8759959c0f5da32e11e657907a1df279d62a44a6a174f5aca8b2ac66a5f3325c5deb92011bcf71eed74c3 kde.pam -565265485dd7466b77966d75a56766216b8bcc187c95a997e531e9481cf50ddbe576071eb0e334421202bcab19aa6de6b93e042447ca4797a24bf97e1d053ffd kde-np.pam" diff --git a/temp/kscreenlocker/kde-np.pam b/temp/kscreenlocker/kde-np.pam deleted file mode 100644 index 07b7861ed..000000000 --- a/temp/kscreenlocker/kde-np.pam +++ /dev/null @@ -1,10 +0,0 @@ -#%PAM-1.0 - -auth required pam_nologin.so -auth required pam_permit.so - -account include base-account - -password include base-password - -session include base-session-noninteractive diff --git a/temp/kscreenlocker/kde.pam b/temp/kscreenlocker/kde.pam deleted file mode 100644 index 1b9e446ce..000000000 --- a/temp/kscreenlocker/kde.pam +++ /dev/null @@ -1,11 +0,0 @@ -#%PAM-1.0 - -auth required pam_nologin.so - -auth include base-auth - -account include base-account - -password include base-password - -session include base-session-noninteractive diff --git a/temp/ksshaskpass/APKBUILD b/temp/ksshaskpass/APKBUILD deleted file mode 100644 index 471cb794b..000000000 --- a/temp/ksshaskpass/APKBUILD +++ /dev/null @@ -1,46 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=ksshaskpass -pkgver=5.20.90 -pkgrel=0 -pkgdesc="ssh-add helper that uses kwallet and kpassworddialog" -# armhf blocked by qt5-qtdeclarative -# s390x blocked by kwallet -arch="all !armhf !s390x !mips64" -url="https://kde.org/plasma-desktop/" -license="GPL-2.0-or-later" -makedepends=" - extra-cmake-modules - kcoreaddons-dev - kdoctools-dev - ki18n-dev - kwallet-dev - kwidgetsaddons-dev - qt5-qtbase-dev - " - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/ksshaskpass-$pkgver.tar.xz" -subpackages="$pkgname-doc $pkgname-lang" - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -check() { - cd build - CTEST_OUTPUT_ON_FAILURE=TRUE ctest -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} - -sha512sums="7a04cee55b68994e6b5cbc363242372966559bc7f739131e2f145d543624a73364f75a60e552dad4d06e8df284d54b035c45632463c23f2136815de9a54d99fd ksshaskpass-5.20.90.tar.xz" diff --git a/temp/ksysguard/APKBUILD b/temp/ksysguard/APKBUILD deleted file mode 100644 index 62eef9f8a..000000000 --- a/temp/ksysguard/APKBUILD +++ /dev/null @@ -1,55 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=ksysguard -pkgver=5.20.90 -pkgrel=0 -pkgdesc="Track and control the processes running in your system" -# armhf blocked by extra-cmake-modules -# s390x blocked by libksysguard -arch="all !armhf !s390x !mips64" -url="https://userbase.kde.org/KSysGuard" -license="GPL-2.0-only" -makedepends=" - extra-cmake-modules - kconfig-dev - kcoreaddons-dev - kdbusaddons-dev - kdoctools-dev - ki18n-dev - kiconthemes-dev - kinit-dev - kio-dev - kitemviews-dev - knewstuff-dev - knotifications-dev - kwindowsystem-dev - libksysguard-dev - libnl3-dev - lm-sensors-dev - " - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/ksysguard-$pkgver.tar.xz" -subpackages="$pkgname-doc $pkgname-lang" - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -check() { - cd build - # ksystemstatstest is broken - CTEST_OUTPUT_ON_FAILURE=TRUE ctest -E "ksystemstatstest" -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} -sha512sums="41f333afb89c2a8bb0f22a439a16cbc3080892416bae30711009899e49ae7b93e98b6d00cdc92b01520f0bb7b907bda6c23d3522026d4acd70bafcb12faaa638 ksysguard-5.20.90.tar.xz" diff --git a/temp/kwallet-pam/APKBUILD b/temp/kwallet-pam/APKBUILD deleted file mode 100644 index 546fc2e02..000000000 --- a/temp/kwallet-pam/APKBUILD +++ /dev/null @@ -1,39 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=kwallet-pam -pkgver=5.20.90 -pkgrel=0 -pkgdesc="KWallet PAM integration" -# armhf blocked by extra-cmake-modules -# s390x blocked by kwallet -arch="all !armhf !s390x !mips64" -url="https://kde.org/plasma-desktop/" -license="LGPL-2.1-or-later" -makedepends=" - extra-cmake-modules - kwallet-dev - libgcrypt-dev - linux-pam-dev - socat - " - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/kwallet-pam-$pkgver.tar.xz" -options="!check" # No tests available - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} - -sha512sums="1c3bd0c0873d988893349cac827e5710a9d0c5e393a609bc5e681fcd59749fc09ad563bd131450e6f0df58e0c96a1dc204a2760eb5ccee2b959894365fb9ee77 kwallet-pam-5.20.90.tar.xz" diff --git a/temp/kwayland-integration/APKBUILD b/temp/kwayland-integration/APKBUILD deleted file mode 100644 index bebaf3363..000000000 --- a/temp/kwayland-integration/APKBUILD +++ /dev/null @@ -1,39 +0,0 @@ -# Contributor: Bhushan Shah -# Maintainer: Bart Ribbers -pkgname=kwayland-integration -pkgver=5.20.90 -pkgrel=0 -pkgdesc="KWayland integration" -url="https://kde.org/plasma-desktop/" -arch="all !armhf" # armhf blocked by extra-cmake-modules -license="LGPL-2.1-only OR LGPL-3.0-only" -depends="kglobalaccel" -makedepends=" - extra-cmake-modules - kguiaddons-dev - kidletime-dev - kwayland-dev - kwindowsystem-dev - qt5-qtbase-dev - " - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/kwayland-integration-$pkgver.tar.xz" -options="!check" # Broken - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} - -sha512sums="dee94db3ddea3bbc19e471244b4cd352b7b0eaaaf7946935d693d12f91d28f35b979f35e37dc956e1c2f57d869199931cfe8ab7cec95d9ee6806e589ce405649 kwayland-integration-5.20.90.tar.xz" diff --git a/temp/kwayland-server/APKBUILD b/temp/kwayland-server/APKBUILD deleted file mode 100644 index 30896dbd5..000000000 --- a/temp/kwayland-server/APKBUILD +++ /dev/null @@ -1,43 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=kwayland-server -pkgver=5.20.90 -pkgrel=0 -pkgdesc="Wayland Server Components built on KDE Frameworks" -arch="all !armhf" # armhf blocked by qt5-qtdeclarative -url="https://kde.org/plasma-desktop/" -license="GPL-2.0-or-later AND (GPL-2.0-only OR GPL-3.0-only) AND LGPL-2.1-only" -depends_dev=" - kwayland-dev - plasma-wayland-protocols - qt5-qtbase-dev - " -makedepends="$depends_dev - doxygen - extra-cmake-modules - linux-headers - qt5-qttools-dev - wayland-protocols - " - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/kwayland-server-$pkgver.tar.xz" -subpackages="$pkgname-dev" -options="!check" # Requires running wayland compositor - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DBUILD_QCH=ON - cmake --build build -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} -sha512sums="027aff53b57022857b0ec63178f64b55f0f8ba18789fa3edaa09a3be06f32f3a75031c787ec8e6d77beac6878dba88bc0a25fbb881246c2c74ed7e005164dca0 kwayland-server-5.20.90.tar.xz" diff --git a/temp/kwin/APKBUILD b/temp/kwin/APKBUILD deleted file mode 100644 index 54e7fbbca..000000000 --- a/temp/kwin/APKBUILD +++ /dev/null @@ -1,121 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=kwin -pkgver=5.20.90 -pkgrel=0 -pkgdesc="An easy to use, but flexible, composited Window Manager" -# armhf blocked by qt5-qtdeclarative -# s390x blocked by kscreenlocker -arch="all !armhf !s390x !mips64" -url="https://kde.org/plasma-desktop/" -license="GPL-2.0-or-later AND (GPL-2.0-only OR GPL-3.0-only) AND LGPL-2.1-only" -depends=" - kirigami2 - qt5-qtmultimedia - qt5-qtwayland - xorg-server-xwayland - " -depends_dev=" - breeze-dev - eudev-dev - fontconfig-dev - kactivities-dev - kcmutils-dev - kcompletion-dev - kconfig-dev - kconfigwidgets-dev - kcoreaddons-dev - kcrash-dev - kdeclarative-dev - kdecoration-dev - kglobalaccel-dev - ki18n-dev - kiconthemes-dev - kidletime-dev - kinit-dev - kio-dev - knewstuff-dev - knotifications-dev - kpackage-dev - krunner-dev - kscreenlocker-dev - kservice-dev - ktextwidgets-dev - kwayland-dev - kwayland-server-dev - kwidgetsaddons-dev - kwindowsystem-dev - kxmlgui-dev - lcms2-dev - libdrm-dev - libepoxy-dev - libinput-dev - libxi-dev - libxkbcommon-dev - mesa-dev - mesa-gbm - pipewire-dev - plasma-framework-dev - qt5-qtbase-dev - qt5-qtdeclarative-dev - qt5-qtscript-dev - qt5-qtsensors-dev - qt5-qtx11extras-dev - wayland-dev - xcb-util-cursor-dev - xcb-util-image-dev - xcb-util-wm-dev - " -makedepends="$depends_dev - extra-cmake-modules - kdoctools-dev - qt5-qttools-dev - " -checkdepends="xvfb-run" - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/kwin-$pkgver.tar.xz - fix-build-with-musl.patch - " -subpackages="$pkgname-dev $pkgname-doc $pkgname-lang" -options="!check" # Broken - -prepare() { - default_prepare - - # qmlplugindump fails for armv7+qemu (pmb#1970). This is purely for - # packager knowledge and doesn't affect runtime, so we can disable it. - if [ "$CARCH" = "armv7" ]; then - for i in $(find -name CMakeLists.txt); do - echo "Disabling ecm_find_qmlmodule in: $i" - sed -i "s/ecm_find_qmlmodule/# ecm_find_qmlmodule/g" "$i" - done - fi -} - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -check() { - cd build - CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest -} - -package() { - DESTDIR="$pkgdir" cmake --install build - - # kwin_wayland has CAP_SYS_NICE set. Because of this, libdbus doesn't trust the - # environment and ignores it, causing for example keyboard shortcuts to not work - # Remove CAP_SYS_NICE from kwin_wayland to make them work again - setcap -r "$pkgdir"/usr/bin/kwin_wayland -} -sha512sums="6c2f3069c353820ce6f26b5175551d0998a5e859c3e2924d1126eafaa251d644bca5b1275672d3be3a4b358d30ae6f3ef5ccd62c64117110347c39cef630e9ef kwin-5.20.90.tar.xz -7d4e3e009d1b198c2d6fe1306a1d7bf444a86edf58514484287fb39723a2750a0e7a74b739fe7795cb0fdf77c81e7c23cd582d47e90e3957434ceb09c26c7c6e fix-build-with-musl.patch" diff --git a/temp/kwin/fix-build-with-musl.patch b/temp/kwin/fix-build-with-musl.patch deleted file mode 100644 index 49e147226..000000000 --- a/temp/kwin/fix-build-with-musl.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 7db93b7cd7ab860eb05e5267797e24430caa918a Mon Sep 17 00:00:00 2001 -From: Heiko Becker -Date: Thu, 21 Jan 2021 22:00:33 +0100 -Subject: [PATCH 1/2] Replace uint with unsigned int - -Improves portability by avoiding the non-standard 'uint'. For example -this fixes building with musl libc: - -".../kwin_wrapper.c:45:9: error: unknown type name 'uint'; - did you mean 'int'?" ---- - helpers/wayland_wrapper/kwin_wrapper.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/helpers/wayland_wrapper/kwin_wrapper.c b/helpers/wayland_wrapper/kwin_wrapper.c -index 061e05c06..6cd221da7 100644 ---- a/helpers/wayland_wrapper/kwin_wrapper.c -+++ b/helpers/wayland_wrapper/kwin_wrapper.c -@@ -42,7 +42,7 @@ pid_t launch_kwin(struct wl_socket *socket, int argc, char **argv) - snprintf(fdString, sizeof(fdString) - 1, "%d", wl_socket_get_fd(socket)); - - char **args = calloc(argc + 6, sizeof(char *)); -- uint pos = 0; -+ unsigned int pos = 0; - args[pos++] = (char *)"kwin_wayland"; //process name is the first argument by convention - args[pos++] = (char *)"--wayland_fd"; - args[pos++] = fdString; --- -GitLab - - -From 44713ac64280b5e48b47199dace333b128920b73 Mon Sep 17 00:00:00 2001 -From: Heiko Becker -Date: Thu, 21 Jan 2021 22:18:33 +0100 -Subject: [PATCH 2/2] Include for open() - -According to POSIX [1] that's where it is defined. - -[1] https://pubs.opengroup.org/onlinepubs/009604499/basedefs/fcntl.h.html ---- - helpers/wayland_wrapper/wl-socket.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/helpers/wayland_wrapper/wl-socket.c b/helpers/wayland_wrapper/wl-socket.c -index 4110e9529..34eb59305 100644 ---- a/helpers/wayland_wrapper/wl-socket.c -+++ b/helpers/wayland_wrapper/wl-socket.c -@@ -10,6 +10,7 @@ - - #include - #include -+#include - #include - #include - #include --- -GitLab - diff --git a/temp/kwrited/APKBUILD b/temp/kwrited/APKBUILD deleted file mode 100644 index 9910f7340..000000000 --- a/temp/kwrited/APKBUILD +++ /dev/null @@ -1,39 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=kwrited -pkgver=5.20.90 -pkgrel=0 -pkgdesc="KDE daemon listening for wall and write messages" -arch="all !armhf" # qt5-qtdeclarative-dev unavilable on armhf -url="https://kde.org/plasma-desktop/" -license="GPL-2.0-or-later" -makedepends=" - extra-cmake-modules - kcoreaddons-dev - kdbusaddons-dev - ki18n-dev - knotifications-dev - kpty-dev - qt5-qtbase-dev - " - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/kwrited-$pkgver.tar.xz" -options="!check" # No tests available - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} - -sha512sums="d7f2a541851e80701ec15c33578257d5743709853c4056be071258ce08c59d9ab3b55d96f92f2464cad62d82c04b013642a44c1239acc5b773e223c2a8d58294 kwrited-5.20.90.tar.xz" diff --git a/temp/libkscreen/APKBUILD b/temp/libkscreen/APKBUILD deleted file mode 100644 index 97ab778e2..000000000 --- a/temp/libkscreen/APKBUILD +++ /dev/null @@ -1,47 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=libkscreen -pkgver=5.20.90 -pkgrel=0 -pkgdesc="KDE screen management software" -arch="all !armhf" # armhf blocked by extra-cmake-modules -url="https://kde.org/plasma-desktop/" -license="LGPL-2.1-or-later AND GPL-2.0-or-later AND (GPL-2.0-only OR GPL-3.0-only)" -depends_dev=" - kwayland-dev - qt5-qtbase-dev - qt5-qtx11extras-dev - " -makedepends="$depends_dev - doxygen - extra-cmake-modules - graphviz - qt5-qttools-dev - " - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/libkscreen-$pkgver.tar.xz" -subpackages="$pkgname-dev $pkgname-doc" -options="!check" # Fails due to requiring dbus-x11 and it running - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DBUILD_QCH=ON - cmake --build build -} - -check() { - cd build - CTEST_OUTPUT_ON_FAILURE=TRUE ctest -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} -sha512sums="e2c23b3a0a7093f6b197500c48c3d66d996be9d27d905544e8d13823ae0363d6613825f00292ffb810d12e96ce8f9b5cd10669c2af38fe62beaa93cd0ecef995 libkscreen-5.20.90.tar.xz" diff --git a/temp/libksysguard/APKBUILD b/temp/libksysguard/APKBUILD deleted file mode 100644 index 7de0cef16..000000000 --- a/temp/libksysguard/APKBUILD +++ /dev/null @@ -1,60 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=libksysguard -pkgver=5.20.90 -pkgrel=0 -pkgdesc="KDE system monitor library" -# armhf blocked by extra-cmake-modules -# mips, mips64, s390x blocked by kauth -arch="all !armhf !mips !mips64 !s390x" -url="https://kde.org/plasma-desktop/" -license="LGPL-2.1-or-later AND (GPL-2.0-only OR GPL-3.0-only)" -depends_dev=" - kauth-dev - kcompletion-dev - kconfig-dev - kconfigwidgets-dev - kcoreaddons-dev - kglobalaccel-dev - ki18n-dev - kiconthemes-dev - kio-dev - knewstuff-dev - kservice-dev - kwidgetsaddons-dev - kwindowsystem-dev - plasma-framework-dev - qt5-qttools-dev - qt5-qtwebchannel-dev - zlib-dev - " -makedepends="$depends_dev - extra-cmake-modules - " -checkdepends="xvfb-run" - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/libksysguard-$pkgver.tar.xz" -subpackages="$pkgname-dev $pkgname-lang" - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -check() { - cd build - # processtest requires working OpenGL - CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest -E "processtest" -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} -sha512sums="17ff0052eaf2176839fc2dd09e3c4bdb580669d5518fdace7a01c40bd980db65af04b30468ab0cf2a1673e2a8222cb5e659bcea816c19b801c176b3c85f72bde libksysguard-5.20.90.tar.xz" diff --git a/temp/mauikit/APKBUILD b/temp/mauikit/APKBUILD deleted file mode 100644 index 1714c1f54..000000000 --- a/temp/mauikit/APKBUILD +++ /dev/null @@ -1,66 +0,0 @@ -# Maintainer: Bart Ribbers -pkgname=mauikit -pkgver=1.2.0 -pkgrel=1 -pkgdesc="Kit for developing MAUI Apps" -# armhf blocked by qt5-qtdeclarative -# mips64, s390x blocked by plasma-framework -arch="all !armhf !mips64 !s390x" -url="https://invent.kde.org/kde/mauikit" -license="GPL-2.0-or-later" -depends="kirigami2" -depends_dev=" - kconfig-dev - kconfigwidgets-dev - kdeclarative-dev - kdecoration-dev - ki18n-dev - kio-dev - knotifications-dev - kservice-dev - plasma-framework-dev - qt5-qtbase-dev - qt5-qtdeclarative-dev - qt5-qtquickcontrols2-dev - qt5-qtsvg-dev - syntax-highlighting-dev - " -makedepends="$depends_dev - extra-cmake-modules - " -source="https://invent.kde.org/maui/mauikit/-/archive/v$pkgver/mauikit-v$pkgver.tar.gz - fix-compilation-with-master-kdecoration2.patch - guard-against-correct-kdecoration-version.patch - " -subpackages="$pkgname-dev" -builddir="$srcdir/$pkgname-v$pkgver" - -prepare() { - default_prepare - - # qmlplugindump fails for armv7+qemu (pmb#1970). This is purely for - # packager knowledge and doesn't affect runtime, so we can disable it. - if [ "$CARCH" = "armv7" ]; then - sed -i "s/ecm_find_qmlmodule/# ecm_find_qmlmodule/g" CMakeLists.txt - fi -} - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -check() { - cd build - CTEST_OUTPUT_ON_FAILURE=TRUE ctest -} - -package() { - DESTDIR="$pkgdir" cmake --build build --target install -} -sha512sums="55795e332053b49edf4ea966ea19dbe804ba671587a6bf72e5cbe2f52acc5df0661235a4f38cf555a390c2701da1ddfa6ed6800576d385a72cd422996b1538a5 mauikit-v1.2.0.tar.gz -75bf24a91679ce07654ad2cbaa23494f95606cdceecc28765d180da71abbe85c688b18923ed86d49bb7c3f68ab859e87e7ac057057c338478f96ce1aa2aa6a69 fix-compilation-with-master-kdecoration2.patch -88bbdb35841609e69bd9a47191717d6ced52f983703b00e50d153fc07f8fa2bca7626ecfa9cca90539c5a8b07dab2ebc1b6498feb5600bc49e8a75a1275ee7b7 guard-against-correct-kdecoration-version.patch" diff --git a/temp/mauikit/fix-compilation-with-master-kdecoration2.patch b/temp/mauikit/fix-compilation-with-master-kdecoration2.patch deleted file mode 100644 index 1c15a4eca..000000000 --- a/temp/mauikit/fix-compilation-with-master-kdecoration2.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 535ee9e32a33603c723bd6a4a5ce59955fa48b38 Mon Sep 17 00:00:00 2001 -From: Carl Schwan -Date: Sat, 28 Nov 2020 12:16:18 +0100 -Subject: [PATCH] Fix compilation with master kdecoration2 - ---- - src/csd/libappletdecoration/previewclient.cpp | 6 ++++++ - src/csd/libappletdecoration/previewclient.h | 4 ++++ - 2 files changed, 10 insertions(+) - -diff --git a/src/csd/libappletdecoration/previewclient.cpp b/src/csd/libappletdecoration/previewclient.cpp -index 907d02f..425b983 100644 ---- a/src/csd/libappletdecoration/previewclient.cpp -+++ b/src/csd/libappletdecoration/previewclient.cpp -@@ -426,8 +426,14 @@ void PreviewClient::requestToggleKeepBelow() - setKeepBelow(!isKeepBelow()); - } - -+#if KDECORATION2_VERSION_MINOR >= 77 -+void PreviewClient::requestShowWindowMenu(const QRect &rect) -+{ -+ Q_UNUSED(rect); -+#else - void PreviewClient::requestShowWindowMenu() - { -+#end - emit showWindowMenuRequested(); - } - -diff --git a/src/csd/libappletdecoration/previewclient.h b/src/csd/libappletdecoration/previewclient.h -index dabbc67..dabf411 100644 ---- a/src/csd/libappletdecoration/previewclient.h -+++ b/src/csd/libappletdecoration/previewclient.h -@@ -119,7 +119,11 @@ public: - void requestToggleKeepAbove() override; - void requestToggleKeepBelow() override; - void requestToggleShade() override; -+#if KDECORATION2_VERSION_MINOR >= 77 -+ void requestShowWindowMenu(const QRect &rect) override; -+#else - void requestShowWindowMenu() override; -+#endif - void requestShowApplicationMenu(const QRect &rect, int actionId) override; - void requestToggleOnAllDesktops() override; - --- -GitLab - diff --git a/temp/mauikit/guard-against-correct-kdecoration-version.patch b/temp/mauikit/guard-against-correct-kdecoration-version.patch deleted file mode 100644 index 9ea69b3c6..000000000 --- a/temp/mauikit/guard-against-correct-kdecoration-version.patch +++ /dev/null @@ -1,48 +0,0 @@ -From d1ef99f8f8f4ee371485a470df53a495f5e5a830 Mon Sep 17 00:00:00 2001 -From: Carl Schwan -Date: Sat, 28 Nov 2020 12:30:00 +0100 -Subject: [PATCH] Guard against correct version - ---- - src/csd/libappletdecoration/previewclient.cpp | 4 ++-- - src/csd/libappletdecoration/previewclient.h | 3 ++- - 2 files changed, 4 insertions(+), 3 deletions(-) - -diff --git a/src/csd/libappletdecoration/previewclient.cpp b/src/csd/libappletdecoration/previewclient.cpp -index 425b983..d62a4a1 100644 ---- a/src/csd/libappletdecoration/previewclient.cpp -+++ b/src/csd/libappletdecoration/previewclient.cpp -@@ -426,14 +426,14 @@ void PreviewClient::requestToggleKeepBelow() - setKeepBelow(!isKeepBelow()); - } - --#if KDECORATION2_VERSION_MINOR >= 77 -+#if KDECORATION2_VERSION_MINOR >= 20 - void PreviewClient::requestShowWindowMenu(const QRect &rect) - { - Q_UNUSED(rect); - #else - void PreviewClient::requestShowWindowMenu() - { --#end -+#endif - emit showWindowMenuRequested(); - } - -diff --git a/src/csd/libappletdecoration/previewclient.h b/src/csd/libappletdecoration/previewclient.h -index dabf411..f95f215 100644 ---- a/src/csd/libappletdecoration/previewclient.h -+++ b/src/csd/libappletdecoration/previewclient.h -@@ -119,7 +119,8 @@ public: - void requestToggleKeepAbove() override; - void requestToggleKeepBelow() override; - void requestToggleShade() override; --#if KDECORATION2_VERSION_MINOR >= 77 -+ -+#if KDECORATION2_VERSION_MINOR >= 20 - void requestShowWindowMenu(const QRect &rect) override; - #else - void requestShowWindowMenu() override; --- -GitLab - diff --git a/temp/milou/APKBUILD b/temp/milou/APKBUILD deleted file mode 100644 index 3ae9ae720..000000000 --- a/temp/milou/APKBUILD +++ /dev/null @@ -1,48 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=milou -pkgver=5.20.90 -pkgrel=0 -pkgdesc="A dedicated search application built on top of Baloo" -# armhf blocked by qt5-qtdeclarative -# s390x blocked by kdeclarative -arch="all !armhf !s390x !mips64" -url="https://kde.org/plasma-desktop/" -license="GPL-2.0-or-later AND (GPL-2.0-only OR GPL-3.0-only) AND (LGPL-2.1-only OR LGPL-3.0-only)" -makedepends=" - extra-cmake-modules - kcoreaddons-dev - kdeclarative-dev - ki18n-dev - kitemmodels-dev - krunner-dev - kservice-dev - plasma-framework-dev - qt5-qtbase-dev - qt5-qtdeclarative-dev - " - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/milou-$pkgver.tar.xz" -subpackages="$pkgname-lang" - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -check() { - cd build - CTEST_OUTPUT_ON_FAILURE=TRUE ctest -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} -sha512sums="d803db74cbf11120b75d490cd7320507ee2708fa39148affd8c61be563a8e9fc9f13471796b4110aa0afc2ce423d091a1039d68f67c61494f710003450dcce66 milou-5.20.90.tar.xz" diff --git a/temp/oxygen/APKBUILD b/temp/oxygen/APKBUILD deleted file mode 100644 index a6e63b305..000000000 --- a/temp/oxygen/APKBUILD +++ /dev/null @@ -1,57 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=oxygen -pkgver=5.20.90 -pkgrel=0 -pkgdesc="Artwork, styles and assets for the Oxygen visual style for the Plasma Desktop" -# armhf blocked by extra-cmake-modules -# s390x and mips64 blocked by frameworkintegration -arch="all !armhf !s390x !mips64" -url="https://kde.org/plasma-desktop/" -license="LGPL-2.1-or-later" -makedepends=" - extra-cmake-modules - frameworkintegration-dev - kcmutils-dev - kcompletion-dev - kconfig-dev - kdecoration-dev - kguiaddons-dev - ki18n-dev - kservice-dev - kwayland-dev - kwidgetsaddons-dev - kwindowsystem-dev - qt5-qtbase-dev - xcb-util-dev - " - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/oxygen-$pkgver.tar.xz" -subpackages="$pkgname-lang $pkgname-sounds::noarch" - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -check() { - cd build - CTEST_OUTPUT_ON_FAILURE=TRUE ctest -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} - -sounds() { - pkgdesc="$pkgdesc (sounds)" - amove usr/share/sounds -} -sha512sums="53f0ca2908939cf2fe6fca452f29b6f6f1ab4c876fc31ffcce7bf3298c0a04ee7c5e7ed40da5b8b8415535ba01da02d22b574146b51c102e904fba6aae8e7d13 oxygen-5.20.90.tar.xz" diff --git a/temp/plasma-browser-integration/APKBUILD b/temp/plasma-browser-integration/APKBUILD deleted file mode 100644 index 57c8c5055..000000000 --- a/temp/plasma-browser-integration/APKBUILD +++ /dev/null @@ -1,61 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=plasma-browser-integration -pkgver=5.20.90 -pkgrel=0 -pkgdesc="Components necessary to integrate browsers into the Plasma Desktop" -# armhf blocked by extra-cmake-modules -# s390x, mips64 blocked by kio-dev, krunner-dev, purpose-dev -arch="all !armhf !s390x !mips64" -url="https://community.kde.org/Plasma/Browser_Integration" -license="GPL-3.0-or-later" -makedepends=" - extra-cmake-modules - kactivities-dev - kconfig-dev - kdbusaddons-dev - kfilemetadata-dev - ki18n-dev - kio-dev - knotifications-dev - krunner-dev - plasma-workspace-dev - purpose-dev - qt5-qtbase-dev - " - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/plasma-browser-integration-$pkgver.tar.xz" -subpackages="$pkgname-lang" - -prepare() { - default_prepare - - # qmlplugindump fails for armv7+qemu (pmb#1970). This is purely for - # packager knowledge and doesn't affect runtime, so we can disable it. - if [ "$CARCH" = "armv7" ]; then - sed -i "s/ecm_find_qmlmodule/# ecm_find_qmlmodule/g" CMakeLists.txt - fi -} - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -check() { - cd build - CTEST_OUTPUT_ON_FAILURE=TRUE ctest -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} - -sha512sums="57b41406857b4a4f7013d4e4d7c09c84a29ba4c50aac1bb8ad3c4d3edda169c621da2cfe87e747a6656f6ef82a4f2c45d2b08bcf451fcce580639616a733bca8 plasma-browser-integration-5.20.90.tar.xz" diff --git a/temp/plasma-desktop/APKBUILD b/temp/plasma-desktop/APKBUILD deleted file mode 100644 index ecb1e8e42..000000000 --- a/temp/plasma-desktop/APKBUILD +++ /dev/null @@ -1,108 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=plasma-desktop -pkgver=5.20.90 -pkgrel=0 -pkgdesc="KDE Plasma Desktop" -# s390x, mips, mips64 blocked by ibus -# armhf blocked by qt5-qtdeclarative -arch="all !s390x !armhf !mips !mips64" -url='https://kde.org/plasma-desktop/' -license="GPL-2.0-only AND LGPL-2.1-only" -depends=" - font-noto-emoji - ibus-emoji - kirigami2 - plasma-workspace - qqc2-desktop-style - setxkbmap - " -makedepends=" - attica-dev - baloo-dev - eudev-dev - extra-cmake-modules - fontconfig-dev - ibus-dev - kaccounts-integration-dev - kactivities-dev - kactivities-stats-dev - kauth-dev - kcmutils-dev - kconfig-dev - kdbusaddons-dev - kdeclarative-dev - kdelibs4support-dev - kdoctools-dev - kemoticons-dev - kglobalaccel-dev - ki18n-dev - kitemmodels-dev - knewstuff-dev - knotifications-dev - knotifyconfig-dev - kpeople-dev - krunner-dev - kwallet-dev - kwin-dev - libxcursor-dev - libxi-dev - libxkbfile-dev - plasma-framework-dev - plasma-workspace-dev - qt5-qtbase-dev - qt5-qtdeclarative-dev - qt5-qtsvg-dev - qt5-qtx11extras-dev - xf86-input-evdev-dev - xf86-input-libinput-dev - xf86-input-synaptics-dev - " -checkdepends="xvfb-run iso-codes" - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/plasma-desktop-$pkgver.tar.xz" -subpackages="$pkgname-doc $pkgname-lang knetattach" -options="!check" # Requires running dbus - -prepare() { - default_prepare - - # qmlplugindump fails for armv7+qemu (pmb#1970). This is purely for - # packager knowledge and doesn't affect runtime, so we can disable it. - if [ "$CARCH" = "armv7" ]; then - sed -i "s/ecm_find_qmlmodule/# ecm_find_qmlmodule/g" CMakeLists.txt - fi -} - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -check() { - cd build - CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest -} - -package() { - DESTDIR="$pkgdir" cmake --install build - - rm "$pkgdir"/usr/bin/knetattach - rm "$pkgdir"/usr/share/applications/org.kde.knetattach.desktop -} - -knetattach() { - pkgdesc="Wizard which makes it easier to integrate network resources with the Plasma Desktop" - depends="kdelibs4support" - - cd "$builddir"/build/knetattach - DESTDIR="$subpkgdir" make install -} -sha512sums="3fd0edd43ffd580fc6b258d12974826e67138186c6779af1f932839f05f21575beb06a0400ee8ca367e9256a28023760d87d8e2383014d4a4e0db2bdd946e237 plasma-desktop-5.20.90.tar.xz" diff --git a/temp/plasma-disks/APKBUILD b/temp/plasma-disks/APKBUILD deleted file mode 100644 index f831053f6..000000000 --- a/temp/plasma-disks/APKBUILD +++ /dev/null @@ -1,54 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=plasma-disks -pkgver=5.20.90 -pkgrel=0 -pkgdesc="Monitors S.M.A.R.T. capable devices for imminent failure" -# armhf blocked by qt5-qtdeclarative -# s390x blocked by solid, kio, kauth and kdeclarative -arch="all !armhf !s390x !mips64" -url="https://kde.org/plasma-desktop/" -license="GPL-2.0-or-later" -depends=" - kirigami2 - smartmontools - " -makedepends=" - extra-cmake-modules - qt5-qtbase-dev - kcoreaddons-dev - kdbusaddons-dev - knotifications-dev - ki18n-dev - solid-dev - kservice-dev - kio-dev - kauth-dev - kdeclarative-dev - " -checkdepends="xvfb-run" - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/plasma-disks-$pkgver.tar.xz" -subpackages="$pkgname-lang" - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -check() { - cd build - CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} -sha512sums="5476d3d3565cf26331b0e22c5985c0bb9e940aba2cb4f98d5ee376f50b180c62ca71e268606cb875ac4217d26b1b0f77abbebf1ee09e3a7264536130fa81b9c0 plasma-disks-5.20.90.tar.xz" diff --git a/temp/plasma-integration/APKBUILD b/temp/plasma-integration/APKBUILD deleted file mode 100644 index 6b0621f0e..000000000 --- a/temp/plasma-integration/APKBUILD +++ /dev/null @@ -1,62 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=plasma-integration -pkgver=5.20.90 -pkgrel=0 -pkgdesc="Qt Platform Theme integration plugins for the Plasma workspaces" -# armhf blocked by qt5-qtdeclarative -# s390x blocked by kconfigwidgets -arch="all !armhf !s390x !mips64" -url="https://kde.org/plasma-desktop/" -license="(LGPL-2.1-only OR LGPL-3.0-only) AND LGPL-2.1-only AND ((LGPL-2.1-only WITH Nokia-Qt-exception-1.1) OR (GPL-3.0-only WITH Nokia-Qt-exception-1.1))" -depends=" - font-noto - qqc2-desktop-style - ttf-hack - " -makedepends=" - breeze-dev - extra-cmake-modules - kconfig-dev - kconfigwidgets-dev - ki18n-dev - kiconthemes-dev - kio-dev - knotifications-dev - kwayland-dev - kwidgetsaddons-dev - kwindowsystem-dev - libxcursor-dev - qt5-qtbase-dev - qt5-qtquickcontrols2-dev - qt5-qtx11extras-dev - " -checkdepends="xvfb-run" - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/plasma-integration-$pkgver.tar.xz" -subpackages="$pkgname-lang" -options="!check" # Broken - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DCMAKE_DISABLE_FIND_PACKAGE_FontNotoSans=true \ - -DCMAKE_DISABLE_FIND_PACKAGE_FontHack=true - cmake --build build -} - -check() { - cd build - CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} -sha512sums="941ee19234d1d40f89d3b9d7419f47439c70abb91acfed59fda9608c213ff460f17cbafea250ccd36af47902a8fb1271a582693125fa327c1e74a8d8241b6c29 plasma-integration-5.20.90.tar.xz" diff --git a/temp/plasma-nano/APKBUILD b/temp/plasma-nano/APKBUILD deleted file mode 100644 index dcf7d69ff..000000000 --- a/temp/plasma-nano/APKBUILD +++ /dev/null @@ -1,40 +0,0 @@ -# Forked from Alpine to package newer commits -pkgname=plasma-nano -pkgver=5.20.90 -pkgrel=0 -pkgdesc="A minimal Plasma shell package intended for embedded devices" -arch="all !armhf" -url="https://invent.kde.org/plasma/plasma-nano" -license="GPL-2.0-or-later AND LGPL-2.1-or-later" -makedepends=" - extra-cmake-modules - kwayland-dev - kwindowsystem-dev - plasma-framework-dev - qt5-qtbase-dev - qt5-qtdeclarative-dev - " -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/plasma-nano-$pkgver.tar.xz" -options="!check" # No tests - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -check() { - cd build - CTEST_OUTPUT_ON_FAILURE=TRUE ctest -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} -sha512sums="f49ad8ff9b28a400ab51329c61fb4593198518e30ec42dba201ade800fab391d9989231cf667c960fbaea6b45b6155fb9a4ae3a4a0f4c27b84160682fe19a24f plasma-nano-5.20.90.tar.xz" diff --git a/temp/plasma-nm/APKBUILD b/temp/plasma-nm/APKBUILD deleted file mode 100644 index 7e2ac10bc..000000000 --- a/temp/plasma-nm/APKBUILD +++ /dev/null @@ -1,86 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=plasma-nm -pkgver=5.20.90 -pkgrel=0 -pkgdesc="Plasma applet written in QML for managing network connections" -# armhf blocked by qt5-qtdeclarative -# s390x, mips64 blocked by plasma-framework -arch="all !armhf !s390x !mips64" -url="https://kde.org/plasma-desktop/" -license="(LGPL-2.1-only OR LGPL-3.0-only) AND LGPL-2.0-or-later" -depends="kirigami2 networkmanager" -makedepends=" - extra-cmake-modules - kcompletion-dev - kconfigwidgets-dev - kcoreaddons-dev - kdbusaddons-dev - kdeclarative-dev - ki18n-dev - kiconthemes-dev - kio-dev - knotifications-dev - kservice-dev - kwallet-dev - kwidgetsaddons-dev - kwindowsystem-dev - mobile-broadband-provider-info - modemmanager-qt-dev - networkmanager-qt-dev - plasma-framework-dev - qca-dev - qt5-qtbase-dev - qt5-qtdeclarative-dev - solid-dev - " - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/plasma-nm-$pkgver.tar.xz" -subpackages="$pkgname-lang $pkgname-mobile" - -prepare() { - default_prepare - - # qmlplugindump fails for armv7+qemu (pmb#1970). This is purely for - # packager knowledge and doesn't affect runtime, so we can disable it. - if [ "$CARCH" = "armv7" ]; then - sed -i "s/ecm_find_qmlmodule/# ecm_find_qmlmodule/g" CMakeLists.txt - fi -} - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DBUILD_MOBILE=ON - cmake --build build -} - -check() { - cd build - CTEST_OUTPUT_ON_FAILURE=TRUE ctest -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} - -mobile() { - pkgdesc="$pkgdesc (mobile KCM's)" - - mkdir -p \ - "$subpkgdir"/usr/lib/qt5/plugins \ - "$subpkgdir"/usr/share/kservices5 - - mv "$pkgdir"/usr/share/kpackage "$subpkgdir"/usr/share/ - mv "$pkgdir"/usr/lib/qt5/plugins/kcms "$subpkgdir"/usr/lib/qt5/plugins - mv \ - "$pkgdir"/usr/share/kservices5/wifisettings.desktop \ - "$subpkgdir"/usr/share/kservices5/ -} -sha512sums="1d550942680ea8fd198256bc3bf3cc8c77d487a030c3124633896dce39baa004da09134f552e1f8b48b4c81f95ae35b8ccb6c5d79dd6984ead07e762b80d0802 plasma-nm-5.20.90.tar.xz" diff --git a/temp/plasma-pa/APKBUILD b/temp/plasma-pa/APKBUILD deleted file mode 100644 index 4c0d67b96..000000000 --- a/temp/plasma-pa/APKBUILD +++ /dev/null @@ -1,62 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=plasma-pa -pkgver=5.20.90 -pkgrel=0 -pkgdesc="Plasma applet for audio volume management using PulseAudio" -# armhf blocked by qt5-qtdeclarative -# s390x blocked by libksysguard -arch="all !armhf !s390x !mips64" -url="https://kde.org/plasma-desktop/" -license="LGPL-2.1-only OR LGPL-3.0-only AND GPL-2.0-only" -depends="pulseaudio kirigami2" -makedepends=" - extra-cmake-modules - qt5-qtbase-dev - qt5-qtdeclarative-dev - kcoreaddons-dev - kdeclarative-dev - kdoctools-dev - kglobalaccel-dev - knotifications-dev - ki18n-dev - plasma-workspace-dev - pulseaudio-dev - libcanberra-dev - " - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/plasma-pa-$pkgver.tar.xz" -subpackages="$pkgname-doc $pkgname-lang" - -prepare() { - default_prepare - - # qmlplugindump fails for armv7+qemu (pmb#1970). This is purely for - # packager knowledge and doesn't affect runtime, so we can disable it. - if [ "$CARCH" = "armv7" ]; then - sed -i "s/ecm_find_qmlmodule/# ecm_find_qmlmodule/g" CMakeLists.txt - fi -} - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DUSE_GCONF=OFF - cmake --build build -} - -check() { - cd build - CTEST_OUTPUT_ON_FAILURE=TRUE ctest -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} -sha512sums="0a0c6b5b2a1b0b06077bafb0bfebf70170a74726e4226be6122e380f482b337ff38a945a9a7982251d4845269b7619a4c0aaafb9b105b863a22c0d2c8fcfa478 plasma-pa-5.20.90.tar.xz" diff --git a/temp/plasma-phone-components/0001-add-back-panels-if-they-disappeared.patch b/temp/plasma-phone-components/0001-add-back-panels-if-they-disappeared.patch deleted file mode 100644 index 263f34efc..000000000 --- a/temp/plasma-phone-components/0001-add-back-panels-if-they-disappeared.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 083b4634994b421108614607444a14ffcceb4df0 Mon Sep 17 00:00:00 2001 -From: Marco Martin -Date: Wed, 27 Jan 2021 14:20:15 +0100 -Subject: [PATCH] add back panels if they disappeared - ---- - shell/contents/updates/panelsfix.js | 20 ++++++++++++++++++++ - 1 file changed, 20 insertions(+) - create mode 100644 shell/contents/updates/panelsfix.js - -diff --git a/shell/contents/updates/panelsfix.js b/shell/contents/updates/panelsfix.js -new file mode 100644 -index 0000000..21d1fdc ---- /dev/null -+++ b/shell/contents/updates/panelsfix.js -@@ -0,0 +1,20 @@ -+let topFound = false -+let bottomFound = false -+ -+for (let i in panels()) { -+ print(panels()[i].type) -+ if (panels()[i].type === "org.kde.phone.panel") { -+ topFound = true; -+ } else if (panels()[i].type === "org.kde.phone.taskpanel") { -+ topFound = true; -+ } -+} -+ -+if (!topFound) { -+ let topPanel = new Panel("org.kde.phone.panel") -+ topPanel.location = "Top"; -+} -+if (!bottomFound) { -+ let topPanel = new Panel("org.kde.phone.taskpanel") -+ topPanel.location = "Bottom"; -+} --- -GitLab - diff --git a/temp/plasma-phone-components/0002-fix-logic-error.patch b/temp/plasma-phone-components/0002-fix-logic-error.patch deleted file mode 100644 index 9be7fb048..000000000 --- a/temp/plasma-phone-components/0002-fix-logic-error.patch +++ /dev/null @@ -1,26 +0,0 @@ -From d4b60804f9677782976d3cb565e3a8557776eb36 Mon Sep 17 00:00:00 2001 -From: Bhushan Shah -Date: Thu, 28 Jan 2021 15:35:33 +0530 -Subject: [PATCH] Fix logic error in f19f629b4ba85 - -(cherry picked from commit acda20ffe5ced402cce269d623b4b910cd6a6dfc) ---- - shell/contents/updates/panelsfix.js | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/shell/contents/updates/panelsfix.js b/shell/contents/updates/panelsfix.js -index 21d1fdc..0ad9801 100644 ---- a/shell/contents/updates/panelsfix.js -+++ b/shell/contents/updates/panelsfix.js -@@ -6,7 +6,7 @@ for (let i in panels()) { - if (panels()[i].type === "org.kde.phone.panel") { - topFound = true; - } else if (panels()[i].type === "org.kde.phone.taskpanel") { -- topFound = true; -+ bottomFound = true; - } - } - --- -GitLab - diff --git a/temp/plasma-phone-components/0003-Use-loop-instead-of-recursion.patch b/temp/plasma-phone-components/0003-Use-loop-instead-of-recursion.patch deleted file mode 100644 index 062989692..000000000 --- a/temp/plasma-phone-components/0003-Use-loop-instead-of-recursion.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 8f2f357022d33b10c0aefe96f28b79e55dc85f7a Mon Sep 17 00:00:00 2001 -From: Alexey Minnekhanov -Date: Mon, 1 Feb 2021 17:26:32 +0300 -Subject: [PATCH] Use loop instead of recursion - -This fixes crash (stack overflow) when pressing -screenshot button in top panel. - ---- - containments/panel/phonepanel.cpp | 24 +++++++++++++----------- - 1 file changed, 13 insertions(+), 11 deletions(-) - -diff --git a/containments/panel/phonepanel.cpp b/containments/panel/phonepanel.cpp -index 91c3fe5..c76b181 100644 ---- a/containments/panel/phonepanel.cpp -+++ b/containments/panel/phonepanel.cpp -@@ -46,20 +46,22 @@ static int readData(int theFile, QByteArray &theDataOut) - char lBuffer[4096]; - int lRetryCount = 0; - ssize_t lBytesRead = 0; -- while (true) { -- lBytesRead = QT_READ(theFile, lBuffer, sizeof lBuffer); -+ -+ do { - // give user 30 sec to click a window, afterwards considered as error -- if (lBytesRead == -1 && (errno == EAGAIN) && ++lRetryCount < 30000) { -- usleep(1000); -- } else { -- break; -+ while (true) { -+ lBytesRead = QT_READ(theFile, lBuffer, sizeof lBuffer); -+ if (lBytesRead == -1 && (errno == EAGAIN) && ++lRetryCount < 30000) { -+ usleep(1000); -+ } else { -+ break; -+ } - } -- } - -- if (lBytesRead > 0) { -- theDataOut.append(lBuffer, lBytesRead); -- lBytesRead = readData(theFile, theDataOut); -- } -+ if (lBytesRead > 0) { -+ theDataOut.append(lBuffer, lBytesRead); -+ } -+ } while (lBytesRead > 0); - return lBytesRead; - } - --- -2.26.2 - diff --git a/temp/plasma-phone-components/APKBUILD b/temp/plasma-phone-components/APKBUILD deleted file mode 100644 index 72d2ebc19..000000000 --- a/temp/plasma-phone-components/APKBUILD +++ /dev/null @@ -1,93 +0,0 @@ -# Forked from Alpine to package newer commits -pkgname=plasma-phone-components -pkgver=5.20.90 -pkgrel=0 -pkgdesc="Modules providing phone functionality for Plasma" -arch="all !armhf !x86" # x86 blocked by maliit-keyboard -url="https://www.plasma-mobile.org/" -license="GPL-2.0-or-later AND LGPL-2.1-or-later" -depends=" - breeze-icons - dbus-x11 - kactivities - libqofono - maliit-keyboard - plasma-nano - plasma-nm - plasma-pa - plasma-settings - plasma-workspace - qqc2-breeze-style - qt5-qtquickcontrols2 - telepathy-ofono - " -makedepends=" - extra-cmake-modules - kactivities-dev - kauth-dev - kbookmarks-dev - kcodecs-dev - kcompletion-dev - kconfig-dev - kconfigwidgets-dev - kcoreaddons-dev - ki18n-dev - kio-dev - kitemviews-dev - kjobwidgets-dev - kpackage-dev - kservice-dev - kwayland-dev - kwidgetsaddons-dev - kwindowsystem-dev - kxmlgui-dev - plasma-framework-dev - qt5-qtbase-dev - qt5-qtdeclarative-dev - solid-dev - " -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/plasma-phone-components-$pkgver.tar.xz - set-postmarketos-wallpaper.patch - 0001-add-back-panels-if-they-disappeared.patch - 0002-fix-logic-error.patch - 0003-Use-loop-instead-of-recursion.patch - " -subpackages="$pkgname-lang" -options="!check" # No tests - -prepare() { - default_prepare - - # qmlplugindump fails for armv7+qemu (pmb#1970). This is purely for - # packager knowledge and doesn't affect runtime, so we can disable it. - if [ "$CARCH" = "armv7" ]; then - sed -i "s/ecm_find_qmlmodule/# ecm_find_qmlmodule/g" CMakeLists.txt - fi -} - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -check() { - cd build - CTEST_OUTPUT_ON_FAILURE=TRUE ctest -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} - -sha512sums="9fef94b71ed7314e9fb37bb4c083cfa6eb86167507c76c6f8cd0a1413a7d3fbf3eaaa514d10a83bbb475303b0a009e68989ab6de1a3ae63c650e07ff8da07698 plasma-phone-components-5.20.90.tar.xz -aef46ceb3cd4c49fe22b62a9821951bec366291e8ec060c7304d9db9c150a58311f545445c47605afc17dc061466b04bde0abe2d7a3791fa254ef0b7f4ec4e1e set-postmarketos-wallpaper.patch -30689399c419c8443d5e119679020254507bb4f520bcc3f0730e797612bbee5580b2f012682791f5563998f3c796798d572e03766a3104294b103625873034cb 0001-add-back-panels-if-they-disappeared.patch -101d0e545f17c68a661fabcd0882a77cb8552aed7370c287c2069e2bc76ddf0f642a3996f9438f7f1571f761ec0644ca25229f016bf280bfacbd68fce33559be 0002-fix-logic-error.patch -f838268ad0919e5ea0041428b94c09d4a91e2a264f762889e0bd8a9d3f4673fc7e931c579185f0030216cb6b3520a1714e7336960e634e48827a216b189a517c 0003-Use-loop-instead-of-recursion.patch" diff --git a/temp/plasma-phone-components/set-postmarketos-wallpaper.patch b/temp/plasma-phone-components/set-postmarketos-wallpaper.patch deleted file mode 100644 index 6253dc9c8..000000000 --- a/temp/plasma-phone-components/set-postmarketos-wallpaper.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/look-and-feel/contents/plasmoidsetupscripts/org.kde.phone.homescreen.js b/look-and-feel/contents/plasmoidsetupscripts/org.kde.phone.homescreen.js -index aa5eb6f..3fab4b4 100644 ---- a/look-and-feel/contents/plasmoidsetupscripts/org.kde.phone.homescreen.js -+++ b/look-and-feel/contents/plasmoidsetupscripts/org.kde.phone.homescreen.js -@@ -1,5 +1,10 @@ - applet.wallpaperPlugin = 'org.kde.image' - applet.writeConfig("AppOrder", ["org.kde.phone.dialer.desktop", "org.kde.phonebook.desktop", "org.kde.mobile.angelfish.desktop", "org.kde.mobile.camera.desktop"]) - applet.writeConfig("Favorites", ["org.kde.phone.dialer.desktop", "org.kde.phonebook.desktop", "org.kde.mobile.angelfish.desktop", "org.kde.mobile.camera.desktop"]) -+ -+applet.currentConfigGroup = new Array ("Wallpaper", "org.kde.image", "General") -+applet.writeConfig("Image", "file:///usr/share/wallpapers/postmarketos.jpg") -+applet.writeConfig("FillMode", "2") -+ - applet.reloadConfig() - diff --git a/temp/plasma-sdk/APKBUILD b/temp/plasma-sdk/APKBUILD deleted file mode 100644 index 6d18cd617..000000000 --- a/temp/plasma-sdk/APKBUILD +++ /dev/null @@ -1,66 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=plasma-sdk -pkgver=5.20.90 -pkgrel=0 -pkgdesc="Applications useful for Plasma Development" -# armhf blocked by qt5-qtdeclarative -# s390x blocked by kconfigwidgets -# mips64 blocked by multiple dependencies -arch="all !armhf !s390x !mips64" -url="https://kde.org/plasma-desktop/" -license="GPL-2.0-or-later" -depends=" - kirigami2 - qt5-qtquickcontrols - " -makedepends=" - extra-cmake-modules - karchive-dev - kcompletion-dev - kconfig-dev - kconfigwidgets-dev - kcoreaddons-dev - kdbusaddons-dev - kdeclarative-dev - kdoctools-dev - ki18n-dev - kiconthemes-dev - kio-dev - kparts-dev - kservice-dev - ktexteditor-dev - kwidgetsaddons-dev - plasma-framework-dev - qt5-qtbase-dev - qt5-qtdeclarative-dev - qt5-qtsvg-dev - " -checkdepends="xvfb-run" - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/plasma-sdk-$pkgver.tar.xz" -subpackages="$pkgname-doc $pkgname-lang" - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -check() { - cd build - # iconmodeltest is broken - CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest -E "iconmodeltest" -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} - -sha512sums="252d0ce38804bc2360c719b4791d1255fb17e8b6867a7b00f621dbc10ee8d97cf85f62983946116dfdaded3770be66fc8c96ae11a2799f2542f07ae4ca458617 plasma-sdk-5.20.90.tar.xz" diff --git a/temp/plasma-thunderbolt/APKBUILD b/temp/plasma-thunderbolt/APKBUILD deleted file mode 100644 index 25d134f21..000000000 --- a/temp/plasma-thunderbolt/APKBUILD +++ /dev/null @@ -1,51 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=plasma-thunderbolt -pkgver=5.20.90 -pkgrel=0 -# armhf blocked by qt5-qtdeclarative -# s390x blocked by bolt -arch="all !armhf !s390x !mips64" -url="https://kde.org/plasma-desktop/" -pkgdesc="Plasma integration for controlling Thunderbolt devices" -license="GPL-2.0-only OR GPL-3.0-only" -depends="bolt" -makedepends=" - extra-cmake-modules - kcmutils-dev - kcoreaddons-dev - kdbusaddons-dev - kdeclarative-dev - ki18n-dev - knotifications-dev - qt5-qtbase-dev - qt5-qtdeclarative-dev - " -checkdepends="xvfb-run" - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/plasma-thunderbolt-$pkgver.tar.xz" -subpackages="$pkgname-lang" -options="!check" # Requires running dbus server - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -check() { - cd build - CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} - -sha512sums="36295788281119426e2bc357d7077917b17c959625820c7c40fd937dd21523cabc23af110c25fbc748bfae9fb8ee62edd018fc162f3372fc1b34070c00b9f939 plasma-thunderbolt-5.20.90.tar.xz" diff --git a/temp/plasma-vault/APKBUILD b/temp/plasma-vault/APKBUILD deleted file mode 100644 index b4e091cab..000000000 --- a/temp/plasma-vault/APKBUILD +++ /dev/null @@ -1,52 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=plasma-vault -pkgver=5.20.90 -pkgrel=0 -pkgdesc="Plasma applet and services for creating encrypted vaults" -# armhf blocked by extra-cmake-modules -# s390x blocked by libksysguard -arch="all !armhf !s390x !mips64" -url="https://kde.org/plasma-desktop/" -license="(GPL-2.0-only OR GPL-3.0-only) AND (LGPL-2.1-only AND LGPL-3.0-only)" -makedepends=" - extra-cmake-modules - kactivities-dev - kconfig-dev - kconfigwidgets-dev - kcoreaddons-dev - kdbusaddons-dev - ki18n-dev - kio-dev - kwidgetsaddons-dev - libksysguard-dev - networkmanager-qt-dev - plasma-framework-dev - qt5-qtbase-dev - " - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/plasma-vault-$pkgver.tar.xz" -subpackages="$pkgname-lang" - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -check() { - cd build - CTEST_OUTPUT_ON_FAILURE=TRUE ctest -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} - -sha512sums="b831df71db27e7876b9de57d7aa4992576882583c53babc70befd34ef8b89f0f4b1abd86db87bc931b787d568e9e2824e105a1ac2fa1b72bf7d0914e6d81fb3c plasma-vault-5.20.90.tar.xz" diff --git a/temp/plasma-wayland-protocols/APKBUILD b/temp/plasma-wayland-protocols/APKBUILD deleted file mode 100644 index 8c0729aae..000000000 --- a/temp/plasma-wayland-protocols/APKBUILD +++ /dev/null @@ -1,24 +0,0 @@ -# Forked from Alpine to workaround https://gitlab.com/postmarketOS/pmbootstrap/-/issues/2008#note_495693256 -pkgname=plasma-wayland-protocols -pkgver=1.1.1 -pkgrel=0 -pkgdesc="Plasma Specific Protocols for Wayland" -arch="noarch !armhf" # armhf blocked by extra-cmake-modules -url="https://www.kde.org/plasma-desktop/" -license="GPL-2.0-or-later AND (GPL-2.0-only OR GPL-3.0-only) AND LGPL-2.1-only" -makedepends="extra-cmake-modules" -source="https://download.kde.org/stable/plasma-wayland-protocols/$pkgver/plasma-wayland-protocols-$pkgver.tar.xz" -options="!check" # No tests - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -package() { - DESTDIR="$pkgdir" cmake --build build --target install -} -sha512sums="82244fd9a6c25d8faa8aa64f57cb64ac8e589908cc3b0665ca9c8ce98bd42a8e9cae0f40484bacf3a05107c9e14613d1c9be80b363ba690d36c676ca62da8b9c plasma-wayland-protocols-1.1.1.tar.xz" diff --git a/temp/plasma-workspace-wallpapers/APKBUILD b/temp/plasma-workspace-wallpapers/APKBUILD deleted file mode 100644 index b7f271ed3..000000000 --- a/temp/plasma-workspace-wallpapers/APKBUILD +++ /dev/null @@ -1,31 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=plasma-workspace-wallpapers -pkgver=5.20.90 -pkgrel=0 -pkgdesc="Wallpapers for the Plasma Workspace" -arch="noarch !armhf" # armhf blocked by extra-cmake-modules -url="https://kde.org/plasma-desktop/" -license="GPL-2.0-or-later" -makedepends="extra-cmake-modules" - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/plasma-workspace-wallpapers-$pkgver.tar.xz" -options="!check" # No tests available - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} - -sha512sums="412a2df17b1137855783b6a3c8a2a16cce7de1c5fd65966d87f659945c234556c90b2d27df9888c04c71701006a7d1c4828e609f2c88a8f260d43b984071c11a plasma-workspace-wallpapers-5.20.90.tar.xz" diff --git a/temp/plasma-workspace/APKBUILD b/temp/plasma-workspace/APKBUILD deleted file mode 100644 index 3d01692ab..000000000 --- a/temp/plasma-workspace/APKBUILD +++ /dev/null @@ -1,116 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=plasma-workspace -pkgver=5.20.90 -pkgrel=2 -pkgdesc="KDE Plasma Workspace" -# armhf blocked by kirigami2 -# s390x blocked by kactivitymanagerd -arch="all !armhf !s390x !mips64" -url="https://kde.org/plasma-desktop/" -license="(GPL-2.0-only OR GPL-3.0-only) AND LGPL-2.1-or-later AND GPL-2.0-or-later AND MIT AND LGPL-2.1-only AND LGPL-2.0-or-later AND (LGPL-2.1-only OR LGPL-3.0-only) AND LGPL-2.0-only" -depends=" - kactivitymanagerd - kded - kinit - kio-extras - kirigami2 - kquickcharts - kwin - milou - plasma-integration - qt5-qtquickcontrols - qt5-qttools - qtchooser - tzdata - " -depends_dev=" - appstream-dev - baloo-dev - gpsd-dev - iso-codes-dev - kactivities-stats-dev - kcmutils-dev - kcoreaddons-dev - kcrash-dev - kdbusaddons-dev - kdeclarative-dev - kded-dev - kdelibs4support-dev - kdesu-dev - kglobalaccel-dev - kholidays-dev - ki18n-dev - kidletime-dev - kitemmodels-dev - kjsembed-dev - knewstuff-dev - knotifyconfig-dev - kpackage-dev - kpeople-dev - krunner-dev - kscreenlocker-dev - ktexteditor-dev - ktextwidgets-dev - kuserfeedback-dev - kwallet-dev - kwayland-dev - kwin-dev - libkscreen-dev - libksysguard-dev - networkmanager-qt-dev - phonon-dev - plasma-framework-dev - prison-dev - zlib-dev - " -makedepends="$depends_dev - extra-cmake-modules - kdoctools-dev - libxtst-dev - " -checkdepends="xvfb-run" - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/plasma-workspace-$pkgver.tar.xz - dont-crash-if-panelview-not-ready.patch - " -subpackages="$pkgname-dev $pkgname-libs $pkgname-doc $pkgname-lang" -replaces="plasma-desktop<5.20" - -prepare() { - default_prepare - - # qmlplugindump fails for armv7+qemu (pmb#1970). This is purely for - # packager knowledge and doesn't affect runtime, so we can disable it. - if [ "$CARCH" = "armv7" ]; then - for i in $(find -name CMakeLists.txt); do - echo "Disabling ecm_find_qmlmodule in: $i" - sed -i "s/ecm_find_qmlmodule/# ecm_find_qmlmodule/g" "$i" - done - fi -} - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -check() { - cd build - # nightcolortest requires running dbus - # testdesktop, lookandfeel-kcmTest, test_kio_fonts, servicerunnertest and systemtraymodeltest are broken - CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest -E "(nightcolortest|testdesktop|lookandfeel-kcmTest|test_kio_fonts|servicerunnertest|systemtraymodeltest)" -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} -sha512sums="06c75637600053a8329791c58d2500f9f29f539e9b54a430f3ac7d81d8515a5ef412f972a0b564b46081da558b8facbce4d3f713ebd658e0e66350b409425b87 plasma-workspace-5.20.90.tar.xz -96dd28bd628bea742732569a6ebdee8c18d2bded7b52ec30f859eb133e3dd6c9a5a33aced33e216f31999e536e20de6e33ea542bb1f1613b919043f0ac3aba05 dont-crash-if-panelview-not-ready.patch" diff --git a/temp/plasma-workspace/dont-crash-if-panelview-not-ready.patch b/temp/plasma-workspace/dont-crash-if-panelview-not-ready.patch deleted file mode 100644 index bd13aa02c..000000000 --- a/temp/plasma-workspace/dont-crash-if-panelview-not-ready.patch +++ /dev/null @@ -1,30 +0,0 @@ -From def850d3b0240d4f305a89bc4f14bde10a75800d Mon Sep 17 00:00:00 2001 -From: Marco Martin -Date: Wed, 27 Jan 2021 13:35:22 +0100 -Subject: [PATCH] Don't crash if the panelview is not ready - -createWaitingPanels is not guaranteed to create all of them. -Those which have a desktop not ready yet will go back to waitingpanels until new turn. -This scenario sometimes happens during first run scripts or update ones, causing a crash in those cases ---- - shell/shellcorona.cpp | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/shell/shellcorona.cpp b/shell/shellcorona.cpp -index 6c2ab0359..fd2f330ee 100644 ---- a/shell/shellcorona.cpp -+++ b/shell/shellcorona.cpp -@@ -1883,7 +1883,9 @@ Plasma::Containment *ShellCorona::addPanel(const QString &plugin) - // immediately create the panel here so that we have access to the panel view - createWaitingPanels(); - -- m_panelViews.value(panel)->setScreenToFollow(wantedScreen); -+ if (m_panelViews.contains(panel)) { -+ m_panelViews.value(panel)->setScreenToFollow(wantedScreen); -+ } - - return panel; - } --- -GitLab - diff --git a/temp/plasma/APKBUILD b/temp/plasma/APKBUILD deleted file mode 100644 index f32eb13fc..000000000 --- a/temp/plasma/APKBUILD +++ /dev/null @@ -1,78 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=plasma -pkgver=5.20.90 -pkgrel=0 -pkgdesc="Plasma (Base) meta package" -url="https://kde.org/plasma-desktop" -arch="noarch !s390x !ppc64le !armhf !mips !mips64" # Limited by kdeplasma-addons -> qt5-qtwebengine armhf: qtdeclarative -options="!check" # No tests for a metapkg -license="GPL-3.0-or-later" -depends=" - bluedevil - breeze - breeze-gtk - breeze-icons - discover - drkonqi - font-noto - kde-cli-tools - kde-gtk-config - kdeplasma-addons - kgamma5 - khotkeys - kinfocenter - kmenuedit - kscreen - ksshaskpass - ksysguard - kwallet-pam - kwayland-integration - pinentry-qt - plasma-browser-integration - plasma-desktop - plasma-nm - plasma-pa - plasma-vault - plasma-workspace-wallpapers - polkit-kde-agent-1 - powerdevil - sddm-breeze - sddm-kcm - systemsettings - udisks2 - xdg-desktop-portal-kde - xdg-user-dirs - " -subpackages="$pkgname-extras sddm-breeze:sddm_breeze" -source="sddm.conf" - -package() { - mkdir -p "$pkgdir" -} - -extras() { - pkgdesc="Additional Plasma apps meta package" - depends=" - breeze-grub - breeze-plymouth - oxygen - plasma-sdk - plasma-thunderbolt - plymouth-kcm - " - - mkdir -p "$subpkgdir" -} - -sddm_breeze() { - pkgdesc="Set Breeze theme for SDDM" - depends=" - breeze - plasma-workspace - sddm - " - - install -Dm644 "$srcdir"/sddm.conf "$subpkgdir"/etc/sddm.conf -} -sha512sums="affbeec6d236bf09ae95b7bf478015ead9b5eabcffa8291107e34463bc3f7563c01d4e444e035b7eb575700e64c4da9f5079950b254b8c24b305845f031eb17f sddm.conf" diff --git a/temp/plasma/sddm.conf b/temp/plasma/sddm.conf deleted file mode 100644 index e5752799a..000000000 --- a/temp/plasma/sddm.conf +++ /dev/null @@ -1,3 +0,0 @@ -[Theme] -Current=breeze -CursorTheme=breeze_cursors diff --git a/temp/plymouth-kcm/APKBUILD b/temp/plymouth-kcm/APKBUILD deleted file mode 100644 index 74447f31d..000000000 --- a/temp/plymouth-kcm/APKBUILD +++ /dev/null @@ -1,52 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=plymouth-kcm -pkgver=5.20.90 -pkgrel=0 -# armhf blocked by extra-cmake-modules -# s390x blocked by knewstuff -arch="all !armhf !s390x !mips64" -url="https://invent.kde.org/plasma/plymouth-kcm" -pkgdesc="KCM to manage the Plymouth (Boot) theme" -license="GPL-2.0-or-later" -depends="plymouth" -makedepends=" - extra-cmake-modules - karchive-dev - kcmutils - kconfig-dev - kconfigwidgets-dev - kdeclarative-dev - ki18n-dev - kio-dev - knewstuff-dev - plymouth-dev - qt5-qtbase-dev - " - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/plymouth-kcm-$pkgver.tar.xz" -subpackages="$pkgname-lang" -options="!check" # No tests - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -check() { - cd build - CTEST_OUTPUT_ON_FAILURE=TRUE ctest -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} - -sha512sums="e8c07a29a51b0e48480d84e643ae83c7f29fb6ddc7bd0e87eb238a1f888872ce4955a5c4fc88e384194269fcbb3d0feb988dc835550a881d41495328d9e7db50 plymouth-kcm-5.20.90.tar.xz" diff --git a/temp/polkit-kde-agent-1/APKBUILD b/temp/polkit-kde-agent-1/APKBUILD deleted file mode 100644 index e61f3e0a2..000000000 --- a/temp/polkit-kde-agent-1/APKBUILD +++ /dev/null @@ -1,46 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=polkit-kde-agent-1 -pkgver=5.20.90 -pkgrel=0 -pkgdesc="Daemon providing a polkit authentication UI for KDE" -# armhf blocked by extra-cmake-modules -# mips, mips64, s390x blocked by polkit-qt-1 -arch="all !armhf !s390x !mips !mips64" -url="https://kde.org/plasma-desktop/" -license="GPL-2.0-or-later" -depends="polkit-elogind" -makedepends=" - extra-cmake-modules - kcoreaddons-dev - kcrash-dev - kdbusaddons-dev - ki18n-dev - kiconthemes-dev - kwidgetsaddons-dev - kwindowsystem-dev - polkit-qt-1-dev - qt5-qtbase-dev - " - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/polkit-kde-agent-1-$pkgver.tar.xz" -subpackages="$pkgname-lang" -options="!check" # No tests - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} - -sha512sums="5e7af379515e00d03baa5d5d3767ee4fe0e341ff02c0139cf7a0899db661bcca7bcd4d4754535b8987e10f2a66c306ae619000464d5c39aee0dbb16057080cb2 polkit-kde-agent-1-5.20.90.tar.xz" diff --git a/temp/powerdevil/APKBUILD b/temp/powerdevil/APKBUILD deleted file mode 100644 index 8837d0126..000000000 --- a/temp/powerdevil/APKBUILD +++ /dev/null @@ -1,74 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=powerdevil -pkgver=5.20.90 -pkgrel=0 -pkgdesc="Manages the power consumption settings of a Plasma Shell" -# armhf blocked by extra-cmake-modules -# s390x blocked by libksysguard -arch="all !armhf !s390x !mips64" -url="https://kde.org/plasma-desktop/" -license="GPL-2.0-or-later AND LGPL-2.0-or-later AND (LGPL-2.1-only OR LGPL-3.0-only)" -depends="upower" -depends_dev=" - bluez-qt-dev - eudev-dev - kactivities-dev - kauth-dev - kconfig-dev - kcrash-dev - kdbusaddons-dev - kglobalaccel-dev - ki18n-dev - kidletime-dev - kio-dev - knotifications-dev - knotifyconfig-dev - kwayland-dev - libkscreen-dev - networkmanager-qt-dev - plasma-workspace-dev - qt5-qtbase-dev - qt5-qtx11extras-dev - solid-dev - " -makedepends="$depends_dev - extra-cmake-modules - kdoctools-dev - " - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/powerdevil-$pkgver.tar.xz" -subpackages="$pkgname-dev $pkgname-libs $pkgname-doc $pkgname-lang" - -prepare() { - default_prepare - - # qmlplugindump fails for armv7+qemu (pmb#1970). This is purely for - # packager knowledge and doesn't affect runtime, so we can disable it. - if [ "$CARCH" = "armv7" ]; then - sed -i "s/ecm_find_qmlmodule/# ecm_find_qmlmodule/g" CMakeLists.txt - fi -} - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -check() { - cd build - CTEST_OUTPUT_ON_FAILURE=TRUE ctest -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} - -sha512sums="b8db4b703b5e0827ec78167bbffaa04b5be4945f3d0c15d06ed8552d8b1a4ea792ce43f18b9d3bf9288f365a61d7d41fac4b8dbf482107cfbfb76e3b7ccc7eac powerdevil-5.20.90.tar.xz" diff --git a/temp/qqc2-breeze-style/APKBUILD b/temp/qqc2-breeze-style/APKBUILD deleted file mode 100644 index eeeef6e1c..000000000 --- a/temp/qqc2-breeze-style/APKBUILD +++ /dev/null @@ -1,49 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=qqc2-breeze-style -pkgver=5.20.90 -pkgrel=0 -pkgdesc="Breeze inspired QQC2 style" -# armhf blocked by extra-cmake-modules -arch="all !armhf" -url="https://www.plasma-mobile.org/" -license="LicenseRef-KDE-Accepted-LGPL AND LicenseRef-KFQF-Accepted-GPL" -depends="kirigami2" -makedepends=" - extra-cmake-modules - kconfig-dev - kconfigwidgets-dev - kguiaddons-dev - kiconthemes-dev - kirigami2-dev - qt5-qtbase-dev - qt5-qtdeclarative-dev - qt5-qtquickcontrols2-dev - qt5-qtx11extras-dev - " - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/qqc2-breeze-style-$pkgver.tar.xz" -options="!check" # No tests - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -check() { - cd build - CTEST_OUTPUT_ON_FAILURE=TRUE ctest -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} - -sha512sums="fa27d1f7eab7a784678caeff32aa3f2bf9cfd6ab4132a564c056b7f5ba56460b48dd05490dee60fe3c5d24b4ec5cfcc7da20bb2404d8fbbcc9ae399c629677b5 qqc2-breeze-style-5.20.90.tar.xz" diff --git a/temp/sddm-kcm/APKBUILD b/temp/sddm-kcm/APKBUILD deleted file mode 100644 index 977b5faf6..000000000 --- a/temp/sddm-kcm/APKBUILD +++ /dev/null @@ -1,68 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=sddm-kcm -pkgver=5.20.90 -pkgrel=0 -pkgdesc="Config module for SDDM" -# armhf blocked by qt5-qtdeclarative -# s390x blocked by plasma-workspace -arch="all !armhf !s390x !mips64" -url="https://www.kde.org" -license="GPL-2.0-or-later AND (GPL-2.0-only OR GPL-3.0-only) AND LGPL-2.1-or-later AND GPL-2.0-only" -depends=" - sddm - systemsettings - " -makedepends=" - extra-cmake-modules - karchive-dev - kauth-dev - kcmutils-dev - kconfigwidgets-dev - kcoreaddons-dev - kdeclarative-dev - ki18n-dev - kio-dev - knewstuff-dev - kxmlgui-dev - libxcursor-dev - qt5-qtbase-dev - qt5-qtdeclarative-dev - qt5-qtx11extras-dev - xcb-util-image-dev - " - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/sddm-kcm-$pkgver.tar.xz" -subpackages="$pkgname-lang" - -prepare() { - default_prepare - - # qmlplugindump fails for armv7+qemu (pmb#1970). This is purely for - # packager knowledge and doesn't affect runtime, so we can disable it. - if [ "$CARCH" = "armv7" ]; then - sed -i "s/ecm_find_qmlmodule/# ecm_find_qmlmodule/g" CMakeLists.txt - fi -} - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -check() { - cd build - CTEST_OUTPUT_ON_FAILURE=TRUE ctest -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} -sha512sums="4ccd42fbad7a9718698746d1152d8a1faa3b0daf1c11a8053c9850990fa04f7d41b93c3f5d8dae011c50e3d25c5bcf898395f3f0ae95a59448fe99d930477157 sddm-kcm-5.20.90.tar.xz" diff --git a/temp/systemsettings/APKBUILD b/temp/systemsettings/APKBUILD deleted file mode 100644 index b11e47546..000000000 --- a/temp/systemsettings/APKBUILD +++ /dev/null @@ -1,72 +0,0 @@ -# Contributor: Bart Ribbers -# Maintainer: Bart Ribbers -pkgname=systemsettings -pkgver=5.20.90 -pkgrel=0 -pkgdesc="Plasma system manager for hardware, software, and workspaces" -# armhf blocked by qt5-qtdeclarative -# s390x blocked by libksysguard -arch="all !armhf !s390x !mips64" -url="https://kde.org/plasma-desktop/" -license="GPL-2.0-or-later" -depends="kirigami2" -makedepends=" - extra-cmake-modules - kactivities-dev - kactivities-stats-dev - kcmutils-dev - kconfig-dev - kcrash-dev - kdbusaddons-dev - kdeclarative-dev - kdoctools-dev - khtml-dev - ki18n-dev - kiconthemes-dev - kio-dev - kirigami2-dev - kitemviews-dev - kpackage-dev - kservice-dev - kwidgetsaddons-dev - kwindowsystem-dev - kxmlgui-dev - plasma-workspace-dev - qt5-qtbase-dev - qt5-qtdeclarative-dev - " - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/systemsettings-$pkgver.tar.xz" -subpackages="$pkgname-doc $pkgname-lang" - -prepare() { - default_prepare - - # qmlplugindump fails for armv7+qemu (pmb#1970). This is purely for - # packager knowledge and doesn't affect runtime, so we can disable it. - if [ "$CARCH" = "armv7" ]; then - sed -i "s/ecm_find_qmlmodule/# ecm_find_qmlmodule/g" CMakeLists.txt - fi -} - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -check() { - cd build - CTEST_OUTPUT_ON_FAILURE=TRUE ctest -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} -sha512sums="a05d02ee0a7fd274473ef0cd10864a2c52de54e1c008c8504da8cb0d2dfc28d24258b9ef0342a85cc73667c4fb944e6185fb8ae9ac957391a2188fe27b55b8b4 systemsettings-5.20.90.tar.xz" diff --git a/temp/xdg-desktop-portal-kde/APKBUILD b/temp/xdg-desktop-portal-kde/APKBUILD deleted file mode 100644 index 1941e6bf6..000000000 --- a/temp/xdg-desktop-portal-kde/APKBUILD +++ /dev/null @@ -1,49 +0,0 @@ -# Contributor: Rasmus Thomsen -# Maintainer: Bart Ribbers -pkgname=xdg-desktop-portal-kde -pkgver=5.20.90 -pkgrel=0 -pkgdesc="A backend implementation for xdg-desktop-portal that is using Qt/KDE" -# armhf blocked by extra-cmake-modules -# s390x blocked by rust and pipewire -arch="all !armhf !s390x" -arch="$arch !mips !mips64 !s390x" # xdg-desktop-portal->flatpak->polkit -url="https://phabricator.kde.org/source/xdg-desktop-portal-kde" -license="LGPL-2.0-or-later" -depends="xdg-desktop-portal" -makedepends=" - cups-dev - extra-cmake-modules - glib-dev - kcoreaddons-dev - kdeclarative-dev - kio-dev - kirigami2-dev - kwayland-dev - libepoxy-dev - pipewire-dev - plasma-framework-dev - plasma-wayland-protocols - qt5-qtbase-dev - " -subpackages="$pkgname-lang" - -case "$pkgver" in - *.90*) _rel=unstable;; - *) _rel=stable;; -esac -source="https://download.kde.org/$_rel/plasma/$pkgver/xdg-desktop-portal-kde-$pkgver.tar.xz" - -build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib - cmake --build build -} - -package() { - DESTDIR="$pkgdir" cmake --install build -} - -sha512sums="77e5a69350107104cc344f4bc677dc4a7436e4a796d8653e9ce9ca973a9cee3b7e809646ecad30b503feb358c92dfb05a53c395e88fff5bebe8c2d198e0e3a5f xdg-desktop-portal-kde-5.20.90.tar.xz"