# 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-mobile
pkgname=spacebar
pkgver=24.05.0
pkgrel=1
pkgdesc="Collection of stuff for running IM on Plasma Mobile"
url="https://invent.kde.org/plasma-mobile/spacebar"
# armhf blocked by qt5-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
	"
_repo_url="https://invent.kde.org/plasma-mobile/spacebar.git"
source="https://download.kde.org/stable/spacebar/spacebar-$pkgver.tar.xz
	0001-spacebar-Fix-compilation-error-due-to-duplicated-definitions.patch
	"
subpackages="$pkgname-lang"
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 -j1
}

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

sha512sums="
8809bd7c5fe6b86040ce0c9ecdb2bb6eb97c99170c19ec71081ddaf58bc8ddf1971c5edccc15bbd6148ca38b82bb9341d146ce4762fe38217ab3a82da7079da8  spacebar-24.05.0.tar.xz
a23bcca96292f2dfa0658fff3b77ecb44f298d534ec7864d4f0ef765489ec936069bd14e660cc59b19b8154194a957991ff1f4731a3fd549a89bcc9cb3886bc1  0001-spacebar-Fix-compilation-error-due-to-duplicated-definitions.patch
"
