# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-other
pkgname=plasma-camera
pkgver=1.0_git20240819
pkgrel=0
_commit="73de8e63ed969595cc70ce88686e3458aa997da0"
pkgdesc="Camera application for Plasma Mobile"
# armhf blocked by kirigami
arch="all !armhf"
url="https://invent.kde.org/plasma-mobile/plasma-camera"
license="GPL-3.0-or-later AND BSD-3-Clause"
depends="
	gst-plugins-bad
	gst-plugins-good
	kirigami
	qt6-qtmultimedia
	"
makedepends="
	extra-cmake-modules
	kcoreaddons-dev
	ki18n-dev
	kirigami-dev
	qt6-qtbase-dev
	qt6-qtdeclarative-dev
	qt6-qtsvg-dev
	samurai
	"
checkdepends="appstream"
subpackages="$pkgname-lang"
source="https://invent.kde.org/plasma-mobile/plasma-camera/-/archive/$_commit/plasma-camera-$_commit.tar.gz"
builddir="$srcdir/$pkgname-$_commit"

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 --output-on-failure
}

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

sha512sums="
47c94fa9890bbb9399d820b1e1a125af974cecbd38394d2619f9fb86918a9b28e56238f3f3c3116d529fd134d1307741bec29ed213a247d36e1418efbe4e6ff1  plasma-camera-73de8e63ed969595cc70ce88686e3458aa997da0.tar.gz
"
