# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=rattlesnake
pkgver=0_git20201121
pkgrel=1
_commit="841abbdf130084ba132a7283ec8edccb83e78776"
pkgdesc="A metronome app for mobile and desktop"
url="https://invent.kde.org/mbruchert/rattlesnake"
arch="all !armhf" # armhf blocked by extra-cmake-modules
license="LicenseRef-KDE-Accepted-GPL"
depends="kirigami2 gst-plugins-good"
makedepends="
	extra-cmake-modules
	qt5-qtbase-dev
	qt5-qtdeclarative-dev
	qt5-qtmultimedia-dev
	kirigami2-dev
	samurai
	"
checkdepends="appstream"
source="https://invent.kde.org/mbruchert/rattlesnake/-/archive/$_commit/rattlesnake-$_commit.tar.gz"
builddir="$srcdir/$pkgname-$_commit"

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

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

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

sha512sums="1f1d3678d6de229eac5033b7fbe3404b1cf16f731672a8375a28671095f4b108b805c6241ebbc4a13861bc3c4818f103904d97fbf3d7dfb98bec2a0e91acad83  rattlesnake-841abbdf130084ba132a7283ec8edccb83e78776.tar.gz"
