# 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=24.08.3
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"
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 --output-on-failure
}

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

sha512sums="
88a0874b32e1ba36d5e748414a37cd018dbb9c6b62f3f50da651be74fee4454045045d2b41f0a0a712294dd030eb60b50bce3342b1a9e3cc9bd91a976ed2ef61  akonadiconsole-24.08.3.tar.xz
"
