# 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=parley
pkgver=25.04.2
pkgrel=0
# armhf blocked by extra-cmake-modules
# armv7, ppc64le, s390x and riscv64 blocked by qt6-qtwebengine
arch="all !armhf !armv7 !ppc64le !s390x !riscv64"
url="https://kde.org/applications/education/org.kde.parley"
pkgdesc="Vocabulary Trainer"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="
	extra-cmake-modules
	kcmutils-dev
	kconfig-dev
	kcoreaddons-dev
	kcrash-dev
	kdoctools-dev
	ki18n-dev
	kio-dev
	knewstuff-dev
	knotifications-dev
	kxmlgui-dev
	libkeduvocdocument-dev
	libxml2-dev
	libxslt-dev
	qt6-qtbase-dev
	qt6-qtmultimedia-dev
	qt6-qtsvg-dev
	qt6-qtwebengine-dev
	samurai
	sonnet-dev
	"
checkdepends="xwayland-run"
subpackages="$pkgname-doc $pkgname-lang"
_repo_url="https://invent.kde.org/education/parley.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/parley-$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() {
	wlheadless-run -- ctest --test-dir build
}

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

sha512sums="
97fac0e7a2e2d8426e3edc8ff083290d3b6ca833535a0da9237cbdc62eb2794eb4f7919d25ed376783b8d1c64692fb9b7b7f684a8fc49d2aaf806d19dbabe71b  parley-25.04.2.tar.xz
"
