# 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=kdesdk-thumbnailers
pkgver=24.08.1
pkgrel=0
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://www.kde.org/applications/development/"
pkgdesc="Plugins for the thumbnailing system"
license="GPL-2.0-only OR GPL-3.0-only"
makedepends="
	extra-cmake-modules
	gettext-dev
	kconfig-dev
	ki18n-dev
	kio-dev
	qt6-qtbase-dev
	samurai
	"
subpackages="$pkgname-lang"
_repo_url="https://invent.kde.org/sdk/kdesdk-thumbnailers.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/kdesdk-thumbnailers-$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="
2ca1e77537bbbec3c52da693253c103ea77de393d2a34055ae248abd0db62439a04a0a91e256a22ba9f54ec0a3aec124ae457ad8ac8bc0e515c9696bc3b764a2  kdesdk-thumbnailers-24.08.1.tar.xz
"
