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

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=ktrip
pkgver=24.08.1
pkgrel=0
pkgdesc="A public transport assistant"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://invent.kde.org/utilities/ktrip"
license="GPL-2.0-only OR GPL-3.0-only"
depends="
	kde-icons
	kirigami
	kirigami-addons
	qqc2-desktop-style
	sonnet
	"
makedepends="
	extra-cmake-modules
	kconfig-dev
	kcontacts-dev
	ki18n-dev
	kirigami-addons-dev
	kitemmodels-dev
	kpublictransport-dev
	qqc2-desktop-style-dev
	qt6-qtbase-dev
	qt6-qtdeclarative-dev
	samurai
	"
_repo_url="https://invent.kde.org/utilities/ktrip.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/ktrip-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DKF_IGNORE_PLATFORM_CHECK=ON
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

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

sha512sums="
bb1f61835711bfda43036c9a4e4d655df90efb5a270bb2d4edad90ad4d4233e12789071819975701818bc4e5d7b3eb9ed265359b6f51ca52dec2691c9de79311  ktrip-24.08.1.tar.xz
"
