# Template file for 'kf6-kauth'
pkgname=kf6-kauth
version=6.25.0
revision=1
build_style=cmake
configure_args="-DKDE_INSTALL_QMLDIR=lib/qt6/qml
 -DKDE_INSTALL_QTPLUGINDIR=lib/qt6/plugins"
hostmakedepends="extra-cmake-modules qt6-tools qt6-base"
makedepends="kf6-kcoreaddons-devel kf6-kwindowsystem-devel polkit-qt6-devel"
checkdepends="dbus"
short_desc="KDE Execute actions as privileged user"
maintainer="John <me@johnnynator.dev>"
license="LGPL-2.1-or-later"
homepage="https://invent.kde.org/frameworks/kauth"
distfiles="${KDE_SITE}/frameworks/${version%.*}/${pkgname#kf6-}-${version}.tar.xz"
checksum=e1a9b20a1b8718a0a0ead943e6ae999692fe7efe6b5bd513fdb5ba1849e4bdf0
subpackages="kf6-kauth-tools kf6-kauth-devel"

do_check() {
	cd build
	dbus-run-session ctest
}

kf6-kauth-tools_package() {
	short_desc+=" - tools"
	pkg_install() {
		vmove usr/libexec
		vmove "usr/lib/cmake/KF6Auth/*Tools*"
	}
}

kf6-kauth-devel_package() {
	depends="$makedepends kf6-kauth-tools>=${version}_${revision}
	 ${sourcepkg}>=${version}_${revision}"
	short_desc+=" - development files"
	pkg_install() {
		vmove usr/include
		vmove usr/lib/cmake
		vmove "usr/lib/*.so"
	}
}
