File libpisp.spec of Package libpisp
#
# spec file for package libcamera
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define libpisp_name libpisp1
Name: libpisp
Version: 1.3.0
Release: 0
Summary: A complex camera support library in C++
License: CC-BY-SA-4.0 AND GPL-2.0-or-later AND LGPL-2.1-or-later
Group: Development/Libraries/C and C++
URL: https://github.com/raspberrypi/libpisp
Source: libpisp-%version.tar.xz
Source1: json-3.11.2.tar.xz
BuildRequires: boost-devel
BuildRequires: c++_compiler
%if 0%{?suse_version} <= 1500
BuildRequires: gcc11
BuildRequires: gcc11-c++
%endif
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: git
BuildRequires: libyuv-devel
BuildRequires: meson >= 0.56
BuildRequires: pkgconfig
BuildRequires: python3-Jinja2
BuildRequires: python3-PyYAML
BuildRequires: python3-ply
BuildRequires: xz
BuildRequires: pkgconfig(Qt6Core)
BuildRequires: pkgconfig(Qt6Gui)
BuildRequires: pkgconfig(Qt6OpenGL)
BuildRequires: pkgconfig(Qt6OpenGLWidgets)
BuildRequires: pkgconfig(Qt6Widgets)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gnutls)
BuildRequires: pkgconfig(gstreamer-video-1.0)
BuildRequires: pkgconfig(gtest)
BuildRequires: pkgconfig(libevent_pthreads)
BuildRequires: pkgconfig(libtiff-4)
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(pybind11)
BuildRequires: pkgconfig(python3)
BuildRequires: pkgconfig(sdl2)
BuildRequires: pkgconfig(yaml-0.1)
%description
A helper library to generate run-time configuration for the
Raspberry Pi ISP (PiSP), consisting of the Frontend and Backend
hardware components.
%package -n %libpisp_name
Summary: A complex RPI HW support library in C++
Group: System/Libraries
%description -n %libpisp_name
libpisp is an experimental camera user-space API.
%package devel
Summary: Development for libpisp, a camera support library
Group: Development/Libraries/C and C++
Requires: %libpisp_name = %version
%description devel
A helper library to generate run-time configuration for the
Raspberry Pi ISP (PiSP), consisting of the Frontend and Backend
hardware components.
This subpackage contains the header files.
%prep
%autosetup -N -n %name-%version
cd subprojects
rm -rf nlohmann_json.wrap
tar -xvf %{SOURCE1}
mv json-3.11.2 nlohmann_json
cd ../../
%build
%if 0%{?suse_version} <= 1500
export CC=gcc-11
export CXX=g++-11
%endif
%meson \
-Dlogging=disabled \
-Dwerror=false
%meson_build
%install
%meson_install
%ldconfig_scriptlets -n %libpisp_name
%files
%_datadir/libpisp/
%files -n %libpisp_name
%_libdir/libpisp.so.*
%files devel
%license LICENSES/*GPL*
%_includedir/libpisp/
%_libdir/pkgconfig/libpisp.pc
%_libdir/libpisp.so
%changelog