# 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-frameworks
pkgname=kirigami
pkgver=6.5.0
pkgrel=3
pkgdesc="A QtQuick based components set"
arch="all !armhf" # armhf blocked by qt6-qtdeclarative
url="https://community.kde.org/Frameworks"
license="LGPL-2.0-only"
depends="
	qt6-qtsvg
	"
depends_dev="
	kconfig-dev
	kcoreaddons-dev
	kwindowsystem-dev
	qt6-qtbase-dev
	qt6-qtdeclarative-dev
	qt6-qtsvg-dev
	"
makedepends="$depends_dev
	extra-cmake-modules
	qt6-qttools-dev
	samurai
	"
subpackages="$pkgname-dev $pkgname-libs $pkgname-lang"
_repo_url="https://invent.kde.org/frameworks/kirigami.git"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/kirigami-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DKDE_INSTALL_LIBDIR=lib \
		-DBUILD_EXAMPLES=OFF
	cmake --build build
}

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

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

sha512sums="
3b1e8e99c4587b555c1be32ff4883f9b4cbb011edc92f70603cf1ddbb0510e6172686c5eaf6a9782952a199819049cbb478c63e5b2c635b361110604ab3fac9a  kirigami-6.5.0.tar.xz
"
