1 # Maintainer: David Runge <dvzrv@archlinux.org>
12 _commit=5fa37d7623053ef5a693b276986a44d010d057e5 # refs/tags/v0.0.5
14 pkgdesc="A complex camera support library for Linux, Android, and ChromeOS"
16 url="https://libcamera.org/"
45 git+https://git.libcamera.org/$pkgbase/$pkgbase.git#tag=$_commit
46 $pkgbase-0.0.5-sphinx.patch
49 '52abec885c0a38c042622bc1bb106f7cefc19e3d8d0b6dcba7c4fadae3ad9303d5ae74447a72abe710598bc2162d57900be54bfe0de18d4c0842160c1c65b35a')
51 'e43847222ad644a23761f7f601891971f499552156d8dfd5922732d134e5a09202c6c4fa3880e13c1ae950d34c5a3617ada12fabc06368e3201110ac5455af7f')
54 local p="$1" f d; shift
56 d="$srcdir/$p/${f#$pkgdir/}"
57 mkdir -p "$(dirname "$d")"
59 rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
66 # add version, so that utils/gen-version.sh may rely on it
67 printf "%s\n" "$pkgver" > .tarball-version
69 # fix use of python-sphinx
70 # https://github.com/sphinx-doc/sphinx/pull/11381
71 git apply -v ../$pkgbase-0.0.5-sphinx.patch
81 arch-meson $pkgbase build "${meson_options[@]}"
82 meson compile -C build
86 meson test -C build || echo "Tests require CLONE_NEWUSER/ CLONE_NEWNET."
99 systemd-libs libudev.so
102 'gst-plugin-libcamera: GStreamer plugin'
103 'libcamera-docs: for documentation'
104 'libcamera-tools: for applications'
106 provides=(libcamera.so libcamera-base.so)
108 meson install -C build --destdir "$pkgdir"
112 _pick $pkgbase-docs usr/share/doc
113 _pick $pkgbase-ipa usr/lib/libcamera/
114 _pick $pkgbase-tools usr/bin/{cam,qcam,lc-compliance}
115 _pick gst-plugin-$pkgbase usr/lib/gstreamer-*
119 package_libcamera-docs() {
120 pkgdesc+=" - documentation"
122 mv -v $pkgname/* "$pkgdir"
123 mv -v "$pkgdir/usr/share/doc/$pkgbase-$pkgver/" "$pkgdir/usr/share/doc/$pkgbase/"
124 rm -frv "$pkgdir/usr/share/doc/$pkgbase/html/.buildinfo"
127 package_libcamera-ipa() {
128 pkgdesc+=" - signed IPA"
132 libcamera libcamera.so libcamera-base.so
134 # stripping requires re-signing of IPA libs, so we do it manually
137 strip $pkgname/usr/lib/libcamera/*{.so,proxy}
138 for _lib in $pkgname/usr/lib/libcamera/*.so; do
139 $pkgbase/src/ipa/ipa-sign.sh "$(find build -type f -iname "*ipa-priv-key.pem")" "$_lib" "$_lib.sign"
141 mv -v $pkgname/* "$pkgdir"
144 package_libcamera-tools() {
150 libcamera libcamera.so libcamera-base.so
152 libevent libevent-2.1.so libevent_pthreads-2.1.so
153 libjpeg-turbo libjpeg.so
159 conflicts=("$pkgbase-tests<0.0.1-2")
160 replaces=("$pkgbase-tests<0.0.1-2")
162 mv -v $pkgname/* "$pkgdir"
165 package_gst-plugin-libcamera() {
166 pkgdesc="Multimedia graph framework - libcamera plugin"
170 glib2 libg{lib,object}-2.0.so
172 gst-plugins-base-libs
173 libcamera libcamera.so libcamera-base.so
176 mv -v $pkgname/* "$pkgdir"