# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-plasma
maintainer="team/kde <bribbers@disroot.org>"
pkgname=spacebar
pkgver=6.3.5
pkgrel=1
pkgdesc="Collection of stuff for running IM on Plasma Mobile"
url="https://invent.kde.org/plasma-mobile/spacebar"
# armhf blocked by qt6-qtdeclarative
arch="all !armhf"
license="GPL-2.0-or-later AND LicenseRef-KDE-Accepted-GPL"
depends="kirigami"
makedepends="
	c-ares-dev
	curl-dev
	extra-cmake-modules
	futuresql-dev
	kcontacts-dev
	ki18n-dev
	kio-dev
	kirigami-addons-dev
	kirigami-dev
	knotifications-dev
	kpeople-dev
	libphonenumber-dev
	modemmanager-qt-dev
	qcoro-dev
	qt6-qtbase-dev
	qt6-qtdeclarative-dev
	samurai
	"
subpackages="$pkgname-lang"

case "$pkgver" in
	*.*.9*) _rel=unstable;;
	*) _rel=stable;;
esac

_repo_url="https://invent.kde.org/plasma-mobile/spacebar.git"
source="https://download.kde.org/$_rel/plasma/$pkgver/spacebar-$pkgver.tar.xz"
options="!check" # No tests

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

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

sha512sums="
9fafbc4d9668438312f2fcf15f296d854b61daecd79a431175dc5d5cbe7f06d60039d7a25e4cf851c2c0baa2fcb3949958dce28f8cb056e765869391bd06256f  spacebar-6.3.5.tar.xz
"
