# 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-other
pkgname=kup
pkgver=0.10.0
pkgrel=0
pkgdesc="KDE bup backup software for helping people to keep up-to-date backups"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://store.kde.org/p/1127689"
license="GPL-2.0-only"
depends="rsync"
makedepends="
	extra-cmake-modules
	kconfig-dev
	kcoreaddons-dev
	kdbusaddons-dev
	ki18n-dev
	kidletime-dev
	kio-dev
	kjobwidgets-dev
	knotifications-dev
	kwidgetsaddons-dev
	libgit2-dev
	libplasma-dev
	plasma5support-dev
	qt6-qtbase-dev
	samurai
	solid-dev
	"
_repo_url="https://invent.kde.org/system/kup.git"
source="https://download.kde.org/stable/kup/kup-$pkgver.tar.xz
	0001-fix-build.patch
	"
options="!check" # No tests
subpackages="$pkgname-lang"

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

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

sha512sums="
3ee5241b4e918488cd4e6d2d54474bafa23749c9bf7132639ca3683ec0723eabb0626df7233f898f97bc0403fca36c7431386b37e1e3d4389d4ef614f5c916c9  kup-0.10.0.tar.xz
945b4651d3a5b06d7b0e1296f57043251dbf2bebe2d4c02dac8b16024221c565e34158ffa0d459370ade4a247eb211dd20c5ec5ec3b21a922fa0136377bfdda2  0001-fix-build.patch
"
