# Contributor: Bart Ribbers <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
maintainer="team/kde <bribbers@disroot.org>"
pkgname=akonadiconsole
pkgver=25.04.2
pkgrel=0
# s390x, ppc64le, armhf and riscv64 blocked by akonadi
# ppc64le, armv7 and loongarch64 blocked by calendarsupport
#arch="all !armhf !s390x !ppc64le !riscv64 !armv7 !loongarch64"
arch="" # blocked by xapian-bindings -> py3-sphinx-autobuild -> uvicorn
url="https://kontact.kde.org/"
pkgdesc="Application for debugging Akonadi Resources"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="
	akonadi-contacts-dev
	akonadi-dev
	akonadi-search-dev
	calendarsupport-dev
	extra-cmake-modules
	kcalendarcore-dev
	kcompletion-dev
	kcompletion-dev
	kconfig-dev
	kconfigwidgets-dev
	kcontacts-dev
	kcrash-dev
	kdbusaddons-dev
	kdoctools-dev
	ki18n-dev
	kio-dev
	kitemmodels-dev
	kitemviews-dev
	kmime-dev
	ktextwidgets-dev
	kwidgetsaddons-dev
	kxmlgui-dev
	libkdepim-dev
	messagelib-dev
	qt6-qtbase-dev
	samurai
	xapian-bindings
	"
checkdepends="xvfb-run"
_repo_url="https://invent.kde.org/pim/akonadiconsole.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/akonadiconsole-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	xvfb-run ctest --test-dir build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
e03f8ad746acbc47a93269942cd31b28e4a90a988b4a8c874fe4ef6647df940fb6a997453191e0f579597c61ee565f6c374efb025d306fde29c6ba19f255fe89  akonadiconsole-25.04.2.tar.xz
"
