# Contributor: Bart Ribbers <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
maintainer="team/kde <bribbers@disroot.org>"
pkgname=ffmpegthumbs
pkgver=24.08.3
pkgrel=0
# armhf blocked by extra-cmake-modules
# not useful on s390x
arch="all !s390x !armhf"
url="https://www.kde.org/applications/multimedia/"
pkgdesc="FFmpeg-based thumbnail creator for video files"
license="GPL-2.0-or-later"
makedepends="
	extra-cmake-modules
	ffmpeg-dev
	kconfig-dev
	ki18n-dev
	kio-dev
	qt6-qtbase-dev
	samurai
	taglib-dev
	"
_repo_url="https://invent.kde.org/multimedia/ffmpegthumbs.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/ffmpegthumbs-$pkgver.tar.xz"
options="!check" # No usable tests

build() {
	cmake -B build -G Ninja \
		-DBUILD_WITH_QT6=ON \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-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="
3614c45d33e2b8bbed957afdcf0192f57dc5a03e93bf5917f52053539459ec3f4778c18b0ce40502a4667b2a46520f2835889a0d79b6c3cdeb0b733e1a6e275b  ffmpegthumbs-24.08.3.tar.xz
"
