# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=francis
pkgver=24.08.0
pkgrel=0
pkgdesc="Track your time"
url="https://invent.kde.org/utilities/francis"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
license="GPL-3.0-or-later AND LGPL-2.0-or-later and BSD-2-Clause AND BSD-3-Clause"
makedepends="
	extra-cmake-modules
	kconfig-dev
	kcoreaddons-dev
	kdbusaddons-dev
	ki18n-dev
	kirigami-addons-dev
	kirigami-dev
	knotifications-dev
	qt6-qtbase-dev
	qt6-qtdeclarative-dev
	qt6-qtsvg-dev
	samurai
	"
checkdepends="xvfb-run"
subpackages="$pkgname-lang"
_repo_url="https://invent.kde.org/utilities/francis.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/francis-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-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="
936797c998a767ebc55abd728f222f8686961178944ad7656c6616e75b9d04a2628fa915e1b3dfe382de515a41e48252ae180974491ad59981d413a6dfc35c9c  francis-24.08.0.tar.xz
"
