a9edde
%global		with_prerelease 0
10a0c1
%global		with_snapshot	0
171b1e
%global		with_examples	0
41db31
%global		prerelease	beta
41db31
%global		commit		40b9aca2668f443cae6bfbfa7cc5a354f1087011
41db31
%global		shortcommit	%(c=%{commit}; echo ${c:0:7})
41db31
1709f7
Name:		embree
07330a
Version:	3.5.2
2ad54e
%if %{with_prerelease}
10a0c1
%if %{with_snapshot}
e2c844
Release:	3.%{shortcommit}git%{?dist}
2ad54e
%else
e2c844
Release:	0.3.%{prerelease}%{?dist}
10a0c1
%endif
10a0c1
%else
e2c844
Release:	2%{?dist}
2ad54e
%endif
1709f7
Summary:	Collection of high-performance ray tracing kernels developed at Intel
41db31
1709f7
License:	ASL 2.0
1709f7
URL:		https://embree.github.io
2ad54e
%if %{with_prerelease}
10a0c1
%if %{with_snapshot}
41db31
Source:		https://github.com/%{name}/%{name}/archive/%{commit}/%{name}-%{commit}.tar.gz#/%{name}-%{version}-%{shortcommit}.tar.gz
2ad54e
%else
10a0c1
Source:		https://github.com/%{name}/%{name}/archive/v%{version}-%{prerelease}.0.tar.gz#/%{name}-%{version}-%{prerelease}.0.tar.gz
10a0c1
%endif
10a0c1
%else
bfefe5
Source:		https://github.com/%{name}/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
2ad54e
%endif
1709f7
1709f7
BuildRequires:	cmake
2b5c3e
BuildRequires:	freeglut-devel
171b1e
BuildRequires:	gcc-c++
10a0c1
BuildRequires:	glfw-devel
171b1e
BuildRequires:	ispc
171b1e
BuildRequires:	libXmu-devel
99aacf
BuildRequires:	OpenEXR-devel
1709f7
BuildRequires:	tbb-devel
83b29d
c1e077
# Use 64bit architectures because of SSE2 and up
c1e077
ExclusiveArch:	x86_64
1709f7
1709f7
%description
1709f7
A collection of high-performance ray tracing kernels intended to graphics 
1709f7
application engineers that want to improve the performance of their application.
1709f7
1709f7
%package	devel
1709f7
Summary:	Development files for %{name}
1709f7
Requires:	%{name}%{?_isa} = %{version}-%{release}
1709f7
1709f7
%description	devel
1709f7
The %{name}-devel package contains libraries and header files for
1709f7
 applications that use %{name}.
1709f7
171b1e
%if %{with_examples}
1709f7
%package	examples
1709f7
Summary:	Example of application using %{name}
1709f7
Requires:	%{name}%{?_isa} = %{version}-%{release}
1709f7
1709f7
%description	examples
1709f7
The %{name}-examples package contains sample binaries using %{name}.
171b1e
%endif
1709f7
1709f7
%prep
2ad54e
%if %{with_prerelease}
10a0c1
%if %{with_snapshot}
41db31
%autosetup -n %{name}-%{commit}
10a0c1
%else 
10a0c1
%autosetup -n %{name}-%{version}-%{prerelease}.0
10a0c1
%endif
2ad54e
%else
a3fffa
%autosetup -n %{name}-%{version}
2ad54e
%endif
2ad54e
1709f7
1709f7
mkdir %{_target_platform}
1709f7
1709f7
%build
1709f7
pushd %{_target_platform} 
41db31
export CXXFLAGS="%{optflags} -Wl,--as-needed"
80e55f
%cmake \
80e55f
	-DCMAKE_INSTALL_LIBDIR=%{_libdir} \
2241da
	-DCMAKE_INSTALL_PREFIX=%{_prefix} \
171b1e
	-DCMAKE_BUILD_TYPE=Release \
80e55f
	-DEMBREE_IGNORE_CMAKE_CXX_FLAGS=OFF \
171b1e
	-DEMBREE_TUTORIALS=OFF \
171b1e
	..
