# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-plasma
maintainer="team/kde <bribbers@disroot.org>"
pkgname=plasma-activities-stats
pkgver=6.3.5
pkgrel=0
# armhf blocked by qt6-qtdeclarative
arch="all !armhf"
pkgdesc="A library for accessing the usage data collected by the activities system"
url="https://invent.kde.org/plasma/plasma-activities-stats.git"
license="LGPL-2.1-only OR LGPL-3.0-only"
depends_dev="
	boost-dev
	graphviz-dev
	kconfig-dev
	plasma-activities-dev
	qt6-qtdeclarative-dev
	qt6-qttools-dev
	"
makedepends="$depends_dev
	doxygen
	extra-cmake-modules
	qt6-qtbase-dev
	samurai
	"
subpackages="$pkgname-dev $pkgname-doc"

case "$pkgver" in
	*.*.9*) _rel=unstable;;
	*) _rel=stable;;
esac

_repo_url="https://invent.kde.org/plasma/plasma-activities-stats.git"
source="https://download.kde.org/$_rel/plasma/$pkgver/plasma-activities-stats-$pkgver.tar.xz"
options="!check" # No usable tests

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() {
	ctest --test-dir build
}

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

sha512sums="
d3a339267a998cce91500b56ba84e85c5dfc93d6ee30044785294fc3e0bf31e4775ab1b9ae43e277b1f87d7f36a4781fc368338d2120931636a1d6afb8c58ca4  plasma-activities-stats-6.3.5.tar.xz
"
