%global forgeurl https://github.com/dreamworksanimation %global cmodver 1.0.0.5 %bcond tests 1 Name: scene_rdl2 Version: 14.22.0.0 Release: %{autorelease} Summary: MoonRay’s scene representation License: Apache-2.0 URL: https://openmoonray.org/ Source0: %{forgeurl}/%{name}/archive/refs/tags/%{name}-%{version}.tar.gz Source1: %{forgeurl}/cmake_modules/archive/refs/tags/cmake_modules-%{cmodver}.tar.gz Patch0: %{name}-includes.patch Patch1: %{name}-tbb.patch BuildRequires: cmake >= 3.23.1 BuildRequires: gcc-c++ BuildRequires: ispc BuildRequires: boost-devel BuildRequires: lua-devel BuildRequires: pkgconfig(cppunit) BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(jsoncpp) BuildRequires: pkgconfig(log4cplus) BuildRequires: tbb-devel Provides: SceneRdl2 = %{version} %description MoonRay’s scene representation and a number of utility libraries. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} Requires: boost-devel Requires: lua-devel Requires: pkgconfig(cppunit) Requires: pkgconfig(openssl) Requires: pkgconfig(jsoncpp) Requires: pkgconfig(log4cplus) Requires: tbb-devel %description devel The %{name}-devel package contains libraries and header files of %{name}, required to build other parts of OpenMoonRay. %package -n python3-%{name} Summary: Python 3 interface to %{name} %{?python_provide:%python_provide python3-%{name}} Requires: %{name}%{?_isa} = %{version}-%{release} BuildRequires: pkgconfig(python3) Requires: python3 %description -n python3-%{name} The python3-%{name} contains Python 3 API for the library. %prep %autosetup -p1 -n %{name}-%{name}-%{version} mkdir -p cmake_modules tar -xzf %{SOURCE1} --strip-components=1 -C $_ sed -i '1s|.*|#!/usr/bin/python3|' \ mod/python/studio/app/breakpad/breakpadProcess sed -i '1s|.*|#!/usr/bin/python3|' \ cmd/rdl2_cmd/rdl2_migrate/rdl2_migrate # Restructure sed -i 's|\bcoredata\b|%{_libdir}/openmoonray/coredata|g' \ {bart_tools/scene_rdl2_utils.py,lib/scene/rdl2/CMakeLists.txt} sed -i 's|python/lib/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/${PACKAGE_NAME}|%{python3_sitearch}/${PACKAGE_NAME}|g' \ mod/python/py_scene_rdl2/CMakeLists.txt sed -i 's|"."|"%{_libdir}/openmoonray/rdl2dso"|g' \ lib/scene/rdl2/DsoFinder.cc %build CMAKE_MODULES_ROOT=%{_builddir}/%{buildsubdir}/cmake_modules \ ARRAS_SESSION_PATH=%{_libdir}/openmoonray/sessions \ %cmake \ -DCMAKE_MODULE_PATH=${CMAKE_MODULES_ROOT}/cmake \ -DBUILD_TESTING=%{expr:%{with tests}?"ON":"OFF"} %cmake_build %install %cmake_install %files %license LICENSE %{_bindir}/rdl2_{convert,json_exporter,localize,migrate,print,compare} %{_bindir}/shm{FootmarkDump,FbDump,FbTool} %{_bindir}/{breakpadProcess,rdla_filter,snapshotDeltaDump,threadPoolExecutorTest} %{_libdir}/libcommon_{fb_util,grid_util,math,platform,rec_time}.so %{_libdir}/lib{fb_util,math}_ispc.so %{_libdir}/lib{pdevunit,%{name}}.so %{_libdir}/librender_{cache,logging,util}.so %{_libdir}/openmoonray/coredata %files devel %{_includedir}/%{name} %{_libdir}/cmake/SceneRdl2-%(echo %{version} | sed 's/\(.*\)\.[0-9]*$/\1/').0 %files -n python3-%{name} %{python3_sitearch}/%{name} %changelog %autochangelog