Blob Blame History Raw
Name:		embree
Version:	2.13.0
Release:	1%{?dist}
Summary:	Collection of high-performance ray tracing kernels developed at Intel
License:	ASL 2.0
URL:		https://embree.github.io
Source0:	https://github.com/%{name}/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz

BuildRequires:	gcc-c++
BuildRequires:	cmake
BuildRequires:	make
BuildRequires:	ispc
BuildRequires:	freeglut-devel
BuildRequires:	ImageMagick-c++-devel
BuildRequires:	libXmu-devel,libXi-devel
BuildRequires:	tbb-devel
# Use 64bit architectures because of SSE2 and up
ExclusiveArch:	x86_64

%description
A collection of high-performance ray tracing kernels intended to graphics 
application engineers that want to improve the performance of their application.

%package	devel
Summary:	Development files for %{name}
Requires:	%{name}%{?_isa} = %{version}-%{release}

%description	devel
The %{name}-devel package contains libraries and header files for
 applications that use %{name}.

%package	examples
Summary:	Example of application using %{name}
Requires:	%{name}%{?_isa} = %{version}-%{release}

%description	examples
The %{name}-examples package contains sample binaries using %{name}.

%prep
%autosetup

mkdir %{_target_platform}
#sed -r -i.bak 's/#include <math.h>/#include <cmath>/' common/math/constants.h
#sed -r -i.bak '/__forceinline float (abs|floor|ceil)/d' common/math/math.h

%build
pushd %{_target_platform} 
   CXXFLAGS='%{optflags} -Wno-all' %cmake ..
popd
%make_build -C %{_target_platform}

%install
%make_install -C %{_target_platform}
# Related binary examples
mkdir -p %{buildroot}%{_libexecdir}/%{name}
mv %{buildroot}%{_bindir}/%{name}2/* %{buildroot}%{_libexecdir}/%{name}/

# Relocate doc files
mv %{buildroot}%{_docdir}/%{name}2 %{buildroot}%{_docdir}/%{name}
rm %{buildroot}%{_docdir}/%{name}/LICENSE.txt

%check
ctest -V %{?_smp_mflags}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files
%license LICENSE.txt
%doc README.md CHANGELOG.md readme.pdf
%{_libdir}/lib%{name}.so.2
%{_libdir}/lib%{name}.so.2.*

%files devel
%{_libdir}/lib%{name}.so
%{_includedir}/%{name}2/
%{_libdir}/cmake/%{name}-%{version}/

%files examples
%{_libexecdir}/%{name}/


%changelog
* Tue Nov 22 2016 Luya Tshimbalanga <luya@fedoraproject.org> - 2.13.0-1
- Upstream update

* Tue Oct 18 2016 Luya Tshimbalanga <luya@fedoraproject.org> 2.12.0-1
- Upstream update addressing larger memory consumption

* Sat Sep 24 2016 Luya Tshimbalanga <luya@fedoraproject.org> 2.11.0-1
- Latest upstream update

* Thu Sep 22 2016 Jerry James <loganjerry@gmail.com> 2.10.0-8
- Rebuild for tbb 2017

* Thu Aug 25 2016 Luya Tshimbalanga <luya@fedoraproject.org> 2.10.0-7
- Used ExclusiveArch for 64bit Architecture

* Sun Aug 21 2016 Luya Tshimbalanga <luya@fedoraproject.org> 2.10.0-6
- Located flags before cmake
- Used libexecdir for subpackages examples
- Pleased rpmlint
- Added examples subpackages

* Sat Aug 20 2016 Luya Tshimbalanga <luya@fedoraproject.org> 2.10.0-5
- Silenced all warning message in build
- Added %%check line
- Added examples subpackages

* Sat Aug 20 2016 Luya Tshimbalanga <luya@fedoraproject.org> 2.10.0-4
- Added ispc dependency
- Removed ExclusiveArch
- Enabled ispc and tutorials

* Fri Aug 12 2016 Luya Tshimbalanga <luya_tfz@thefinalzone.net> 2.10.0-3
- Use ExclusiveArch tag for 64 bits architectures
- Adjust the lines of descriptions
- Fix bin path
- Add freeglut dependency from upstream

* Sat Aug 6 2016 Luya Tshimbalanga <luya_tfz@thefinalzone.net> 2.10.0-2
- Fixed mixed use space and tabs errors
- Shorten the line of description
- Exclude i686 architecture

* Thu Aug 4 2016 Luya Tshimbalanga <luya_tfz@thefinalzone.net> 2.10.0-1
- Initial build