2 # requires the OpenCL patches
3 %define llvm_version 7.0.1-3
5 %define spirv_llvm_translator_version 7.0.1
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: cb6b746c837a6cac6c8906911b2ea9de
15 Patch0: llvm_clang_vfs.patch
16 URL: https://01.org/compute-runtime
17 BuildRequires: SPIRV-LLVM-Translator-devel >= %{spirv_llvm_translator_version}
18 BuildRequires: clang >= %{llvm_version}
19 BuildRequires: clang-devel >= %{llvm_version}
20 BuildRequires: cmake >= 3.4.3
21 BuildRequires: llvm-devel >= %{llvm_version}
22 BuildRequires: pkgconfig
24 %requires_eq clang-devel
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 Common clang is a thin wrapper library around clang. Common clang has
29 OpenCL-oriented API and is capable to compile OpenCL C kernels to
33 Summary: Header files for %{name} library
34 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name}
35 Group: Development/Libraries
36 Requires: clang-devel >= %{llvm_version}
37 Requires: llvm-devel >= %{llvm_version}
38 Requires: %{name} = %{version}-%{release}
41 Header files for %{name} library.
43 %description devel -l pl.UTF-8
44 Pliki nagłówkowe biblioteki %{name}.
55 -DUSE_PREBUILT_LLVM=ON \
56 -DPREFERRED_LLVM_VERSION="%{llvm_version}" \
57 -DLLVMSPIRV_INCLUDED_IN_LLVM=OFF \
58 -DSPIRV_TRANSLATOR_DIR="%{_prefix}" \
59 -DGIT_EXECUTABLE=/bin/false \
66 rm -rf $RPM_BUILD_ROOT
68 %{__make} -C build install \
69 DESTDIR=$RPM_BUILD_ROOT
71 mv $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.7 $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.%{llvm_version}
72 ln -s libopencl-clang.so.%{llvm_version} $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.7
73 ln -sf libopencl-clang.so.%{llvm_version} $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so
75 %post -p /sbin/ldconfig
76 %postun -p /sbin/ldconfig
79 rm -rf $RPM_BUILD_ROOT
82 %defattr(644,root,root,755)
84 %attr(755,root,root) %{_libdir}/libopencl-clang.so.%{llvm_version}
85 %ghost %attr(755,root,root) %{_libdir}/libopencl-clang.so.7
88 %defattr(644,root,root,755)
89 %attr(755,root,root) %{_libdir}/libopencl-clang.so