# 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-applications
pkgname=kbackup
pkgver=24.08.0
pkgrel=0
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://kde.org/applications/utilities/org.kde.kbackup"
pkgdesc="An application which lets you back up your data in a simple, user friendly way"
license="GPL-2.0-only"
makedepends="
	extra-cmake-modules
	karchive-dev
	kdoctools-dev
	ki18n-dev
	kiconthemes-dev
	kio-dev
	knotifications-dev
	kstatusnotifieritem-dev
	kwidgetsaddons-dev
	kxmlgui-dev
	libarchive-dev
	qt6-qtbase-dev
	samurai
	shared-mime-info
	"
subpackages="$pkgname-doc $pkgname-lang"
_repo_url="https://invent.kde.org/utilities/kbackup.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/kbackup-$pkgver.tar.xz"

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="
407694dc63bc17fa8e71fd5811a1773d9a651c525782f672ebf4daa37d3bdee39052e867b29a791292085ba2578e59ddbfef45969b21674f3fb6bd31999d44c3  kbackup-24.08.0.tar.xz
"
