# Contributor: Bhushan Shah <bshah@kde.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-other
pkgname=kpeoplevcard
pkgver=0.1
pkgrel=4
pkgdesc="KPeople backend using vcard storage"
arch="all !armhf" # armhf blocked by extra-cmake-modules
url="https://invent.kde.org/pim/kpeoplevcard"
license="GPL-2.0-only OR GPL-3.0-only"
depends="kirigami2"
makedepends="
	extra-cmake-modules
	kcontacts5-dev
	kpeople5-dev
	samurai
	qt5-qtbase-dev
	"
_repo_url="https://invent.kde.org/pim/kpeoplevcard.git"
source="https://download.kde.org/stable/kpeoplevcard/$pkgver/kpeoplevcard-$pkgver.tar.xz"
subpackages="$pkgname-dev"
options="!check" # No tests

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

check() {
	ctest --test-dir build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}
sha512sums="9f11ee768d1ddce1f03f41b604180078c0315eb8b9f0118dd99eba65333400b0a0ed12ab1e08ebce3c6c0a2c93563e5c3e832a0cd458d6ea296bd64eeb9413e7  kpeoplevcard-0.1.tar.xz"
