# 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-extras
pkgver=25.04.2
pkgrel=0
# armhf blocked by syntax-highlighting
arch="all !armhf"
url="https://www.kde.org/applications/internet/"
pkgdesc="Additional components to increase the functionality of KIO"
license="GPL-2.0-or-later (LGPL-2.1-only OR LGPL-3.0-only)"
makedepends="
	extra-cmake-modules
	gperf
	karchive-dev
	kbookmarks-dev
	kcmutils-dev
	kconfig-dev
	kconfigwidgets-dev
	kcoreaddons-dev
	kdbusaddons-dev
	kdnssd-dev
	kdoctools-dev
	kdsoap-qt6-dev
	kdsoap-ws-discovery-client-dev
	kguiaddons-dev
	ki18n-dev
	kiconthemes-dev
	kio-dev
	kpty-dev
	kstatusnotifieritem-dev
	libimobiledevice-dev
	libkexiv2-dev
	libmtp-dev
	libssh-dev
	nfs-utils-dev
	phonon-dev
	plasma-activities-stats-dev
	qcoro-dev
	qt6-qtbase-dev
	qt6-qtsvg-dev
	samba-dev
	samurai
	shared-mime-info
	solid-dev
	syntax-highlighting-dev
	taglib-dev
	"
checkdepends="xvfb-run dbus"
subpackages="$pkgname-doc $pkgname-lang"
_repo_url="https://invent.kde.org/network/kio-extras.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/kio-extras-$pkgver.tar.xz"

replaces="kio5"

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

check() {
	dbus-run-session -- xvfb-run -a ctest --test-dir build \
		-E "testkioarchive|thumbnailtest|ActivityBasicTest"
}

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

sha512sums="
e84ddd9bc721303859acc072eae7978d65156df05b4f9c82981b57e4955ea3f223e9bab6748c3e19755acd706475a50149accc468f57e9650399e964742b55f4  kio-extras-25.04.2.tar.xz
"
