# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-frameworks
pkgname=kidletime
pkgver=6.5.0
pkgrel=0
pkgdesc="Monitoring user activity"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://community.kde.org/Frameworks"
license="LGPL-2.0-only"
makedepends="
	doxygen
	extra-cmake-modules
	plasma-wayland-protocols
	qt6-qttools-dev
	qt6-qtwayland-dev
	samurai
	wayland-dev
	wayland-protocols
	"
subpackages="$pkgname-dev $pkgname-doc"
_repo_url="https://invent.kde.org/frameworks/kidletime.git"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/kidletime-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_QCH=ON
	cmake --build build
}

check() {
	# solidmttest is broken
	ctest --test-dir build --output-on-failure -E "solidmttest"
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
870bd1ab7aabca8a5ab832ba5ec099b423fd39d7f1b0f04750891c77fa656d621627a2738c283c23230f90efd9fd80465899802fac52ec45760d459ca02dfea2  kidletime-6.5.0.tar.xz
"
