%define _disable_ld_no_undefined 1 %global major 0.3 # The naming scheme in non-Mandriva-based distros %if 0%{!?mklibname:1} %define mklibname(ds) lib%{1}%{?2:%{2}}%{-s:-static}%{-d:-devel} %endif %undefine mkrel %if 0%{!?mkrel:1} %define mkrel(c) %{1}%{?dist} %endif %define libname %mklibname camera %{major} %define devname %mklibname camera -d Name: libcamera Version: %{major}.2 Release: %mkrel 1.1 Summary: A library to support complex camera ISPs Group: System/Servers # Library is LGPLv2.1+ and the cam tool is GPLv2 License: LGPLv2+ and GPLv2 URL: https://libcamera.org/ %define bcond_without pycamera # Upstream is still under development and does not release tarballs, # but they do tag releases (https://git.libcamera.org/libcamera/libcamera.git) # # For use the following to do generate a tarball from a git tag: # # git config tar.tar.xz.command 'xz -c' # git archive --format=tar.xz --prefix=libcamera-%%{version}/ -o libcamera-%%{version}.tar.xz v%%{version} Source0: https://github.com/libcamera-org/libcamera/archive/refs/tags/v%{version}/%{name}-%{version}.tar.gz Source1: qcam.desktop Source2: qcam.metainfo.xml BuildRequires: doxygen BuildRequires: graphviz BuildRequires: (texlive-latex-extra or texlive-collection-basic) BuildRequires: (gcc-c++ or clang++) BuildRequires: (pkg-config or pkgconfig) BuildRequires: pkgconfig(gtest) BuildRequires: desktop-file-utils BuildRequires: meson >= 0.63.0 BuildRequires: openssl BuildRequires: (ninja or ninja-build) BuildRequires: pkgconfig(python3) BuildRequires: python3dist(jinja2) BuildRequires: python3dist(ply) BuildRequires: python3dist(pyyaml) BuildRequires: python3dist(sphinx) BuildRequires: (boost-devel or cmake(Boost)) BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(gnutls) >= 2.8 %if 0%{!?suse_version} BuildRequires: (libatomic-devel or libatomic) %endif BuildRequires: pkgconfig(libevent) BuildRequires: (libtiff-devel or tiff-devel or pkgconfig(libtiff-4)) BuildRequires: (libyaml-devel or yaml-devel or pkgconfig(yaml-0.1)) BuildRequires: pkgconfig(lttng-ust) BuildRequires: pkgconfig(libsystemd) BuildRequires: pkgconfig(gstreamer-video-1.0) BuildRequires: pkgconfig(gstreamer-allocators-1.0) BuildRequires: pkgconfig(sdl2) BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(libdrm) BuildRequires: pkgconfig(libjpeg) %if %{with pycamera} BuildRequires: (pybind11-devel or cmake(pybind11)) BuildRequires: (python3dist(pybind11) or python3-pybind11) %endif BuildRequires: (abi-compliance-checker or perl(In)) %if "%{version}" >= "0.3" BuildRequires: pkgconfig(Qt6Core) BuildRequires: pkgconfig(Qt6Gui) BuildRequires: pkgconfig(Qt6OpenGL) BuildRequires: pkgconfig(Qt6OpenGLWidgets) BuildRequires: pkgconfig(Qt6Widgets) BuildRequires: (qttools6 or mimehandler(application/x-linguist)) %else BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5Gui) BuildRequires: pkgconfig(Qt5Widgets) BuildRequires: (qttools5 or mimehandler(application/x-linguist)) %endif %description libcamera is a library that deals with heavy hardware image processing operations of complex camera devices that are shared between the linux host all while allowing offload of certain aspects to the control of complex camera hardware such as ISPs. Hardware support includes USB UVC cameras, libv4l cameras as well as more complex ISPs (Image Signal Processor). %package -n %libname Summary: Library package for %{name} Obsoletes: %{mklibname camera 0} < 0.0.2-2 %description -n %libname Library for %{name}. %package -n %devname Summary: Development package for %{name} Requires: %{libname}%{?_isa} = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} Provides: camera-devel = %{version}-%{release} %description -n %devname Files for development with %{name}. %package doc Summary: Documentation for %{name} BuildArch: noarch %description doc HTML based documentation for %{name} including getting started and API. %package ipa Summary: ISP Image Processing Algorithm Plugins for %{name} Requires: %{libname}%{?_isa} = %{version}-%{release} %description ipa Image Processing Algorithms plugins for interfacing with device ISPs for %{name}. %package tools Summary: Tools for %{name} Requires: %{libname}%{?_isa} = %{version}-%{release} %description tools Command line tools for %{name}. %package qcam Summary: Graphical QCam application for %{name} Requires: %{libname}%{?_isa} = %{version}-%{release} %description qcam Graphical QCam application for %{name}. %package -n gstreamer1.0-libcamera Summary: GSTreamer plugin for %{name} Requires: %{libname}%{?_isa} = %{version}-%{release} Obsoletes: libcamera-gstreamer < 0.0.2 %description -n gstreamer1.0-libcamera GSTreamer plugins for %{name}. %prep %autosetup -p1 -n %{name}-%{version} %build export CFLAGS="%{optflags} -Wno-deprecated-declarations" export CXXFLAGS="%{optflags} -Wno-deprecated-declarations" %meson %{!?with_pycamera:-D pycamera=disabled} %meson_build %install %meson_install # Install Desktop Entry file desktop-file-install --dir=%{buildroot}%{_datadir}/applications %SOURCE1 # Install AppStream metainfo file mkdir -p %{buildroot}/%{_metainfodir}/ cp -a %SOURCE2 %{buildroot}/%{_metainfodir}/ # Remove the Sphinx build leftovers rm -rf %{buildroot}%{_docdir}/%{name}-*/html/.buildinfo rm -rf %{buildroot}%{_docdir}/%{name}-*/html/.doctrees %files -n %libname %license COPYING.rst LICENSES/LGPL-2.1-or-later.txt %{_libdir}/libcamera*.so.%{major}{,.*} %files -n %devname %{_includedir}/%{name}/ %{_libdir}/libcamera*.so %{_libdir}/pkgconfig/libcamera-base.pc %{_libdir}/pkgconfig/libcamera.pc %files doc %doc %{_docdir}/%{name}-*/ %files ipa %{_datadir}/libcamera/ %{_libdir}/libcamera/ %{_libexecdir}/libcamera/ %files -n gstreamer1.0-libcamera %{_libdir}/gstreamer-1.0/libgstlibcamera.so %files qcam %{_bindir}/qcam %{_datadir}/applications/qcam.desktop %{_metainfodir}/qcam.metainfo.xml %files tools %license LICENSES/GPL-2.0-only.txt %{_bindir}/cam %{_bindir}/lc-compliance %changelog * Sat Mar 30 2024 ghibo 0.2.0-1.mga9 + Revision: 2053274 - Update to version 0.2.0 (required for newer pipewire) * Thu Dec 22 2022 tv 0.0.3-1.mga9 + Revision: 1925913 - Update to version 0.0.3 * Mon Dec 12 2022 ns80 0.0.2-3.mga9 + Revision: 1921078 - rebuild for new libtiff * Mon Dec 05 2022 wally 0.0.2-2.mga9 + Revision: 1918080 - fix lib pkg major and name * Mon Dec 05 2022 wally 0.0.2-1.mga9 + Revision: 1918060 - new version 0.0.2 - rename gstreamer plugin as gstreamer1.0-libcamera * Thu Sep 01 2022 tv 0.0.0~git.20220831.68683d3-1.mga9 + Revision: 1883302 - Update to snapshot 68683d3 * Wed Jun 29 2022 tv 0.0.0~git.20220127.bb84fc6-1.mga9 + Revision: 1866550 - Update to snapshot bb84fc6 * Mon Apr 04 2022 umeabot 0.0.0~git.20220126.7ea52d2-2.mga9 + Revision: 1842948 - Mageia 9 Mass Rebuild * Fri Feb 04 2022 tv 0.0.0~git.20220126.7ea52d2-1.mga9 + Revision: 1771395 - Update to snapshot 7ea52d2 * Thu Dec 30 2021 wally 0.0.0~git.20210928.e00149f-3.mga9 + Revision: 1765381 - rebuild for gtest 1.11.0 - add lib major check to %%files section * Tue Dec 21 2021 tv 0.0.0~git.20210928.e00149f-2.mga9 + Revision: 1763099 + rebuild (emptylog) * Tue Dec 21 2021 tv 0.0.0~git.20210928.e00149f-1.mga9 + Revision: 1763097 - imported package libcamera * Tue Dec 21 2021 Thierry Vignaud 0.0.0~git.20210928.e00149f-1.mga9 - Initial package