2 # requires the OpenCL patches
3 %define llvm_version 12.0.0
5 %define spirv_llvm_translator_version 12.0.0
7 %define gitref 1d1829d930d31309c43512fc17ece51dd314ebde
10 Summary: Intel Graphics Compute Runtime for OpenCL
14 License: University of Illinois/NCSA Open Source License
16 Source0: https://github.com/intel/opencl-clang/archive/%{gitref}/%{name}-%{snap}.tar.gz
17 # Source0-md5: aa6983d5d43d2d92727837a8c1669c9f
18 URL: https://01.org/compute-runtime
19 BuildRequires: SPIRV-LLVM-Translator-devel >= %{spirv_llvm_translator_version}
20 BuildRequires: clang >= %{llvm_rpm_version}
21 BuildRequires: clang-devel >= %{llvm_version}
22 BuildRequires: cmake >= 3.4.3
23 BuildRequires: llvm-devel >= %{llvm_version}
24 BuildRequires: pkgconfig
25 BuildRequires: rpmbuild(macros) >= 1.605
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 Common clang is a thin wrapper library around clang. Common clang has
30 OpenCL-oriented API and is capable to compile OpenCL C kernels to
34 Summary: Header files for %{name} library
35 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name}
36 Group: Development/Libraries
37 %requires_eq clang-devel
38 Requires: %{name} = %{version}-%{release}
41 Header files for %{name} library.
43 %description devel -l pl.UTF-8
44 Pliki nagłówkowe biblioteki %{name}.
47 %setup -q -n %{name}-%{gitref}
53 -DUSE_PREBUILT_LLVM=ON \
54 -DPREFERRED_LLVM_VERSION="%{llvm_version}" \
55 -DLLVMSPIRV_INCLUDED_IN_LLVM=OFF \
56 -DSPIRV_TRANSLATOR_DIR="%{_prefix}" \
57 -DGIT_EXECUTABLE=/bin/false \
64 rm -rf $RPM_BUILD_ROOT
66 %{__make} -C build install \
67 DESTDIR=$RPM_BUILD_ROOT
69 mv $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.12 $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.%{llvm_version}
70 ln -s libopencl-clang.so.%{llvm_version} $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.12
71 ln -sf libopencl-clang.so.%{llvm_version} $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so
73 %post -p /sbin/ldconfig
74 %postun -p /sbin/ldconfig
77 rm -rf $RPM_BUILD_ROOT
80 %defattr(644,root,root,755)
82 %attr(755,root,root) %{_libdir}/libopencl-clang.so.%{llvm_version}
83 %ghost %attr(755,root,root) %{_libdir}/libopencl-clang.so.12
86 %defattr(644,root,root,755)
87 %attr(755,root,root) %{_libdir}/libopencl-clang.so