a9edde1
%global		with_prerelease 0
41db31b
%global		with_snapshot	1
41db31b
%global		prerelease	beta
41db31b
%global		commit		40b9aca2668f443cae6bfbfa7cc5a354f1087011
41db31b
%global		shortcommit	%(c=%{commit}; echo ${c:0:7})
41db31b
1709f7b
Name:		embree
2ad54ea
Version:	3.0.0
2ad54ea
%if %{with_prerelease}
a9edde1
Release:	0.1.%{prerelease}%{?dist}
41db31b
%else %if %{with_snapshot}
41db31b
Release:	1.%{shortcommit}git%{?dist}
2ad54ea
%else
a9edde1
Release:	1%{?dist}
2ad54ea
%endif
1709f7b
Summary:	Collection of high-performance ray tracing kernels developed at Intel
41db31b
1709f7b
License:	ASL 2.0
1709f7b
URL:		https://embree.github.io
2ad54ea
%if %{with_prerelease}
2ad54ea
Source:		https://github.com/%{name}/%{name}/archive/v%{version}-%{prerelease}.0.tar.gz#/%{name}-%{version}-%{prerelease}.0.tar.gz
41db31b
%else %if %{with_snapshot}
41db31b
Source:		https://github.com/%{name}/%{name}/archive/%{commit}/%{name}-%{commit}.tar.gz#/%{name}-%{version}-%{shortcommit}.tar.gz
2ad54ea
%else
bfefe57
Source:		https://github.com/%{name}/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
2ad54ea
%endif
1709f7b
1709f7b
BuildRequires:	gcc-c++
1709f7b
BuildRequires:	cmake
1709f7b
BuildRequires:	make
1709f7b
BuildRequires:	ispc
1709f7b
BuildRequires:	freeglut-devel
1709f7b
BuildRequires:	ImageMagick-c++-devel
1709f7b
BuildRequires:	libXmu-devel,libXi-devel
1709f7b
BuildRequires:	tbb-devel
83b29df
c1e0772
# Use 64bit architectures because of SSE2 and up
c1e0772
ExclusiveArch:	x86_64
1709f7b
1709f7b
%description
1709f7b
A collection of high-performance ray tracing kernels intended to graphics 
1709f7b
application engineers that want to improve the performance of their application.
1709f7b
1709f7b
%package	devel
1709f7b
Summary:	Development files for %{name}
1709f7b
Requires:	%{name}%{?_isa} = %{version}-%{release}
1709f7b
1709f7b
%description	devel
1709f7b
The %{name}-devel package contains libraries and header files for
1709f7b
 applications that use %{name}.
1709f7b
1709f7b
%package	examples
1709f7b
Summary:	Example of application using %{name}
1709f7b
Requires:	%{name}%{?_isa} = %{version}-%{release}
1709f7b
1709f7b
%description	examples
1709f7b
The %{name}-examples package contains sample binaries using %{name}.
1709f7b
1709f7b
%prep
2ad54ea
%if %{with_prerelease}
2ad54ea
%autosetup -n %{name}-%{version}-%{prerelease}.0
41db31b
%else %if %{with_prerelease}
41db31b
%autosetup -n %{name}-%{commit}
2ad54ea
%else
a3fffa3
%autosetup -n %{name}-%{version}
2ad54ea
%endif
2ad54ea
1709f7b
1709f7b
mkdir %{_target_platform}
1709f7b
1709f7b
%build
1709f7b
pushd %{_target_platform} 
41db31b
export CXXFLAGS="%{optflags} -Wl,--as-needed"
41db31b
  %cmake \
41db31b
	-DEMBREE_IGNORE_CMAKE_CXX_FLAGS=OFF \
41db31b
        ..
