aports/community/powerdevil/APKBUILD
2023-05-10 11:01:24 +02:00

81 lines
2.0 KiB
Plaintext

# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=powerdevil
pkgver=5.27.5
pkgrel=1
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 $pkgname-lang"
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="
3ac9d19dde9c430d17104a6abd9d410e6ea37a7a18a23e753624da2a119bc71714e948c3626d362f84bd8e89b1acd21f457b9510bc916cb85d651f587d26aa27 powerdevil-5.27.5.tar.xz
"