# 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=plasma-dialer
pkgver=23.01.0
pkgrel=9
pkgdesc="A dialer for Plasma Mobile"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://invent.kde.org/plasma-mobile/plasma-dialer"
license="GPL-2.0-or-later"
depends="
	kirigami-addons5
	kirigami2
	oxygen-sounds
	"
makedepends="
	extra-cmake-modules
	callaudiod-dev
	kcontacts5-dev
	kcoreaddons5-dev
	kdbusaddons5-dev
	ki18n5-dev
	kio5-dev
	kirigami-addons5-dev
	knotifications5-dev
	kpeople5-dev
	libphonenumber-dev
	modemmanager-qt5-dev
	pulseaudio-qt-dev
	qt5-qtbase-dev
	qt5-qtdeclarative-dev
	qt5-qtfeedback-dev
	qt5-qtquickcontrols2-dev
	qtmpris-dev
	samurai
	"
subpackages="$pkgname-lang"
_repo_url="https://invent.kde.org/plasma-mobile/plasma-dialer.git"
source="https://download.kde.org/stable/plasma-mobile/$pkgver/plasma-dialer-$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
}

check() {
	ctest --test-dir build --output-on-failure
}

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

sha512sums="
df218ddf942560ac7eb7607e60425ed8fd19757f2a515d2e3d11dea30a35cc16e38a6cfc11873e74920ec32483ae5f270e085f05ac67b8c38ccc3e04a76f1e27  plasma-dialer-23.01.0.tar.xz
"