1709f7b
popd
1709f7b
%make_build -C %{_target_platform}
1709f7b
1709f7b
%install
1709f7b
%make_install -C %{_target_platform}
1709f7b
# Related binary examples
1709f7b
mkdir -p %{buildroot}%{_libexecdir}/%{name}
1c3dfd5
mv %{buildroot}%{_bindir}/%{name}3/* %{buildroot}%{_libexecdir}/%{name}/
1709f7b
1709f7b
# Relocate doc files
1c3dfd5
mv %{buildroot}%{_docdir}/%{name}3 %{buildroot}%{_docdir}/%{name}
1709f7b
rm %{buildroot}%{_docdir}/%{name}/LICENSE.txt
1709f7b
1709f7b
%check
1709f7b
ctest -V %{?_smp_mflags}
1709f7b
1709f7b
%post -p /sbin/ldconfig
1709f7b
1709f7b
%postun -p /sbin/ldconfig
1709f7b
1709f7b
1709f7b
%files
1709f7b
%license LICENSE.txt
1709f7b
%doc README.md CHANGELOG.md readme.pdf
19f15b4
%{_libdir}/lib%{name}3.so.3
19f15b4
%{_libdir}/lib%{name}3.so.3.*
905e1c7
%{_mandir}/man3/*
1709f7b
1709f7b
%files devel
19f15b4
%{_libdir}/lib%{name}3.so
1c3dfd5
%{_includedir}/%{name}3/
1709f7b
%{_libdir}/cmake/%{name}-%{version}/
1709f7b
1709f7b
%files examples
1709f7b
%{_libexecdir}/%{name}/
1709f7b
1709f7b
1709f7b
%changelog
41db31b
* Mon Mar 19 2018 Luya Tshimbalanga <luya@fedoraproject.org> - 3.0.0-1.40b9acagit
41db31b
- Upstream snapshot compile fix for gcc 8
41db31b
- Optimize spec file
41db31b
a9edde1
* Fri Mar 02 2018 Luya Tshimbalanga <luya@fedoraproject.org> - 3.0.0-1
a9edde1
- Update to 3.0.0
a9edde1
3b5de45
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-0.2.beta
3b5de45
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
3b5de45
2ad54ea
* Mon Jan 22 2018 Luya Tshimbalanga  <luya@fedoraproject.org> - 3.0.0-0.1.beta
2ad54ea
- Update to 3.0.0-beta.0
905e1c7
- Add manual directory
2ad54ea
14a6589
* Wed Jan 17 2018 Fedora Release Monitoring  <release-monitoring@fedoraproject.org> - 2.17.2-1
14a6589
- Update to 2.17.2 (#1512896)
14a6589
e918cb4
* Wed Oct 25 2017 Luya Tshimbalanga <luya@fedoraproject.org> - 2.17.0-2
e918cb4
- Rebase to more current snapshot for LLVM 5.0 support
e918cb4
807cd4d
* Thu Sep 21 2017 Fedora Release Monitoring  <release-monitoring@fedoraproject.org> - 2.17.0-1
807cd4d
- Update to 2.17.0 (#1494058)
807cd4d
d112d84
* Tue Aug 15 2017 Fedora Release Monitoring  <release-monitoring@fedoraproject.org> - 2.16.5-1
d112d84
- Update to 2.16.5 (#1481678)
d112d84
6fc7e27
* Sun Aug 06 2017 Björn Esser <besser82@fedoraproject.org> - 2.16.4-4
6fc7e27
- Rebuilt for AutoReq cmake-filesystem
6fc7e27
11a8068
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.16.4-3
11a8068
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
11a8068
1cc53c9
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.16.4-2
1cc53c9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
1cc53c9
b23799b
* Fri Jun 30 2017 Fedora Release Monitoring  <release-monitoring@fedoraproject.org> - 2.16.4-1
b23799b
- Update to 2.16.4 (#1466767)
b23799b
b23799b
* Thu Jun 15 2017 Fedora Release Monitoring  <release-monitoring@fedoraproject.org> - 2.16.2-1
b23799b
- Update to 2.16.2 (#1459537)
b23799b
1e61b94
* Wed May 17 2017 Luya Tshimbalanga <luya@fedoraproject.org> - 2.16.0-1
1e61b94
- New upstream release
1e61b94
e5f5708
* Tue Mar 28 2017 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.15.0-2
e5f5708
- Honor Fedora compilation flags again (rhbz#1436075)
e5f5708
a3fffa3
* Wed Mar 22 2017 Luya Tshimbalanga <luya@fedoraproject.org> - 2.15.0-1
a3fffa3
- New upstream release
a3fffa3
00c1d36
* Thu Mar 16 2017 Luya Tshimbalanga <luya@fedoraproject.org> - 2.14.0-3
00c1d36
- Rebuild for ispc
00c1d36
9033471
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.14.0-2
9033471
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
9033471
83b29df
* Thu Feb 09 2017 Luya Tshimbalanga <luya@fedoraproject.org> - 2.14.0-1
83b29df
- New upstream release
83b29df
- Drop patch as the fix is included upstream
83b29df
bfefe57
* Thu Jan 19 2017 Luya Tshimbalanga <luya@fedoraproject.org> - 2.13.0-3
bfefe57
- Patch fixing initialization code of the rayStreamFilters sent by upstream (rhbz#1414611)
bfefe57
99b4874
* Thu Jan 19 2017 Luya Tshimbalanga <luya@fedoraproject.org> - 2.13.0-2
bfefe57
- Workaround lowering max_ISA to avx on non-Intel CPU (rhbz#1414611)
99b4874
52ad86a
* Tue Nov 22 2016 Luya Tshimbalanga <luya@fedoraproject.org> - 2.13.0-1
52ad86a
- Upstream update
52ad86a
0d99f36
* Tue Oct 18 2016 Luya Tshimbalanga <luya@fedoraproject.org> 2.12.0-1
0d99f36
- Upstream update addressing larger memory consumption
0d99f36
8e21eaa
* Sat Sep 24 2016 Luya Tshimbalanga <luya@fedoraproject.org> 2.11.0-1
8e21eaa
- Latest upstream update
8e21eaa
6cabede
* Thu Sep 22 2016 Jerry James <loganjerry@gmail.com> 2.10.0-8
6cabede
- Rebuild for tbb 2017
6cabede
c1e0772
* Thu Aug 25 2016 Luya Tshimbalanga <luya@fedoraproject.org> 2.10.0-7
c1e0772
- Used ExclusiveArch for 64bit Architecture
c1e0772
1709f7b
* Sun Aug 21 2016 Luya Tshimbalanga <luya@fedoraproject.org> 2.10.0-6
1709f7b
- Located flags before cmake
1709f7b
- Used libexecdir for subpackages examples
1709f7b
- Pleased rpmlint
1709f7b
- Added examples subpackages
1709f7b
1709f7b
* Sat Aug 20 2016 Luya Tshimbalanga <luya@fedoraproject.org> 2.10.0-5
1709f7b
- Silenced all warning message in build
1709f7b
- Added %%check line
1709f7b
- Added examples subpackages
1709f7b
1709f7b
* Sat Aug 20 2016 Luya Tshimbalanga <luya@fedoraproject.org> 2.10.0-4
1709f7b
- Added ispc dependency
1709f7b
- Removed ExclusiveArch
1709f7b
- Enabled ispc and tutorials
1709f7b
1709f7b
* Fri Aug 12 2016 Luya Tshimbalanga <luya_tfz@thefinalzone.net> 2.10.0-3
1709f7b
- Use ExclusiveArch tag for 64 bits architectures
1709f7b
- Adjust the lines of descriptions
1709f7b
- Fix bin path
1709f7b
- Add freeglut dependency from upstream
1709f7b
1709f7b
* Sat Aug 6 2016 Luya Tshimbalanga <luya_tfz@thefinalzone.net> 2.10.0-2
1709f7b
- Fixed mixed use space and tabs errors
1709f7b
- Shorten the line of description
1709f7b
- Exclude i686 architecture
1709f7b
1709f7b
* Thu Aug 4 2016 Luya Tshimbalanga <luya_tfz@thefinalzone.net> 2.10.0-1
1709f7b
- Initial build