# 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=kde-applications
pkgname=kasts
pkgver=24.08.1
pkgrel=0
pkgdesc="Kirigami-based podcast player"
# armhf blocked by extra-cmake-modules
# s390x blocked by vlc
arch="all !armhf !s390x"
url="https://invent.kde.org/plasma-mobile/kasts"
license="LicenseRef-KDE-Accepted-GPL AND CC0-1.0"
depends="
	gst-plugins-good
	kirigami-addons
	kirigami
	qt6-qtbase-sqlite
	"
makedepends="
	extra-cmake-modules
	kcolorscheme-dev
	kconfig-dev
	kcoreaddons-dev
	ki18n-dev
	kirigami-addons-dev
	kirigami-dev
	networkmanager-qt-dev
	openssl-dev>3
	qt6-qtbase-dev
	qt6-qtdeclarative-dev
	qt6-qtmultimedia-dev
	qt6-qtsvg-dev
	qtkeychain-dev
	samurai
	syndication-dev
	taglib-dev
	threadweaver-dev
	vlc-dev
	"
subpackages="$pkgname-lang"
_repo_url="https://invent.kde.org/multimedia/kasts.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/kasts-$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="
01dbce271ab5e84504b407029fbb160e8437f9f2aca7f4b3ebd7d5edcb8cb7c976c76f2d1d8d6d8533251a2f125d6d10653a9a509f77afd02d5b5fab8006b62a  kasts-24.08.1.tar.xz
"
