1 # Maintainer: David Runge <dvzrv@archlinux.org>
12 _commit=6a57d964abdb3f24608c0fc2839d96e02eebddeb # refs/tags/v0.0.4
14 pkgdesc="A complex camera support library for Linux, Android, and ChromeOS"
16 url="https://libcamera.org/"
17 license=(LGPL2.1 GPL2)
41 source=(git+https://git.libcamera.org/$pkgname/$pkgname.git#tag=$_commit)
45 local p="$1" f d; shift
47 d="$srcdir/$p/${f#$pkgdir/}"
48 mkdir -p "$(dirname "$d")"
50 rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
56 # add version, so that utils/gen-version.sh may rely on it
57 printf "%s\n" "$pkgver" > .tarball-version
67 arch-meson $pkgname build "${meson_options[@]}"
68 meson compile -C build
72 meson test -C build || echo "Tests require CLONE_NEWUSER/ CLONE_NEWNET."
85 systemd-libs libudev.so
88 'gst-plugin-libcamera: GStreamer plugin'
89 'libcamera-docs: for documentation'
90 'libcamera-tools: for applications'
92 provides=(libcamera.so libcamera-base.so)
94 meson install -C build --destdir "$pkgdir"
98 _pick $pkgbase-docs usr/share/doc
99 _pick $pkgbase-ipa usr/lib/libcamera/
100 _pick $pkgbase-tools usr/bin/{cam,qcam,lc-compliance}
101 _pick gst-plugin-$pkgbase usr/lib/gstreamer-*
105 package_libcamera-docs() {
106 pkgdesc+=" - documentation"
108 mv -v $pkgname/* "$pkgdir"
109 mv -v "$pkgdir/usr/share/doc/$pkgbase-$pkgver/" "$pkgdir/usr/share/doc/$pkgbase/"
110 rm -frv "$pkgdir/usr/share/doc/$pkgbase/html/.buildinfo"
113 package_libcamera-ipa() {
114 pkgdesc+=" - signed IPA"
118 libcamera libcamera.so libcamera-base.so
120 # stripping requires re-signing of IPA libs, so we do it manually
123 strip $pkgname/usr/lib/libcamera/*{.so,proxy}
124 for _lib in $pkgname/usr/lib/libcamera/*.so; do
125 $pkgbase/src/ipa/ipa-sign.sh "$(find build -type f -iname "*ipa-priv-key.pem")" "$_lib" "$_lib.sign"
127 mv -v $pkgname/* "$pkgdir"
130 package_libcamera-tools() {
136 libcamera libcamera.so libcamera-base.so
138 libevent libevent-2.1.so libevent_pthreads-2.1.so
139 libjpeg-turbo libjpeg.so
145 conflicts=("$pkgbase-tests<0.0.1-2")
146 replaces=("$pkgbase-tests<0.0.1-2")
148 mv -v $pkgname/* "$pkgdir"
151 package_gst-plugin-libcamera() {
152 pkgdesc="Multimedia graph framework - libcamera plugin"
156 glib2 libg{lib,object}-2.0.so
158 gst-plugins-base-libs
159 libcamera libcamera.so libcamera-base.so
162 mv -v $pkgname/* "$pkgdir"