# 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=filelight
pkgver=25.04.2
pkgrel=0
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://kde.org/applications/utilities/filelight"
pkgdesc="An application to visualize the disk usage on your computer"
license="(GPL-2.0-only OR GPL-3.0-only) AND GFDL-1.2-only"
makedepends="
	extra-cmake-modules
	kdeclarative-dev
	kdoctools-dev
	ki18n-dev
	kio-dev
	kirigami-addons-dev
	kxmlgui-dev
	qqc2-desktop-style-dev
	qt6-qtbase-dev
	samurai
	"
checkdepends="xvfb-run"
_repo_url="https://invent.kde.org/utilities/filelight.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/filelight-$pkgver.tar.xz"
subpackages="$pkgname-dbg $pkgname-doc $pkgname-lang"

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

check() {
	xvfb-run -a ctest --test-dir build
}

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

sha512sums="
671524039c2dc93346085597a53145e1676ef956bfd839dbec3ffcf9db4c0af0108b9c33f40ddc43d8fe4724cf4a85ee6cf58eab1d1d2b14c6572c5f9a314ac5  filelight-25.04.2.tar.xz
"
