# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=ksysguard
pkgver=5.12.5
pkgrel=0
pkgdesc='Track and control the processes running in your system'
arch="all"
url='https://userbase.kde.org/KSysGuard'
license="GPL-2.0"
depends=""
depends_dev="libksysguard-dev attica-qt-dev kinit-dev kxmlgui-dev kconfig-dev kcoreaddons-dev
			kdbusaddons-dev ki18n-dev kiconthemes-dev kitemviews-dev kio-dev knotifications-dev
			kservice-dev kbookmarks-dev kwidgetsaddons-dev kcompletion-dev kjobwidgets-dev
			qt5-qtbase-dev solid-dev kxmlgui-dev kconfigwidgets-dev kauth-dev kcodecs-dev
			kwindowsystem-dev knewstuff-dev"
makedepends="$depends_dev extra-cmake-modules kdoctools-dev"
source="https://download.kde.org/stable/plasma/${pkgver}/$pkgname-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"

build() {
	cmake \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DKDE_INSTALL_LIBDIR=lib \
		-DBUILD_TESTING=OFF
	make
}

check() {
	cd "$builddir"
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	cd "$builddir"
	make DESTDIR="${pkgdir}" install
}
sha512sums="02f5b64a39e395869479ab93ef683136b7017dfb51e55dc03206641bd46052e656547244fc2b6cd86902d5a4f08a5a8fd7d1d5ba0fed73c765a2cfbc39f4bd32  ksysguard-5.12.5.tar.xz"
