# 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=libkomparediff2
pkgver=25.04.2
pkgrel=0
# armhf blocked by extra-cmake-modules
arch="all !armhf"
pkgdesc="Library to compare files and strings"
url="https://kde.org/applications/development"
license="GPL-2.0-or-later AND LGPL-2.0-or-later"
makedepends="
	extra-cmake-modules
	kconfig-dev
	kcoreaddons-dev
	ki18n-dev
	kio-dev
	kxmlgui-dev
	qt6-qtbase-dev
	samurai
	"
subpackages="$pkgname-dev $pkgname-lang"
_repo_url="https://invent.kde.org/sdk/libkomparediff2.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/libkomparediff2-$pkgver.tar.xz"

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
}

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

sha512sums="
7fa1c7fccc50f383a6c13cd7aa54e6b0136f6ea4a453b4466b5e1865b1f25ec8704e876e118d667c9f49da798e600f36037039a5e3a8c10b60c95f2cbb1faec7  libkomparediff2-25.04.2.tar.xz
"
