# 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=kirigami-gallery
pkgver=24.08.1
pkgrel=0
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://kde.org/applications/development/org.kde.kirigami2.gallery"
pkgdesc="Gallery application built using Kirigami"
license="LGPL-2.0-or-later"
depends="
	kirigami
	kitemmodels
	"
makedepends="
	extra-cmake-modules
	kirigami-dev
	kitemmodels-dev
	qt6-qtbase-dev
	qt6-qtsvg-dev
	qt6-qttools-dev
	samurai
	"
subpackages="$pkgname-lang"
_repo_url="https://invent.kde.org/sdk/kirigami-gallery.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/kirigami-gallery-$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() {
	ctest --test-dir build --output-on-failure
}

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

sha512sums="
59261e61c32558a3537901887c8a67b81a46deddd5230b29696dd8051793b9b03186474ea4961a106940b9ce3bff4d37abdf3c5f4896b9a83b8f0c655bf5e842  kirigami-gallery-24.08.1.tar.xz
"
