mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-06-08 00:34:26 +02:00
152 lines
2.9 KiB
Text
152 lines
2.9 KiB
Text
# Contributor: Luca Weiss <luca@lucaweiss.eu>
|
|
maintainer="Luca Weiss <luca@lucaweiss.eu>"
|
|
pkgname=libcamera
|
|
pkgver=0.5.1
|
|
pkgrel=0
|
|
pkgdesc="Linux camera framework"
|
|
url="https://libcamera.org/"
|
|
arch="all"
|
|
license="LGPL-2.1-or-later AND GPL-2.0-or-later"
|
|
depends_dev="
|
|
eudev-dev
|
|
glib-dev
|
|
gnutls-dev
|
|
gst-plugins-bad-dev
|
|
qt6-qtbase-dev
|
|
"
|
|
# upstream calls 'date' with a non-POSIX option so we pull in coreutils
|
|
makedepends="$depends_dev
|
|
coreutils
|
|
doxygen
|
|
graphviz
|
|
gtest-dev
|
|
libevent-dev
|
|
libpisp-dev
|
|
libunwind-dev
|
|
linux-headers
|
|
meson
|
|
py3-jinja2
|
|
py3-ply
|
|
py3-pybind11-dev
|
|
py3-sphinx
|
|
py3-yaml
|
|
python3-dev
|
|
qt6-qttools-dev
|
|
yaml-dev
|
|
"
|
|
subpackages="
|
|
$pkgname-dbg
|
|
$pkgname-dev
|
|
$pkgname-doc
|
|
qcam
|
|
$pkgname-gstreamer
|
|
$pkgname-v4l2
|
|
$pkgname-tools
|
|
py3-$pkgname:py3
|
|
"
|
|
source="https://gitlab.freedesktop.org/camera/libcamera/-/archive/v$pkgver/libcamera-v$pkgver.tar.gz
|
|
qcam.desktop
|
|
"
|
|
builddir="$srcdir/$pkgname-v$pkgver"
|
|
# gstreamer tests fail
|
|
# manual strip because ipa .sign files depend on the file contents- have to re-sign after strip
|
|
options="!strip !check"
|
|
|
|
case "$CARCH" in
|
|
arm*|aarch64)
|
|
subpackages="$subpackages $pkgname-raspberrypi"
|
|
;;
|
|
esac
|
|
|
|
case "$CARCH" in
|
|
ppc64le|s390x|riscv64|loongarch64)
|
|
# doesn't install any ipa
|
|
;;
|
|
*)
|
|
depends="$pkgname-ipa=$pkgver-r$pkgrel"
|
|
subpackages="$subpackages $pkgname-ipa"
|
|
;;
|
|
esac
|
|
|
|
build() {
|
|
abuild-meson \
|
|
-Dv4l2=true \
|
|
-Dwerror=false \
|
|
. output
|
|
meson compile -C output
|
|
}
|
|
|
|
check() {
|
|
meson test -C output --print-errorlogs
|
|
}
|
|
|
|
package() {
|
|
DESTDIR="$pkgdir" meson install --no-rebuild -C output
|
|
install -Dm644 -t "$pkgdir"/usr/share/applications "$srcdir"/qcam.desktop
|
|
|
|
# manual strip first..
|
|
scanelf --recursive \
|
|
--nobanner \
|
|
--etype "ET_DYN,ET_EXEC" \
|
|
--format "%F" \
|
|
"$pkgdir" \
|
|
| while read -r file; do
|
|
strip "$file"
|
|
done
|
|
}
|
|
|
|
ipa() {
|
|
depends=""
|
|
amove usr/lib/libcamera
|
|
# then sign ipa's
|
|
local ipa
|
|
for ipa in "$subpkgdir"/usr/lib/libcamera/ipa/ipa*.so; do
|
|
msg "signing $ipa"
|
|
"$builddir"/src/ipa/ipa-sign.sh \
|
|
"$(find "$builddir"/output -type f -iname "*ipa-priv-key.pem")" \
|
|
"$ipa" \
|
|
"$ipa".sign
|
|
done
|
|
}
|
|
|
|
qcam() {
|
|
depends=""
|
|
amove usr/bin/qcam
|
|
|
|
amove usr/share/applications/qcam.desktop
|
|
}
|
|
|
|
gstreamer() {
|
|
depends=""
|
|
amove usr/lib/gstreamer-1.0
|
|
}
|
|
|
|
v4l2() {
|
|
depends=""
|
|
amove usr/libexec/libcamera/v4l2-compat.so
|
|
}
|
|
|
|
raspberrypi() {
|
|
depends=""
|
|
amove usr/share/libcamera/ipa/rpi
|
|
amove usr/libexec/libcamera/raspberrypi_ipa_proxy
|
|
amove usr/share/libcamera/pipeline/rpi/vc4
|
|
}
|
|
|
|
tools() {
|
|
depends=""
|
|
amove usr/bin/cam
|
|
amove usr/bin/lc-compliance
|
|
}
|
|
|
|
py3() {
|
|
pkgdesc="$pkgname (python bindings)"
|
|
depends="python3"
|
|
|
|
amove usr/lib/python*
|
|
}
|
|
|
|
sha512sums="
|
|
2585f9b9e016fca9ca9e93c0f11129ee83117b7d0498a3c7d6b94de1a5f0a2e97c31fbaaaebfd64b8dba0e686f37bc5e74fb0b5b4f501cb1d1532792f04ffcd7 libcamera-v0.5.1.tar.gz
|
|
22167a4eceb6d1b40b0b7c45fdf116c71684f5340de7f767535cb8e160ad9d2ae0f00cb3d461f73a344520a48a4641cf46226841d78bee06bfbfd2a91337f754 qcam.desktop
|
|
"
|