# 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=libksane
pkgver=25.04.2
pkgrel=0
# armhf blocked by qt6-qtdeclarative -> ki18n
arch="all !armhf"
url="https://www.kde.org/applications/graphics/"
pkgdesc="An image scanning library"
license="LGPL-2.1-only OR LGPL-3.0-only"
depends_dev="
	ki18n-dev
	ksanecore-dev
	ktextwidgets-dev
	kwallet-dev
	kwidgetsaddons-dev
	qt6-qtbase-dev
	"
makedepends="$depends_dev
	extra-cmake-modules
	samurai
	"
subpackages="$pkgname-dev $pkgname-lang"
_repo_url="https://invent.kde.org/graphics/libksane.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/libksane-$pkgver.tar.xz"
options="!check" # No tests

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

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

sha512sums="
fde7b58a59c4c7e95958772533cc6118351742483b5265557e6b8a0eaabdeda058797383567d621b91a00a891eb5b4c5c09871550fcfa824488aa31e5ec4c3d7  libksane-25.04.2.tar.xz
"
