diff options
-rw-r--r-- | PKGBUILD | 74 | ||||
-rw-r--r-- | libcamera-0.0.5-sphinx.patch | 13 |
2 files changed, 45 insertions, 42 deletions
@@ -1,20 +1,25 @@ -# Maintainer: David Runge <dvzrv@archlinux.org> - -pkgbase=libcamera +# Maintainer: Stijn Buys <ingar@telenet.be> +# based on the archlinux libcamera package by David Runge <dvzrv@archlinux.org> +# +# TODO +# - use release tarball instead of GIT +# - create a separate libpisp package + +pkgbase=libcamera-rpi pkgname=( - libcamera - libcamera-docs - libcamera-ipa - libcamera-tools - gst-plugin-libcamera + libcamera-rpi + libcamera-rpi-docs + libcamera-rpi-ipa + libcamera-rpi-tools + gst-plugin-libcamera-rpi ) -pkgver=0.2.0 -_commit=a3690f601bf9a90e1a936d9f361aebd789e3b073 # refs/tags/v0.2.0 +pkgver=0.2.0+rpt20240215 +_commit=075b54d5229d0894109e7cbb4bb890bc48bb37e8 # refs/tags/v0.2.0+rpt20240215 pkgrel=1 -pkgdesc="A complex camera support library for Linux, Android, and ChromeOS" -arch=(x86_64) -url="https://libcamera.org/" -_url=https://git.libcamera.org/libcamera/libcamera.git +pkgdesc="A complex camera support library for Linux, Android, and ChromeOS (RPi Foundation fork)" +arch=(aarch64) +url="https://github.com/raspberrypi/libcamera" +_url="https://github.com/raspberrypi/libcamera.git" makedepends=( doxygen git @@ -36,6 +41,7 @@ makedepends=( sdl2 systemd texlive-core + texlive-latex ) source=( "git+$_url#tag=$_commit" @@ -59,6 +65,7 @@ pkgver() { } prepare() { + mv libcamera $pkgbase cd $pkgbase # add version, so that utils/gen-version.sh may rely on it @@ -67,9 +74,14 @@ prepare() { build() { local meson_options=( + --buildtype=release + --wrap-mode default + -D pipelines=rpi/vc4,rpi/pisp + -D ipas=rpi/vc4,rpi/pisp -D v4l2=true -D tracing=disabled -D test=true + -D pycamera=enabled ) arch-meson $pkgbase build "${meson_options[@]}" @@ -80,7 +92,7 @@ check() { meson test -C build || echo "Tests require CLONE_NEWUSER/ CLONE_NEWNET." } -package_libcamera() { +package_libcamera-rpi() { license=( Apache-2.0 CC0-1.0 @@ -94,7 +106,7 @@ package_libcamera() { gcc-libs glibc gnutls - libcamera-ipa + libcamera-rpi-ipa libelf libunwind libyaml @@ -102,12 +114,14 @@ package_libcamera() { systemd-libs libudev.so ) optdepends=( - 'gst-plugin-libcamera: GStreamer plugin' - 'libcamera-docs: for documentation' - 'libcamera-tools: for applications' + 'gst-plugin-libcamera-rpi: GStreamer plugin' + 'libcamera-rpi-docs: for documentation' + 'libcamera-rpi-tools: for applications' ) provides=(libcamera.so libcamera-base.so) + conflicts=(libcamera) + meson install -C build --destdir "$pkgdir" install -vDm 644 $pkgbase/LICENSES/{BSD-3-Clause,Linux-syscall-note,MIT}.txt -t "$pkgdir/usr/share/licenses/$pkgname/" @@ -120,20 +134,21 @@ package_libcamera() { ) } -package_libcamera-docs() { +package_libcamera-rpi-docs() { pkgdesc+=" - documentation" license=( CC-BY-4.0 CC-BY-SA-4.0 CC0-1.0 ) + conflicts=(libcamera-docs) mv -v $pkgname/* "$pkgdir" - mv -v "$pkgdir/usr/share/doc/$pkgbase-$pkgver/" "$pkgdir/usr/share/doc/$pkgbase/" + mv -v "$pkgdir/usr/share/doc/libcamera-0.2.0/" "$pkgdir/usr/share/doc/$pkgbase/" rm -frv "$pkgdir/usr/share/doc/$pkgbase/html/.buildinfo" } -package_libcamera-ipa() { +package_libcamera-rpi-ipa() { pkgdesc+=" - signed IPA" license=( BSD-2-Clause @@ -145,8 +160,9 @@ package_libcamera-ipa() { depends=( gcc-libs glibc - libcamera libcamera.so libcamera-base.so + libcamera-rpi libcamera.so libcamera-base.so ) + conflicts=(libcamera-ipa) # stripping requires re-signing of IPA libs, so we do it manually options=(!strip) @@ -158,7 +174,7 @@ package_libcamera-ipa() { install -vDm 644 $pkgbase/LICENSES/BSD-2-Clause.txt -t "$pkgdir/usr/share/licenses/$pkgname/" } -package_libcamera-tools() { +package_libcamera-rpi-tools() { pkgdesc+=" - tools" license=( BSD-2-Clause @@ -170,7 +186,7 @@ package_libcamera-tools() { gcc-libs glibc gtest - libcamera libcamera.so libcamera-base.so + libcamera-rpi libcamera.so libcamera-base.so libdrm libevent libevent-2.1.so libevent_pthreads-2.1.so libjpeg-turbo libjpeg.so @@ -179,14 +195,13 @@ package_libcamera-tools() { qt5-base sdl2 ) - conflicts=("$pkgbase-tests<0.0.1-2") - replaces=("$pkgbase-tests<0.0.1-2") + conflicts=("libcamera-tools") mv -v $pkgname/* "$pkgdir" install -vDm 644 $pkgbase/LICENSES/BSD-2-Clause.txt -t "$pkgdir/usr/share/licenses/$pkgname/" } -package_gst-plugin-libcamera() { +package_gst-plugin-libcamera-rpi() { pkgdesc="Multimedia graph framework - libcamera plugin" license=( CC0-1.0 @@ -198,8 +213,9 @@ package_gst-plugin-libcamera() { glib2 libg{lib,object}-2.0.so gstreamer gst-plugins-base-libs - libcamera libcamera.so libcamera-base.so + libcamera-rpi libcamera.so libcamera-base.so ) + conflicts=(gst-plugin-libcamera) mv -v $pkgname/* "$pkgdir" } diff --git a/libcamera-0.0.5-sphinx.patch b/libcamera-0.0.5-sphinx.patch deleted file mode 100644 index 4591f29..0000000 --- a/libcamera-0.0.5-sphinx.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Documentation/theme/layout.html b/Documentation/theme/layout.html -index fcc6d221..339aacd6 100644 ---- a/Documentation/theme/layout.html -+++ b/Documentation/theme/layout.html -@@ -35,7 +35,7 @@ SPDX-License-Identifier: CC-BY-SA-4.0 - - {# RTD hosts this file, so just load on non RTD builds #} - {% if not READTHEDOCS %} -- <link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" /> -+ <link rel="stylesheet" href="{{ pathto('_static/' + styles[-1], 1) }}" type="text/css" /> - {% endif %} - - {% for cssfile in css_files %} |