# 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=libkexiv2
pkgver=24.08.3
pkgrel=0
pkgdesc="Library to manipulate picture metadata"
url="https://www.kde.org/applications/graphics"
arch="all !armhf" # extra-cmake-modules
license="GPL-2.0-or-later"
makedepends="
	exiv2-dev
	extra-cmake-modules
	qt6-qt5compat-dev
	qt6-qtbase-dev
	samurai
	"
subpackages="$pkgname-dev"
_repo_url="https://invent.kde.org/graphics/libkexiv2.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/libkexiv2-$pkgver.tar.xz"
options="!check" # No usable tests

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="
98c1cedec7ef26ed05b8b542ff54728155a1d18cb240bdb57001168db83fe6c16d7fdd2e67b305cb0dd64879dc267e0cac4d413f934b4003410b80742cf711e4  libkexiv2-24.08.3.tar.xz
"
