# Template file for 'akonadi-search'
pkgname=akonadi-search
version=24.12.1
revision=1
build_style=cmake
build_helper="rust"
configure_args="-DBUILD_TESTING=OFF -DKF6_HOST_TOOLING=/usr/lib/cmake
 -DKDE_INSTALL_QTPLUGINDIR=lib/qt6/plugins
 -DKDE_INSTALL_QMLDIR=lib/qt6/qml
 -DECM_MKSPECS_INSTALL_DIR=/usr/lib/qt6/mkspecs/modules"
hostmakedepends="extra-cmake-modules qt6-base qt6-tools python3 AppStream
 gettext kf6-kcoreaddons kf6-kpackage corrosion cargo kf6-kconfig kf6-kcmutils"
makedepends="kf6-akonadi-devel akonadi-mime-devel xapian-core-devel rust-std
 ktextaddons-devel kf6-krunner-devel
 kf6-kcmutils-devel kf6-kcontacts-devel kf6-kcalendarcore-devel"
short_desc="Libraries and daemons to implement searching in Akonadi"
maintainer="John <me@johnnynator.dev>"
license="GPL-2.0-or-later, LGPL-2.1-or-later"
homepage="https://community.kde.org/KDE_PIM"
distfiles="${KDE_SITE}/release-service/${version}/src/akonadi-search-${version}.tar.xz"
checksum=be94ed8c1bdc8c0588c4104929fe9aed04ed77f1fa7ee5315a54f83ff4a8720e

do_check() {
	cd build
	# Require Akonadi running
	ctest -E '(akonadi-sqlite-schedulertest|akonadi-sqlite-collectionindexingjobtest)'
}

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