# Template file for 'kf6-kconfig'
pkgname=kf6-kconfig
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-base qt6-tools
 qt6-declarative-host-tools"
makedepends="qt6-declarative-devel qt6-base-private-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=8c675c9d35a866fbf1b564354a589019b429cca949f7ba3ba0adb9f2fa15959c

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

kf6-kconfig-devel_package() {
	depends="${sourcepkg}>=${version}_${revision} qt6-base-devel
	 qt6-declarative-devel"
	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"
	}
}
