# 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=kinfocenter
pkgver=6.3.5
pkgrel=0
pkgdesc="A utility that provides information about a computer system"
# armhf blocked by qt6-qtdeclarative -> ki18n
arch="all !armhf"
url="https://kde.org/plasma-desktop/"
license="(GPL-2.0-only OR GPL-3.0-only) AND (LGPL-2.1-only OR LGPL-3.0-only)"
makedepends="
	extra-cmake-modules
	glu-dev
	kcmutils-dev
	kcompletion-dev
	kconfig-dev
	kconfigwidgets-dev
	kcoreaddons-dev
	kcrash-dev
	kdbusaddons-dev
	kdeclarative-dev
	kdoctools-dev
	ki18n-dev
	kiconthemes-dev
	kio-dev
	kpackage-dev
	kservice-dev
	kwayland-dev
	kwidgetsaddons-dev
	kwindowsystem-dev
	kxmlgui-dev
	libusb-dev
	qt6-qtbase-dev
	samurai
	solid-dev
	solid-dev
	"

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

subpackages="$pkgname-doc $pkgname-lang"
_repo_url="https://invent.kde.org/plasma/kinfocenter.git"
source="https://download.kde.org/$_rel/plasma/$pkgver/kinfocenter-$pkgver.tar.xz"

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

check() {
	ctest --test-dir build
}

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

sha512sums="
e358e7b16440176bb80122dfc0aa039f4e8e65f2bc993377f2e5ff3e37787120562c1ff12a451582a13247fa5172397683d77da41616374106d105960763ee4b  kinfocenter-6.3.5.tar.xz
"
