# Maintainer: Frederic Laing <dev@fredfunk.tech>
pkgname=libcamera
pkgver=0.8.0
pkgrel=0
pkgdesc="Linux camera framework (minimal Camera build SDK)"
url="https://libcamera.org/"
arch="all"
license="LGPL-2.1-or-later AND GPL-2.0-or-later"
makedepends="
	coreutils
	eudev-dev
	gnutls-dev
	libyuv-dev
	linux-headers
	meson
	openssl
	py3-jinja2
	py3-ply
	py3-yaml
	yaml-dev
	"
subpackages="$pkgname-dev"
# Generated by build-libcamera-apk.sh from the verified v0.8.0 commit.
source="libcamera-$pkgver.tar"
# Developer-only SDK: UVC/simple + softisp, no apps, bindings or plugins.
# Match the other CI images; hardware tests are not built here.
# Meson signs installed IPA modules; abuild must not strip them afterwards.
options="!check !strip"

build() {
	abuild-meson \
		-Dpipelines=uvcvideo,simple \
		-Dipas=softisp \
		-Dgstreamer=disabled \
		-Dtest=false \
		-Dcam=disabled \
		-Dqcam=disabled \
		-Dlc-compliance=disabled \
		-Dtracing=disabled \
		-Ddocumentation=disabled \
		-Dpycamera=disabled \
		. output
	meson compile -C output -j "${JOBS:-4}"
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
bb5014731e27e408b59e710bb1ebf0a832b3c519026d623621f41083b9464f14c880e81dbd7eb2f463587ef6ad3b1f0f48edf4d60da8181df2e7188f2b65b70f  libcamera-0.8.0.tar
"
