# 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=kolourpaint
pkgver=24.08.1
pkgrel=0
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="http://www.kolourpaint.org/"
pkgdesc="An easy-to-use paint program"
license="BSD-2-Clause AND LGPL-2.0-or-later AND GFDL-1.2-only"
makedepends="
	extra-cmake-modules
	kdoctools-dev
	kguiaddons-dev
	ki18n-dev
	kiconthemes-dev
	kio-dev
	kitemmodels-dev
	ktextwidgets-dev
	kwidgetsaddons-dev
	kxmlgui-dev
	libksane-dev
	qt6-qtbase-dev
	samurai
	"
subpackages="$pkgname-doc $pkgname-lang"
_repo_url="https://invent.kde.org/graphics/kolourpaint.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/kolourpaint-$pkgver.tar.xz"

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

check() {
	ctest --test-dir build --output-on-failure
}

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

sha512sums="
9591a08e603a8b82ec4b3d87b83ae1d9964c8dde3b7befedf9793e4ab449c6f5a8771653b1bbc556a2c4b5e2e1da58be282529e1a2e3f4ff3366d7ea932439e6  kolourpaint-24.08.1.tar.xz
"
