# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=maui
pkgname=mauikit-texteditor
pkgver=3.0.2
pkgrel=0
pkgdesc="MauiKit Text Editor components"
# armhf blocked by qt5-qtdeclarative
arch="all !armhf"
url="https://mauikit.org/"
license="GPL-2.0-or-later"
depends="kirigami2"
makedepends="
	extra-cmake-modules
	kcoreaddons5-dev
	ki18n5-dev
	syntax-highlighting5-dev
	mauikit
	mauikit-dev
	qt5-qtbase-dev
	qt5-qtdeclarative-dev
	samurai
	"
subpackages="$pkgname-dev $pkgname-lang"
_repo_url="https://invent.kde.org/maui/mauikit-texteditor.git"
source="https://download.kde.org/stable/maui/mauikit-texteditor/$pkgver/mauikit-texteditor-$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="
12b53717d41fd91affca1217c6ee90742170ca4794b86ddca60e942652796d8c79c65ab8458d9b27b91e1eb94032f23ff146906ee20f06dd9d5dea1c097ebf51  mauikit-texteditor-3.0.2.tar.xz
"
