# Contributor: Bart Ribbers # Maintainer: Bart Ribbers pkgname=powerdevil pkgver=9999_git1688448585 pkgrel=0 pkgdesc="Manages the power consumption settings of a Plasma Shell" # armhf blocked by extra-cmake-modules arch="all !armhf" 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 ddcutil-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 libcap-utils samurai " 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 " build() { # HAVE_DDCUTIL needs to be set manually for now but is enabled by default in the next # (post 5.27.3) powerdevil version. Nothing changed in particular warranting it to be # enabled again, but upstream mentions the reasons for originally disabling it by default # aren't known anymore and it's time to re-enable again cmake -B build -G Ninja \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ -DHAVE_DDCUTIL=On cmake --build build } check() { cd build CTEST_OUTPUT_ON_FAILURE=TRUE ctest } package() { DESTDIR="$pkgdir" cmake --install build # We don't ship systemd rm -r "$pkgdir"/usr/lib/systemd # org_kde_powerdevil has CAP_WAKE_ALARM set and this breaks dbus # Remove CAP_WAKE_ALARM from org_kde_powerdevil to make it work again setcap -r "$pkgdir"/usr/lib/libexec/org_kde_powerdevil } sha512sums=" 9dd18fc3246bc6371bc19ac7544b89de517d34c7773970e2eaacea69edcd94d28b1c7b9c12f036999a849f8b393a7ff1a4244a6f9888712bf4d34796f702436c powerdevil-5.27.6.tar.xz " options="$options !strip"