# Contributor: Bart Ribbers # Maintainer: team/kde # The group tag is just to easily find this APKBUILD by some scripts for automation # group=kde-plasma pkgname=discover pkgver=5.27.7 pkgrel=1 pkgdesc="KDE Plasma resources management GUI" url="https://userbase.kde.org/Discover" # armhf blocked by qt5-qtdeclarative # ppc64le, riscv64 and s390x blocked by purpose arch="all !armhf !ppc64le !riscv64 !s390x" 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 kuserfeedback-dev kxmlgui-dev libapk-qt-dev plasma-framework-dev purpose-dev qt5-qtbase-dev qt5-qtdeclarative-dev samurai " checkdepends="xvfb-run" # secfixes: # 5.21.3-r0: # - CVE-2021-28117 case "$pkgver" in *.90*) _rel=unstable;; *) _rel=stable;; esac _repo_url="https://invent.kde.org/plasma/discover.git" source=" https://download.kde.org/$_rel/plasma/$pkgver/discover-$pkgver.tar.xz discover-apk-support.patch alpine-appstream-data.json alpine-linux-logo-icon.png " subpackages=" $pkgname-backend-apk:backend_apk $pkgname-backend-flatpak:backend_flatpak $pkgname-lang " case "$CARCH" in x86|x86_64|armv7|aarch64) makedepends="$makedepends fwupd-dev" subpackages="$subpackages $pkgname-backend-fwupd:backend_fwupd" ;; *) ;; esac _commit="" snapshot() { clean makedepends="git xz rsync tar" deps mkdir -p "$srcdir" && cd "$srcdir" git clone --filter=tree:0 https://invent.kde.org/plasma/discover.git . git archive --format tar --prefix=$pkgname/ $_commit > ../$pkgname-$_commit.tar xz -vv -T0 -9 -e ../$pkgname-$_commit.tar } build() { cmake -B build -G Ninja \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ -DCMAKE_DISABLE_FIND_PACKAGE_Snapd=ON \ -DWITH_KCM=OFF 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" amove usr/lib/qt5/plugins/discover/flatpak-backend.so amove usr/share/libdiscover/categories/flatpak-backend-categories.xml amove usr/lib/qt5/plugins/discover-notifier/FlatpakNotifier.so amove usr/share/applications/org.kde.discover-flatpak.desktop amove usr/share/metainfo/org.kde.discover.flatpak.appdata.xml amove usr/share/icons/hicolor/scalable/apps/flatpak-discover.svg } backend_apk() { pkgdesc="Apk backend for $pkgname" depends="" install_if="$pkgname apk-tools" amove usr/lib/qt5/plugins/discover/alpineapk-backend.so amove usr/lib/libexec/kauth/alpineapk_kauth_helper amove usr/share/polkit-1/actions/org.kde.discover.alpineapkbackend.policy amove usr/share/dbus-1/system.d/org.kde.discover.alpineapkbackend.conf amove usr/share/dbus-1/system-services/org.kde.discover.alpineapkbackend.service # 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 install -Dm644 -t "$subpkgdir"/usr/share/icons/hicolor/32x32/apps/ \ "$srcdir"/alpine-linux-logo-icon.png } backend_fwupd() { pkgdesc="fwupd backend for $pkgname" depends="" install_if="$pkgname fwupd" amove usr/lib/qt5/plugins/discover/fwupd-backend.so } sha512sums=" 5c691dfa1b0f83ce2063c2b5771faa22c87b3afdd6a5fcca50ccac84ec90d012c45f848e954ed9fe373110cb0ac0bb5d301656ec9b5566a68223af2728812242 discover-5.27.7.tar.xz 1ca9714ad202f4536decc99cf508f12bd1b287fba580faa2a800d5ed533649400abad544bcf1c1626b52c05d6989591d00fc02c591a76232d8c3a3ea9ee226fa discover-apk-support.patch d9cc12a5a92df820d6d133a3698a4fbb08a97f08f00554a11d87c73c6144b42d07cecd6682bf9576d83c8e2556e35ade2fb39e77895afbbe33e2f94630441bb7 alpine-appstream-data.json 0766668630cb14f58c840ebdda8b76bd1dec98b4dd61469677d4ad6eb4966809a25dbec2a846502cad0391df5b6ca9d692bb857a6fa203b61a52e6ac044cfbf4 alpine-linux-logo-icon.png "