# Contributor: Bart Ribbers <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
maintainer="team/kde <bribbers@disroot.org>"
pkgname=kio-admin
pkgver=25.04.2
pkgrel=0
pkgdesc="Manage files as administrator using the admin:// KIO protocol"
url="https://invent.kde.org/system/kio-admin"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
license="BSD-3-Clause AND (GPL-2.0-only OR GPL-3.0-only)"
# zstd is purely used to unpack the source archive
makedepends="
	extra-cmake-modules
	ki18n-dev
	kio-dev
	polkit-qt-dev
	qt6-qtbase-dev
	samurai
	"
subpackages="$pkgname-lang"
_repo_url="https://invent.kde.org/system/kio-admin.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/kio-admin-$pkgver.tar.xz"
options="!check" # No tests

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

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

sha512sums="
df322a13c270b266d7df8c7113411fa2048c562d9bb5d216ebf834cb5511c80e47a8a75c097f7c98fff4374cc07423acd09ad540a8943bd19ddb71451e2403c7  kio-admin-25.04.2.tar.xz
"