1709f7
popd
1709f7
%make_build -C %{_target_platform}
1709f7
1709f7
%install
1709f7
%make_install -C %{_target_platform}
171b1e
171b1e
%if %{with_examples}
1709f7
# Related binary examples
1709f7
mkdir -p %{buildroot}%{_libexecdir}/%{name}
1c3dfd
mv %{buildroot}%{_bindir}/%{name}3/* %{buildroot}%{_libexecdir}/%{name}/
171b1e
%endif
1709f7
1709f7
# Relocate doc files
1c3dfd
mv %{buildroot}%{_docdir}/%{name}3 %{buildroot}%{_docdir}/%{name}
1709f7
rm %{buildroot}%{_docdir}/%{name}/LICENSE.txt
1709f7
1709f7
%check
1709f7
ctest -V %{?_smp_mflags}
1709f7
e7fb19
%ldconfig_scriptlets
1709f7
1709f7
1709f7
%files
1709f7
%license LICENSE.txt
1709f7
%doc README.md CHANGELOG.md readme.pdf
19f15b
%{_libdir}/lib%{name}3.so.3
19f15b
%{_libdir}/lib%{name}3.so.3.*
905e1c
%{_mandir}/man3/*
1709f7
1709f7
%files devel
19f15b
%{_libdir}/lib%{name}3.so
1c3dfd
%{_includedir}/%{name}3/
1709f7
%{_libdir}/cmake/%{name}-%{version}/
1709f7
171b1e
%if %{with_examples}
1709f7
%files examples
1709f7
%{_libexecdir}/%{name}/
171b1e
%endif
1709f7
1709f7
%changelog
e2c844
* Mon Apr 22 2019 Luya Tshimbalanga <luya@fedoraproject.org> - 3.5.2-2
e2c844
- Rebuilt for ispc 1.11.0
e2c844
07330a
* Fri Mar 22 2019 Luya Tshimbalanga <luya@fedoraproject.org> - 3.5.2-1
07330a
- Update to 3.5.2
07330a
- Rebuilt for ispc 1.10.0
171b1e
- Disable tutorials
07330a
07330a
* Sat Mar 02 2019 Luya Tshimbalanga <luya@fedoraproject.org> - 3.5.0-1
07330a
- Update to 3.5.0
07330a
73fa0f
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.0-2
73fa0f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
73fa0f
b39779
* Sat Aug 18 2018 Luya Tshimbalanga <luya@fedoraproject.org> - 3.2.0-1
10a0c1
- Update to 3.2.0
10a0c1
- Add glfw dependency
10a0c1
6d7ff8
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-2.40b9acagit
6d7ff8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
10a0c1
41db31
* Mon Mar 19 2018 Luya Tshimbalanga <luya@fedoraproject.org> - 3.0.0-1.40b9acagit
41db31
- Upstream snapshot compile fix for gcc 8
41db31
- Optimize spec file
41db31
a9edde
* Fri Mar 02 2018 Luya Tshimbalanga <luya@fedoraproject.org> - 3.0.0-1
a9edde
- Update to 3.0.0
a9edde
3b5de4
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-0.2.beta
3b5de4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
3b5de4
2ad54e
* Mon Jan 22 2018 Luya Tshimbalanga  <luya@fedoraproject.org> - 3.0.0-0.1.beta
2ad54e
- Update to 3.0.0-beta.0
905e1c
- Add manual directory
2ad54e
14a658
* Wed Jan 17 2018 Fedora Release Monitoring  <release-monitoring@fedoraproject.org> - 2.17.2-1
14a658
- Update to 2.17.2 (#1512896)
14a658
e918cb
* Wed Oct 25 2017 Luya Tshimbalanga <luya@fedoraproject.org> - 2.17.0-2
e918cb
- Rebase to more current snapshot for LLVM 5.0 support
e918cb
807cd4
* Thu Sep 21 2017 Fedora Release Monitoring  <release-monitoring@fedoraproject.org> - 2.17.0-1
807cd4
- Update to 2.17.0 (#1494058)
807cd4
d112d8
* Tue Aug 15 2017 Fedora Release Monitoring  <release-monitoring@fedoraproject.org> - 2.16.5-1
d112d8
- Update to 2.16.5 (#1481678)
d112d8
6fc7e2
* Sun Aug 06 2017 Bjรถrn Esser <besser82@fedoraproject.org> - 2.16.4-4
6fc7e2
- Rebuilt for AutoReq cmake-filesystem
6fc7e2
11a806
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.16.4-3
11a806
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
11a806
1cc53c
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.16.4-2
1cc53c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
1cc53c
b23799
* Fri Jun 30 2017 Fedora Release Monitoring  <release-monitoring@fedoraproject.org> - 2.16.4-1
b23799
- Update to 2.16.4 (#1466767)
b23799
b23799
* Thu Jun 15 2017 Fedora Release Monitoring  <release-monitoring@fedoraproject.org> - 2.16.2-1
b23799
- Update to 2.16.2 (#1459537)
b23799
1e61b9
* Wed May 17 2017 Luya Tshimbalanga <luya@fedoraproject.org> - 2.16.0-1
1e61b9
- New upstream release
1e61b9
e5f570
* Tue Mar 28 2017 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.15.0-2
e5f570
- Honor Fedora compilation flags again (rhbz#1436075)
e5f570
a3fffa
* Wed Mar 22 2017 Luya Tshimbalanga <luya@fedoraproject.org> - 2.15.0-1
a3fffa
- New upstream release
a3fffa
00c1d3
* Thu Mar 16 2017 Luya Tshimbalanga <luya@fedoraproject.org> - 2.14.0-3
00c1d3
- Rebuild for ispc
00c1d3
903347
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.14.0-2
903347
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
903347
83b29d
* Thu Feb 09 2017 Luya Tshimbalanga <luya@fedoraproject.org> - 2.14.0-1
83b29d
- New upstream release
83b29d
- Drop patch as the fix is included upstream
83b29d
bfefe5
* Thu Jan 19 2017 Luya Tshimbalanga <luya@fedoraproject.org> - 2.13.0-3
bfefe5
- Patch fixing initialization code of the rayStreamFilters sent by upstream (rhbz#1414611)
bfefe5
99b487
* Thu Jan 19 2017 Luya Tshimbalanga <luya@fedoraproject.org> - 2.13.0-2
bfefe5
- Workaround lowering max_ISA to avx on non-Intel CPU (rhbz#1414611)
99b487
52ad86
* Tue Nov 22 2016 Luya Tshimbalanga <luya@fedoraproject.org> - 2.13.0-1
52ad86
- Upstream update
52ad86
0d99f3
* Tue Oct 18 2016 Luya Tshimbalanga <luya@fedoraproject.org> 2.12.0-1
0d99f3
- Upstream update addressing larger memory consumption
0d99f3
8e21ea
* Sat Sep 24 2016 Luya Tshimbalanga <luya@fedoraproject.org> 2.11.0-1
8e21ea
- Latest upstream update
8e21ea
6cabed
* Thu Sep 22 2016 Jerry James <loganjerry@gmail.com> 2.10.0-8
6cabed
- Rebuild for tbb 2017
6cabed
c1e077
* Thu Aug 25 2016 Luya Tshimbalanga <luya@fedoraproject.org> 2.10.0-7
c1e077
- Used ExclusiveArch for 64bit Architecture
c1e077
1709f7
* Sun Aug 21 2016 Luya Tshimbalanga <luya@fedoraproject.org> 2.10.0-6
1709f7
- Located flags before cmake
1709f7
- Used libexecdir for subpackages examples
1709f7
- Pleased rpmlint
1709f7
- Added examples subpackages
1709f7
1709f7
* Sat Aug 20 2016 Luya Tshimbalanga <luya@fedoraproject.org> 2.10.0-5
1709f7
- Silenced all warning message in build
1709f7
- Added %%check line
1709f7
- Added examples subpackages
1709f7
1709f7
* Sat Aug 20 2016 Luya Tshimbalanga <luya@fedoraproject.org> 2.10.0-4
1709f7
- Added ispc dependency
1709f7
- Removed ExclusiveArch
1709f7
- Enabled ispc and tutorials
1709f7
1709f7
* Fri Aug 12 2016 Luya Tshimbalanga <luya_tfz@thefinalzone.net> 2.10.0-3
1709f7
- Use ExclusiveArch tag for 64 bits architectures
1709f7
- Adjust the lines of descriptions
1709f7
- Fix bin path
1709f7
- Add freeglut dependency from upstream
1709f7
1709f7
* Sat Aug 6 2016 Luya Tshimbalanga <luya_tfz@thefinalzone.net> 2.10.0-2
1709f7
- Fixed mixed use space and tabs errors
1709f7
- Shorten the line of description
1709f7
- Exclude i686 architecture
1709f7
1709f7
* Thu Aug 4 2016 Luya Tshimbalanga <luya_tfz@thefinalzone.net> 2.10.0-1
1709f7
- Initial build