# 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-other
pkgname=kirigami-addons5
pkgver=0.11.0
pkgrel=0
pkgdesc="Add-ons for the Kirigami framework"
url="https://invent.kde.org/libraries/kirigami-addons"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
license="LGPL-2.0-or-later AND GPL-2.0-or-later"
depends="
	kirigami2
	qt5-qtmultimedia
	"
makedepends="
	extra-cmake-modules
	ki18n5-dev
	kirigami2-dev
	samurai
	"
checkdepends="xvfb-run"
subpackages="$pkgname-dev $pkgname-lang"
_repo_url="https://invent.kde.org/libraries/kirigami-addons.git"
source="https://download.kde.org/stable/kirigami-addons/kirigami-addons-$pkgver.tar.xz"
builddir="$srcdir/kirigami-addons-$pkgver"

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

check() {
	# tst_sounds.qml is broken
	xvfb-run ctest --test-dir build --output-on-failure -E "tst_(sounds|avatar|album_(qmllist|abstractlist|qmlqobject)model).qml"
}

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

sha512sums="
f5a721eee6d0ebd37e67cdb5f89aba81136eb4ac23bc042b7d9bedd6a33f96f913353e1d83ec91e6997a8eea5e2834d9203eb7cd286eed1157149ecedeab6b89  kirigami-addons-0.11.0.tar.xz
"
