2 # requires the OpenCL patches
3 %define llvm_version 10.0.0
5 %define spirv_llvm_translator_version 10.0.0
7 Summary: Intel Graphics Compute Runtime for OpenCL
11 License: University of Illinois/NCSA Open Source License
13 Source0: https://github.com/intel/opencl-clang/archive/v%{version}/%{name}-%{version}.tar.gz
14 # Source0-md5: a28bc82341f0ef4dbf749d2ee5e0a907
16 URL: https://01.org/compute-runtime
17 BuildRequires: SPIRV-LLVM-Translator-devel >= %{spirv_llvm_translator_version}
18 BuildRequires: clang >= %{llvm_rpm_version}
19 BuildRequires: clang-devel >= %{llvm_version}
20 BuildRequires: cmake >= 3.4.3
21 BuildRequires: llvm-devel >= %{llvm_version}
22 BuildRequires: pkgconfig
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 Common clang is a thin wrapper library around clang. Common clang has
27 OpenCL-oriented API and is capable to compile OpenCL C kernels to
31 Summary: Header files for %{name} library
32 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name}
33 Group: Development/Libraries
34 %requires_eq clang-devel
35 Requires: %{name} = %{version}-%{release}
38 Header files for %{name} library.
40 %description devel -l pl.UTF-8
41 Pliki nagłówkowe biblioteki %{name}.
51 -DUSE_PREBUILT_LLVM=ON \
52 -DPREFERRED_LLVM_VERSION="%{llvm_version}" \
53 -DLLVMSPIRV_INCLUDED_IN_LLVM=OFF \
54 -DSPIRV_TRANSLATOR_DIR="%{_prefix}" \
55 -DGIT_EXECUTABLE=/bin/false \
62 rm -rf $RPM_BUILD_ROOT
64 %{__make} -C build install \
65 DESTDIR=$RPM_BUILD_ROOT
67 mv $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.10 $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.%{llvm_version}
68 ln -s libopencl-clang.so.%{llvm_version} $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.10
69 ln -sf libopencl-clang.so.%{llvm_version} $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so
71 %post -p /sbin/ldconfig
72 %postun -p /sbin/ldconfig
75 rm -rf $RPM_BUILD_ROOT
78 %defattr(644,root,root,755)
80 %attr(755,root,root) %{_libdir}/libopencl-clang.so.%{llvm_version}
81 %ghost %attr(755,root,root) %{_libdir}/libopencl-clang.so.10
84 %defattr(644,root,root,755)
85 %attr(755,root,root) %{_libdir}/libopencl-clang.so