# 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=poxml
pkgver=24.08.3
pkgrel=0
arch="all !armhf !riscv64"
url="https://www.kde.org/applications/development/"
pkgdesc="Translates DocBook XML files using gettext po files"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="
	extra-cmake-modules
	gettext-dev
	kdoctools-dev
	qt6-qtbase-dev
	samurai
	"
subpackages="$pkgname-doc"
_repo_url="https://invent.kde.org/sdk/poxml.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/poxml-$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 --output-on-failure
}

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

sha512sums="
b87832a291a8282f557837e5bf2042be6bdff6c8fceb314cf64082008aa344d7ff47925e24b79e6a574aeaedb7ab0757dcbcf87cf44611b9904da05bdaa05a16  poxml-24.08.3.tar.xz
"
