# 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=maui
pkgname=mauikit
pkgver=3.0.2
pkgrel=0
pkgdesc="Kit for developing MAUI Apps"
# armhf blocked by qt5-qtdeclarative
arch="all !armhf"
url="https://mauikit.org/"
license="GPL-2.0-or-later"
depends="kirigami2 qt5-qtgraphicaleffects"
depends_dev="
	$pkgname=$pkgver-r$pkgrel
	kconfig5-dev
	kconfigwidgets5-dev
	kdeclarative5-dev
	kdecoration-dev
	ki18n5-dev
	kio5-dev
	knotifications5-dev
	kservice5-dev
	mauiman-dev
	plasma-framework5-dev
	qt5-qtbase-dev
	qt5-qtdeclarative-dev
	qt5-qtquickcontrols2-dev
	qt5-qtsvg-dev
	syntax-highlighting5-dev
	xcb-util-wm-dev
	"
makedepends="$depends_dev
	extra-cmake-modules
	samurai
	"
_repo_url="https://invent.kde.org/maui/mauikit.git"
source="https://download.kde.org/stable/maui/mauikit/$pkgver/mauikit-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-lang"

build() {
	cmake -B build -G Ninja \
		-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="
4b2f26d898146ceff25dea71789522e6b3f269b9a32a465449d82a095697f1d1dfe84fc797b6b7aafa39638241a5463628e07440be407172ccaf0674d47ef316  mauikit-3.0.2.tar.xz
"
