# Template file for 'kf6-kconfig'
pkgname=kf6-kconfig
version=6.8.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-base qt6-tools
 qt6-declarative-host-tools"
makedepends="qt6-declarative-devel"
short_desc="KDE Persistent platform-independent application settings"
maintainer="John <me@johnnynator.dev>"
license="LGPL-2.1-or-later"
homepage="https://invent.kde.org/frameworks/kconfig"
distfiles="${KDE_SITE}/frameworks/${version%.*}/${pkgname#kf6-}-${version}.tar.xz"
checksum=3f8f3c2ef384a5281ae5a3918a3e3cc2be0168eb14becfdaa61710655d8b16ac

do_check() {
	cd build
	# disable failing tests
	ctest -E "kconfigcore-kconfigtest|kconfiggui-kstandardshortcutwatchertest"
}

kf6-kconfig-devel_package() {
	depends="$makedepends ${sourcepkg}>=${version}_${revision}"
	short_desc+=" - development files"
	pkg_install() {
		vmove usr/include
		vmove usr/lib/cmake
		mkdir -p "${DESTDIR}/usr/lib/cmake/KF6Config"
		mv ${PKGDESTDIR}/usr/lib/cmake/KF6Config/KF6ConfigCompiler* \
			"${DESTDIR}/usr/lib/cmake/KF6Config"
		vmove "usr/lib/*.so"
	}
}
