# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=ktrip
pkgver=0_git20200327
pkgrel=0
_commit="222467070c3d823d7acf5572b3e0b95be68392c3"
pkgdesc="A public transport assistant"
arch="all !armhf"
url="https://invent.kde.org/kde/ktrip"
license="GPL-2.0-only OR GPL-3.0-only"
makedepends="extra-cmake-modules qt5-qtbase-dev qt5-qtdeclarative-dev ki18n-dev kitemmodels-dev kconfig-dev kcontacts-dev kpublictransport-dev"
source="$pkgname-$_commit.tar.gz::https://invent.kde.org/kde/ktrip/-/archive/$_commit/ktrip-$_commit.tar.gz"
options="!check" # No tests
builddir="$srcdir/$pkgname-$_commit"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	make -C build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" make -C build install
}
sha512sums="bd640bce67a365b03d754ffdbaa4e6e12b7a0a64467cc2dd9ccbb22035376c537e64f1f3780d4e6917a6104c0f0341c29266e00ae5030deb003ae8adbb548504  ktrip-222467070c3d823d7acf5572b3e0b95be68392c3.tar.gz"
