# 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=libkeduvocdocument
pkgver=25.04.2
pkgrel=0
arch="all !armhf"
url="https://edu.kde.org"
pkgdesc="Library to parse, convert, and manipulate KVTML files"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="
	extra-cmake-modules
	karchive-dev
	ki18n-dev
	kio-dev
	qt6-qtbase-dev
	samurai
	"
_repo_url="https://invent.kde.org/education/libkeduvocdocument.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/libkeduvocdocument-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-lang"

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
}

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

sha512sums="
cb6323538b00f5b56056b47967acbbcb60c55784dbde9d1a60aa1b50a97a3b707a7e92ca6beb4187511b073014f6b26d7a0c6c26d0953f23780cde868967240c  libkeduvocdocument-25.04.2.tar.xz
"
