aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart Ribbers <bribbers@disroot.org>2019-11-10 12:12:42 +0100
committerLeo <thinkabit.ukim@gmail.com>2019-11-11 17:52:27 -0300
commite5b090d0859068ace4e3757246686b0e00a4d38b (patch)
tree87732e69945036397ab5a2674121d75a7eab0596
parentcf097d9feea21cc59566408361e5945cc8894182 (diff)
downloadaports-e5b090d0859068ace4e3757246686b0e00a4d38b.tar.gz
aports-e5b090d0859068ace4e3757246686b0e00a4d38b.tar.bz2
aports-e5b090d0859068ace4e3757246686b0e00a4d38b.tar.xz
community/discover: split out Flatpak and fwupd backends
-rw-r--r--community/discover/APKBUILD48
1 files changed, 45 insertions, 3 deletions
diff --git a/community/discover/APKBUILD b/community/discover/APKBUILD
index 091e672e18..8554b88493 100644
--- a/community/discover/APKBUILD
+++ b/community/discover/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=discover
pkgver=5.17.2
-pkgrel=0
+pkgrel=1
arch="all"
url="https://userbase.kde.org/Discover"
pkgdesc="KDE Plasma resources management GUI"
@@ -11,10 +11,13 @@ depends="kirigami2"
makedepends="extra-cmake-modules qt5-qtbase-dev qt5-qtdeclarative-dev kcoreaddons-dev kconfig-dev kcrash-dev kdbusaddons-dev ki18n-dev karchive-dev kxmlgui-dev kitemmodels-dev kio-dev kdeclarative-dev attica-dev knewstuff-dev plasma-framework-dev appstream-dev flatpak-dev"
checkdepends="xvfb-run"
source="https://download.kde.org/stable/plasma/$pkgver/discover-$pkgver.tar.xz"
-subpackages="$pkgname-lang"
+subpackages="$pkgname-lang $pkgname-backend-flatpak:backend_flatpak"
case "$CARCH" in
- x86|x86_64) makedepends="$makedepends fwupd-dev" ;;
+ x86|x86_64)
+ makedepends="$makedepends fwupd-dev"
+ subpackages="$subpackages $pkgname-backend-fwupd:backend_fwupd"
+ ;;
*) ;;
esac
@@ -45,4 +48,43 @@ package() {
DESTDIR="$pkgdir" make install
}
+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_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="4526ad1bf17bd24dada6c4f5a9cfc88fcf33fecd1009d1cfd77a281a5c6f132e7b41e464f170a3e1a92a164d9e9027cbe0072966ccf07d637796aa524964af82 discover-5.17.2.tar.xz"