%global forgeurl https://github.com/dreamworksanimation %global cmodver 1.0.0.5 %global gitcommit d359fcfff3d2101e4d592400d0deba9e229d5d87 %global gitshort %(c=%{gitcommit}; echo ${c:0:7}) %global baseversion 5.36.0.0 Name: moonray_sdr_plugins Version: %{baseversion}%{?gitcommit:^git%{gitshort}} Release: %autorelease Summary: Support for using MoonRay shaders with Hydra License: Apache-2.0 URL: https://openmoonray.org/ Source0: %{forgeurl}/%{name}/archive/%{gitcommit}.tar.gz Source1: %{forgeurl}/cmake_modules/archive/refs/tags/cmake_modules-%{cmodver}.tar.gz Patch0: %{name}-usd-monolithic.patch Patch1: %{name}-env.patch BuildRequires: cmake >= 3.23.1 BuildRequires: gcc-c++ BuildRequires: boost-devel Requires: usd BuildRequires: usd-devel # Needed by USD BuildRequires: tbb-devel BuildRequires: cmake(Alembic) BuildRequires: hdf5-devel BuildRequires: draco-devel BuildRequires: openshadinglanguage BuildRequires: pkgconfig(oslexec) BuildRequires: cmake(OpenImageIO) BuildRequires: libX11-devel BuildRequires: libglvnd-devel BuildRequires: opensubdiv-devel BuildRequires: openvdb-devel BuildRequires: pkgconfig(ptex) BuildRequires: cmake(OpenColorIO) BuildRequires: embree-devel Provides: MoonraySdrPlugins = %{version} %description These plugins add descriptions of the moonray shader DSOs to the Pixar shader registry (Sdr), which is required to use them as shader nodes in USD/Hydra. %prep %autosetup -p1 -n %{name}-%{gitcommit} %setup -q -T -D -a 1 -n %{name}-%{gitcommit} mv cmake_modules-cmake_modules-%{cmodver} cmake_modules sed -i 's|plugin/usd|%{_libdir}/usd/plugin|g' \ {moonrayShaderDiscovery,moonrayShaderParser}/CMakeLists.txt sed -i '71s/$/\/resources/' \ {moonrayShaderDiscovery,moonrayShaderParser}/CMakeLists.txt sed -i 's|DESTINATION plugin|DESTINATION %{_libdir}/usd/plugin|g' \ {moonrayShaderDiscovery,moonrayShaderParser}/CMakeLists.txt %build ARRAS_SESSION_PATH=%{_libdir}/openmoonray/sessions \ %cmake \ -DCMAKE_MODULE_PATH=%{_builddir}/%{buildsubdir}/cmake_modules/cmake \ -DCMAKE_POLICY_DEFAULT_CMP0012=NEW %cmake_build %install %cmake_install %files %license LICENSE %{_libdir}/usd/plugin/moonrayShaderDiscovery %{_libdir}/usd/plugin/moonrayShaderParser %{_libdir}/usd/plugin/moonrayShaderDiscovery.so %{_libdir}/usd/plugin/moonrayShaderParser.so %changelog %autochangelog