# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications-old
pkgname=libkexiv2-kf5
pkgver=24.05.2
pkgrel=0
pkgdesc="Library to manipulate picture metadata (built against KF5)"
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
	qt5-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"
builddir="$srcdir/libkexiv2-$pkgver"

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="
540c3b929635375a96ed62a5008469f3c3e630a25ea514123946800055388c277ec53a8c3077385a4204f4e0b3da6f6d75a6a67cdd52f019252f568a7f2b8257  libkexiv2-24.05.2.tar.xz
"
