]>
Commit | Line | Data |
---|---|---|
c7dfe9a1 | 1 | |
ac26e2aa | 2 | # requires the OpenCL patches |
16efc543 | 3 | %define llvm_version 11.0.0 |
ac26e2aa | 4 | |
16efc543 | 5 | %define spirv_llvm_translator_version 11.0.0 |
c7dfe9a1 JK |
6 | |
7 | Summary: Intel Graphics Compute Runtime for OpenCL | |
8 | Name: opencl-clang | |
16efc543 | 9 | Version: 11.0.0 |
c5a9dbb2 | 10 | Release: 2 |
c7dfe9a1 JK |
11 | License: University of Illinois/NCSA Open Source License |
12 | Group: Libraries | |
13 | Source0: https://github.com/intel/opencl-clang/archive/v%{version}/%{name}-%{version}.tar.gz | |
16efc543 | 14 | # Source0-md5: 31e0ca207e06d6bb1a49661cafd8a3ea |
c7dfe9a1 | 15 | URL: https://01.org/compute-runtime |
eac18d9c | 16 | BuildRequires: SPIRV-LLVM-Translator-devel >= %{spirv_llvm_translator_version} |
15cf855e | 17 | BuildRequires: clang >= %{llvm_rpm_version} |
5b943348 | 18 | BuildRequires: clang-devel >= %{llvm_version} |
c7dfe9a1 | 19 | BuildRequires: cmake >= 3.4.3 |
5b943348 | 20 | BuildRequires: llvm-devel >= %{llvm_version} |
c7dfe9a1 | 21 | BuildRequires: pkgconfig |
c7dfe9a1 JK |
22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
23 | ||
24 | %description | |
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 | |
27 | SPIR-V modules. | |
28 | ||
29 | %package devel | |
30 | Summary: Header files for %{name} library | |
31 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name} | |
32 | Group: Development/Libraries | |
15cf855e | 33 | %requires_eq clang-devel |
c7dfe9a1 JK |
34 | Requires: %{name} = %{version}-%{release} |
35 | ||
36 | %description devel | |
37 | Header files for %{name} library. | |
38 | ||
39 | %description devel -l pl.UTF-8 | |
40 | Pliki nagłówkowe biblioteki %{name}. | |
41 | ||
42 | %prep | |
43 | %setup -q | |
c7dfe9a1 JK |
44 | |
45 | %build | |
46 | install -d build | |
47 | cd build | |
48 | %cmake \ | |
49 | -DUSE_PREBUILT_LLVM=ON \ | |
50 | -DPREFERRED_LLVM_VERSION="%{llvm_version}" \ | |
51 | -DLLVMSPIRV_INCLUDED_IN_LLVM=OFF \ | |
52 | -DSPIRV_TRANSLATOR_DIR="%{_prefix}" \ | |
0a767a56 | 53 | -DGIT_EXECUTABLE=/bin/false \ |
c7dfe9a1 JK |
54 | ../ |
55 | %{__make} | |
56 | ||
57 | cd .. | |
58 | ||
59 | %install | |
60 | rm -rf $RPM_BUILD_ROOT | |
61 | ||
62 | %{__make} -C build install \ | |
63 | DESTDIR=$RPM_BUILD_ROOT | |
64 | ||
16efc543 JP |
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 | |
c7dfe9a1 JK |
67 | ln -sf libopencl-clang.so.%{llvm_version} $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so |
68 | ||
69 | %post -p /sbin/ldconfig | |
70 | %postun -p /sbin/ldconfig | |
71 | ||
72 | %clean | |
73 | rm -rf $RPM_BUILD_ROOT | |
74 | ||
75 | %files | |
76 | %defattr(644,root,root,755) | |
77 | %doc README.md | |
78 | %attr(755,root,root) %{_libdir}/libopencl-clang.so.%{llvm_version} | |
16efc543 | 79 | %ghost %attr(755,root,root) %{_libdir}/libopencl-clang.so.11 |
c7dfe9a1 JK |
80 | |
81 | %files devel | |
82 | %defattr(644,root,root,755) | |
83 | %attr(755,root,root) %{_libdir}/libopencl-clang.so | |
84 | %{_includedir}/cclang |