# [Fedora] Turn off the brp-python-bytecompile script
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%global hash0 a041e87b9732
%global hash1 08a5e276dcc5
%global hash2 6907bd2846bf
Name: LuxRender
Version: 1.0
Release: 11%{?dist}
Summary: Lux Renderer, an unbiased rendering system
Group: Applications/Multimedia
License: GPLv3+ and BSD
URL: http://www.luxrender.net
#Taken from http://src.luxrender.net/lux/archive/XXXXX.tar.bz2 AKA said release
Source0: http://src.luxrender.net/lux/archive/lux-%{hash0}.tar.bz2
Source1: http://src.luxrender.net/luxblend25/archive/luxblend25-%{hash1}.tar.bz2
Source2: http://src.luxrender.net/luxrays/file/luxrays-%{hash2}.tar.bz2
Source3: luxblend-default.cfg
Patch1: luxrays-1.0-ld.patch
Patch2: lux-1.0rc3-time_utc_fix.patch
#LuxRender use intensively SSE3
ExclusiveArch: %{ix86} x86_64 ia64
BuildRequires: desktop-file-utils
BuildRequires: doxygen
BuildRequires: cmake
BuildRequires: dos2unix
BuildRequires: bison
BuildRequires: boost-devel
BuildRequires: flex
BuildRequires: fltk-devel
BuildRequires: freeglut-devel
BuildRequires: freeimage-devel
BuildRequires: glew-devel
BuildRequires: qt-devel
BuildRequires: libpng-devel
BuildRequires: libjpeg-turbo-devel
BuildRequires: libtiff-devel
BuildRequires: OpenEXR-devel
BuildRequires: python-devel
BuildRequires: wxGTK-devel
BuildRequires: libXdamage-devel
BuildRequires: libXmu-devel
BuildRequires: blender-rpm-macros
Requires: %{name}-core = %{version}-%{release}
%description
LuxRender is a rendering system for physically correct image synthesis.
%package lib
Summary: Libraries for %{name}
Group: System Environment/Libraries
%description lib
The %{name}-lib package contains shared library for %{name}.
%package core
Summary: Core binaries for %{name}
Group: Applications/Multimedia
Requires: %{name}-lib%{?_isa} = %{version}-%{release}
%description core
The %{name}-core package contains core binaries for using %{name}.
%package blender
Summary: Blender export plugin to %{name}
Group: Applications/Multimedia
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: blender(ABI) = %{blender_api}
%description blender
The %{name}-blender package contains the plugin for Blender
to export into %{name}
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name}-lib%{?_isa} = %{version}-%{release}
Provides: %{name}-devel-docs = %{version}-%{release}
Obsoletes: %{name}-devel-docs < 0.7
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep
%setup -q -n lux-%{hash0}
%setup -q -D -T -a 1 -n lux-%{hash0}
%setup -q -D -T -a 2 -n lux-%{hash0}
#Disable tweaking
%if 0
sed -i -e 's/-O3//' CMakeLists.txt
%ifarch i686
sed -i -e 's/-msse2/-msse/' CMakeLists.txt
%endif
%ifnarch x86_64 ia64
sed -i -e 's/-msse2//' CMakeLists.txt
%endif
%ifnarch %{ix86} x86_64 ia64
sed -i -e 's/-mfpmath=sse//' CMakeLists.txt
%endif
%endif
#Patching luxrays
pushd luxrays-%{hash2}
%patch1 -p1 -b .ld
popd
%if 0%{fedora} > 17
%patch2 -p1 -b .time_utc_fix
%endif
#Fix eol encoding
find luxblend25-%{hash1}/src/luxrender -type f -exec dos2unix {} ';'
%build
#Building luxrays
mkdir -p luxrays-%{hash2}/build
pushd luxrays-%{hash2}/build
%cmake \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE \
-DCMAKE_SKIP_RPATH:BOOL=ON \
-DBoost_INCLUDE_DIR=%{_includedir} \
-DLUXRAYS_DISABLE_OPENCL:BOOL=ON \
-DCMAKE_CXX_FLAGS="$CXXFLAGS -DLUXRAYS_DISABLE_OPENCL=1" \
%if %{?_lib} == "lib64"
-DLIBDIR=%{_lib} \
%endif
..
make VERBOSE=1
#%{?_smp_mflags}
popd
#Building lux
mkdir -p build
pushd build
%cmake \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE \
-DCMAKE_SKIP_RPATH:BOOL=ON \
-DLUXRAYS_INCLUDE_DIRS=%{_builddir}/%{buildsubdir}/luxrays-%{hash2}/include \
-DLUXRAYS_LIBRARY=%{_builddir}/%{buildsubdir}/luxrays-%{hash2}/build/lib/libluxrays.a \
-DLUXRAYS_DISABLE_OPENCL:BOOL=ON \
-DCMAKE_CXX_FLAGS="$CXXFLAGS -DLUXRAYS_DISABLE_OPENCL=1" \
%if %{?_lib} == "lib64"
-DLIBDIR=%{_lib} \
%endif
..
make %{?_smp_mflags} VERBOSE=1
popd
%install
pushd build
make install DESTDIR=$RPM_BUILD_ROOT
popd
desktop-file-install --vendor "" --delete-original \
--dir $RPM_BUILD_ROOT%{_datadir}/applications \
--remove-category Application \
$RPM_BUILD_ROOT%{_datadir}/applications/luxrender.desktop
mkdir -p $RPM_BUILD_ROOT%{blender_libdir}/scripts/bpydata/config
mkdir -p $RPM_BUILD_ROOT%{blender_addons}
cp -pr luxblend25-%{hash1}/src/luxrender \
$RPM_BUILD_ROOT%{blender_addons}/
install -pm 0644 %{SOURCE3} \
$RPM_BUILD_ROOT%{blender_libdir}/scripts/bpydata/config/luxblend.cfg
%post lib -p /sbin/ldconfig
%postun lib -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc AUTHORS.txt COPYING.txt
%{_bindir}/luxrender
%{_datadir}/pixmaps/luxrender.svg
%{_datadir}/applications/luxrender.desktop
%files lib
%defattr(-,root,root,-)
%{_libdir}/*.so
%files core
%defattr(-,root,root,-)
%{_bindir}/luxconsole
%{_bindir}/luxmerger
%files blender
%defattr(-,root,root,-)
%{blender_addons}/luxrender/
%{blender_libdir}/scripts/bpydata/config/luxblend.cfg
%files devel
%defattr(-,root,root,-)
%{_includedir}/luxrender/
%changelog
* Thu May 16 2013 Jochen Schmitt <Jochen herr-schmitt de> - 1.0-11
- Rebuilt for blender-2.67
* Sun Mar 10 2013 Rex Dieter <rdieter@fedoraproject.org> - 1.0-10
- rebuild (OpenEXR)
* Sun Feb 24 2013 Jochen Schmitt <Jochen herr-schmitt de> - 1.0-9
- Rebuilt for blender-2.66
* Sat Feb 23 2013 Kevin Fenzi <kevin@scrye.com> - 1.0-8
- Rebuild for broken deps in rawhide
* Sun Feb 10 2013 Denis Arnaud <denis.arnaud_fedora@m4x.org> - 1.0-7
- Rebuild for Boost-1.53.0
* Sat Feb 09 2013 Denis Arnaud <denis.arnaud_fedora@m4x.org> - 1.0-6
- Rebuild for Boost-1.53.0
* Tue Dec 11 2012 Jochen Schmitt <Jochen herr-schmitt de> - 1.0-5
- Built for new blender release 2.65
- Remove unused patches
- Activate lib subpackage
- Set Req from LuxRender-core to LuxRender-lib
* Sun Oct 07 2012 Nicolas Chauvet <kwizart@gmail.com> - 1.0-4
- Only distribute headers in -devel
* Fri Oct 05 2012 Nicolas Chauvet <kwizart@gmail.com> - 1.0-3
- Condition is made to build with earlier boost
* Wed Oct 03 2012 Nicolas Chauvet <kwizart@gmail.com> - 1.0-1
- Update to 1.0 final
- Use ExclusiveArch as the package still heavily rely on SSE.
* Sat Aug 18 2012 Tom Callaway <spot@fedoraproject.org> - 1.0-0.3.rc3
- update to 1.0-rc3
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-0.2_rc1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Thu Apr 26 2012 Nicolas Chauvet <kwizart@gmail.com> - 1.0-0.1_rc1
- Update to 1.0-rc1
* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.0-13
- Rebuilt for c++ ABI breakage
* Sat Feb 18 2012 Jochen Schmitt <Jochen herr-schmitt de> - 0.8.0-12
- Rebuild due a BR overrides issues
* Thu Feb 16 2012 Jochen Schmitt <Jochen herr-schmitt de> - 0.8.0-11
- Rebuilt for blender-2.62
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.0-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Wed Dec 14 2011 Jochen Schmitt <Jochen herr-schmitt de> - 0.8.0-9
- Rebuilt for blender-2.61
* Wed Nov 23 2011 Jochen Schmitt <Jochen herr-schmitt de> - 0.8.0-8
- More relax BR for blender-rpm-macros
* Wed Nov 23 2011 Jochen Schmitt <Jochen herr-schmitt de> - 0.8.0-7
- Rebuilt to fix boost API change
- Change user of blender-rpm macros
* Tue Nov 22 2011 Peter Robinson <pbrobinson@fedoraproject.org> -0.8.0-6
- Rebuild for boost 1.48
* Mon Nov 21 2011 Jochen Schmitt <Jochen herr-schmitt de> - 0.8.0-5
- Fix issue with missing blender addon (#754945)
* Sun Nov 20 2011 Nicolas Chauvet <kwizart@gmail.com> - 0.8.0-4
- Rebuilt for boost 1.48
* Sun Nov 20 2011 Thomas <thomas.spura@googlemail.com> - 0.8.0-3
- rebuild for https://fedoraproject.org/wiki/Features/F17Boost148
* Sun Aug 14 2011 Nicolas Chauvet <kwizart@gmail.com> - 0.8.0-2
- Rebuild for boost
* Mon Aug 08 2011 Nicolas Chauvet <kwizart@gmail.com> - 0.8.0-1
- Update to 0.8.0
- Add blend25 plugin to work with blender25
* Wed Aug 03 2011 Tom Callaway <spot@fedoraproject.org> - 0.7.1-7
- rebuilt
* Sat Apr 09 2011 Nicolas Chauvet <kwizart@gmail.com> - 0.7.1-6
- rebuilt
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Mon Feb 07 2011 Nicolas Chauvet <kwizart@gmail.com> - 0.7.1-4
- Force boost::filesystem2 on newer boost
* Sun Feb 06 2011 Thomas Spura <tomspur@fedoraproject.org> - 0.7.1-3
- rebuild for new boost
* Tue Nov 30 2010 Nicolas Chauvet <kwizart@gmail.com> - 0.7.1-2
- We cannot assume sse2 exept on x86_64 and ia64 - rhbz#657446
* Sun Nov 07 2010 Nicolas Chauvet <kwizart@gmail.com> - 0.7.1-1
- Update to 0.7.1
* Sun Aug 22 2010 Nicolas Chauvet <kwizart@gmail.com> - 0.7-1
- Update to 0.7
- Obsoletes LuxRender-devel-docs
* Wed Aug 04 2010 Rahul Sundaram <sundaram@fedoraproject.org> - 0.6.1-4
- Rebuild for Boost soname bump
- Updated spec to match current guidelines
* Mon Jul 12 2010 Dan HorĂ¡k <dan@danny.cz> - 0.6.1-3
- rebuilt against wxGTK-2.8.11-2
* Sun Feb 14 2010 Nicolas Chauvet <kwizart@fedoraproject.org> - 0.6.1-2
- Update to 0.6.1
- Built using SSE2 by default (required for now).
* Fri Jan 22 2010 Rahul Sundaram <sundaram@fedoraproject.org> - 0.5-6
- Rebuild for Boost soname bump
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Wed May 13 2009 kwizart < kwizart at gmail.com > - 0.5-4
- Move %%doc from -lib to main
- Remove Requires main from -devel-docs
- Disable wrong-end-of-line-encoding for LuxBlend_0.1.py
- Add Requires: blender >= 2.48a-22 so the script will copy
the default settings in the end-user directory.
* Tue Mar 17 2009 kwizart < kwizart at gmail.com > - 0.5-3
- Add luxblend-default.cfg
* Tue Jan 20 2009 kwizart < kwizart at gmail.com > - 0.5-2
- Fix compilation with boost 1.34 - (backport)
- Subpackage the Blender_Exporter plugin
- Subpackage -devel-docs for doxygen docs.
* Wed Jul 23 2008 kwizart < kwizart at gmail.com > - 0.5-1
- Update to 0.5
* Mon Dec 17 2007 Romang Jean-Francois <jeanfrancois.romang@laposte.net> 0.1-rc4
-Initial version