2 # requires the OpenCL patches
3 %define llvm_version 11.0.0
5 %define spirv_llvm_translator_version 11.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: 31e0ca207e06d6bb1a49661cafd8a3ea
15 URL: https://01.org/compute-runtime
16 BuildRequires: SPIRV-LLVM-Translator-devel >= %{spirv_llvm_translator_version}
17 BuildRequires: clang >= %{llvm_rpm_version}
18 BuildRequires: clang-devel >= %{llvm_version}
19 BuildRequires: cmake >= 3.4.3
20 BuildRequires: llvm-devel >= %{llvm_version}
21 BuildRequires: pkgconfig
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 Common clang is a thin wrapper library around clang. Common clang has
26 OpenCL-oriented API and is capable to compile OpenCL C kernels to
30 Summary: Header files for %{name} library
31 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name}
32 Group: Development/Libraries
33 %requires_eq clang-devel
34 Requires: %{name} = %{version}-%{release}
37 Header files for %{name} library.
39 %description devel -l pl.UTF-8
40 Pliki nagłówkowe biblioteki %{name}.
49 -DUSE_PREBUILT_LLVM=ON \
50 -DPREFERRED_LLVM_VERSION="%{llvm_version}" \
51 -DLLVMSPIRV_INCLUDED_IN_LLVM=OFF \
52 -DSPIRV_TRANSLATOR_DIR="%{_prefix}" \
53 -DGIT_EXECUTABLE=/bin/false \
60 rm -rf $RPM_BUILD_ROOT
62 %{__make} -C build install \
63 DESTDIR=$RPM_BUILD_ROOT
65 mv $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.11 $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.%{llvm_version}
66 ln -s libopencl-clang.so.%{llvm_version} $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.11
67 ln -sf libopencl-clang.so.%{llvm_version} $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so
69 %post -p /sbin/ldconfig
70 %postun -p /sbin/ldconfig
73 rm -rf $RPM_BUILD_ROOT
76 %defattr(644,root,root,755)
78 %attr(755,root,root) %{_libdir}/libopencl-clang.so.%{llvm_version}
79 %ghost %attr(755,root,root) %{_libdir}/libopencl-clang.so.11
82 %defattr(644,root,root,755)
83 %attr(755,root,root) %{_libdir}/libopencl-clang.so