# 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=kde-inotify-survey
pkgver=25.04.2
pkgrel=0
pkgdesc="Tooling for monitoring inotify limits and informing the user when they have been or about to be reached"
url="https://invent.kde.org/system/kde-inotify-survey"
# 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
	kauth-dev
	kcoreaddons-dev
	kdbusaddons-dev
	ki18n-dev
	kio-dev
	knotifications-dev
	polkit-qt-dev
	qt6-qtbase-dev
	qt6-qtdeclarative-dev
	samurai
	"
_repo_url="https://invent.kde.org/system/kde-inotify-survey.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/kde-inotify-survey-$pkgver.tar.xz"

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

check() {
	ctest --test-dir build
}

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

sha512sums="
61daadb6d8f54a95caaeee0c83e832800df55467faefaa105bc72e110f9fd0a3328978a1312180e35c4ea76a31546c0c46c736d265256865535011ff2b1418c4  kde-inotify-survey-25.04.2.tar.xz
"
