# 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=kamoso
pkgver=25.04.2
pkgrel=0
# armhf blocked by extra-cmake-modules
# ppc64le, s390x and riscv64 blocked by qt5-qtwebengine -> purpose
arch="all !armhf !ppc64le !s390x !riscv64"
url="https://kde.org/applications/multimedia/org.kde.kamoso"
pkgdesc="An application to take pictures and videos out of your webcam"
license="GPL-2.0-or-later AND LGPL-2.1-only"
depends="
	gst-plugins-bad
	gst-plugins-good
	kirigami2
	purpose5
	qt5-qtquickcontrols
	"
makedepends="
	extra-cmake-modules
	glib-dev
	gobject-introspection-dev
	gst-plugins-base-dev
	gstreamer-dev
	kconfig5-dev
	kdoctools5-dev
	ki18n5-dev
	kio5-dev
	knotifications5-dev
	purpose5-dev
	qt5-qtbase-dev
	samurai
	"
subpackages="$pkgname-doc $pkgname-lang"
_repo_url="https://invent.kde.org/multimedia/kamoso.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/kamoso-$pkgver.tar.xz"
options="!check" # Broken

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

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

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

sha512sums="
e15b16e84baf089d8104590a8f8fa13f4530582a228f7f6de8fe296bd0eeeb3432ec5bc392a8d12c7df3f6d1b50ddadaa89fd79dc98c018462a95a6d6504e02a  kamoso-25.04.2.tar.xz
"
