%undefine __cmake_in_source_build %bcond conan 0 Name: luxcorerender Version: 2.10.1 Release: %autorelease Summary: Physically based unbiased rendering system License: Apache-2.0 URL: https://luxcorerender.org/ Source0: https://github.com/%{name}/LuxCore/archive/wheels-v%{version}%{?prerelease}/%{name}-%{version}.tar.gz Source1: https://github.com/%{name}/BlendLuxCore/archive/v%{version}%{?prerelease}/blendluxcore-%{version}.tar.gz Source3: org.%{name}.blendluxcore.metainfo.xml # Essential system integration patch #Patch3: LuxCore-system-bcd.patch ExclusiveArch: x86_64 BuildRequires: cmake BuildRequires: gcc-c++ %if %{with conan} BuildRequires: conan %endif BuildRequires: pybind11-devel BuildRequires: blender-rpm-macros # Upstream currently lacks compatibility with minizip-ng BuildRequires: pkgconfig(minizip) BuildRequires: pkgconfig(libzstd) # Core rendering dependencies BuildRequires: bcd-devel BuildRequires: boost-devel BuildRequires: embree-devel BuildRequires: OpenImageIO-iv BuildRequires: OpenImageIO-utils BuildRequires: openvdb-devel BuildRequires: oidn-devel BuildRequires: pkgconfig(blosc2) BuildRequires: pkgconfig(bzip2) BuildRequires: pkgconfig(liblzma) BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(tbb) BuildRequires: pkgconfig(glfw3) BuildRequires: pkgconfig(spdlog) BuildRequires: cmake(OpenColorIO) BuildRequires: cmake(OpenImageIO) < 3.0 BuildRequires: pkgconfig(python3) BuildRequires: pkgconfig(spdlog) BuildRequires: pkgconfig(tbb) BuildRequires: pkgconfig(yaml-cpp) BuildRequires: python3dist(pillow) %{!?_without_opencl: BuildRequires: pkgconfig(OpenCL) } Requires: %{name}-core = %{version}-%{release} Obsoletes: LuxRender < 2.0 Provides: LuxRender = 2.0 %description LuxCoreRender implements state-of-the-art light transport algorithms for photorealistic rendering. Features hybrid CPU/GPU acceleration, spectral rendering, and advanced material modeling. %package core Summary: Core runtime components Obsoletes: LuxRender-core < 2.0 %description core Contains the main rendering engine and essential libraries for scene processing and light simulation. %package -n blender-%{name} Summary: Blender 4.2+ integration plugin Requires: %{name}%{?_isa} = %{version}-%{release} %description -n blender-%{name} Blender extension for exporting scenes and materials to LuxCore Renderer. Supports Cycles material conversion and interactive rendering. %package devel Summary: Development headers and libraries Requires: %{name}-core%{?_isa} = %{version}-%{release} %description devel Header files and build configuration for developing LuxCore-based applications. %prep %autosetup -p1 -a1 -n LuxCore-wheels-v%{version} %generate_buildrequires #%%pyproject_buildrequires %build %cmake \ -DBUILD_SHARED_LIBS=ON \ -DCMAKE_CXX_STANDARD=20 \ -DLUXCOREDEPS_VERSION=0 \ -DPYLUXCORE_BINDINGS=ON \ -Dc-blosc_DIR=%{_libdir} \ -Dzstd_DIR=%{_libdir} %cmake_build %install pushd %{_vpath_builddir} mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_datadir}/%{name} mkdir -p %{buildroot}%{_libdir} mkdir -p %{buildroot}%{_includedir} install -Dpm 0755 bin/* %{buildroot}%{_bindir}/ install -Dpm 0755 lib/*.{a,so*} %{buildroot}%{_libdir}/ # Remove rpaths chrpath --delete %{buildroot}%{_bindir}/* chrpath --delete %{buildroot}%{_libdir}/*.so* # Install include files cp -pr generated/include/{luxcore,luxrays} %{buildroot}%{_includedir} #cfg.h popd cp -pr include/{luxcore,luxrays} %{buildroot}%{_includedir}/ rm %{buildroot}%{_includedir}/{luxcore,luxrays}/cfg.h.in # Relocate pyluxcore mkdir -p %{buildroot}%{python3_sitearch} mv %{buildroot}%{_libdir}/pyluxcore.so %{buildroot}%{python3_sitearch} # Import add-ons and preset mkdir -p %{buildroot}%{blender_extensions}/%{name} cp -a BlendLuxCore-blendluxcore_v%{version}/* %{buildroot}%{blender_extensions}/%{name} install -Dpm 644 %{SOURCE3} %{buildroot}%{_metainfodir}/org.%{name}.blendluxcore.metainfo.xml %check appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.xml %files %license LICENSE %doc README.md AUTHORS %files core %{_bindir}/luxcore* %{_libdir}/liblux*.so.* %files -n blender-%{name} %{_metainfodir}/org.%{name}.*.xml /%{blender_extensions}/%{name} %files devel %{_includedir}/{luxcore,luxrays} %{_libdir}/pkgconfig/*.pc %changelog %autochangelog