]>
Commit | Line | Data |
---|---|---|
c7dfe9a1 | 1 | |
ac26e2aa | 2 | # requires the OpenCL patches |
38b9be4d JP |
3 | %define llvm_version 18.1.0 |
4 | %define spirv_llvm_translator_version 18.1.0 | |
2b3682a3 | 5 | |
c7dfe9a1 | 6 | Summary: Intel Graphics Compute Runtime for OpenCL |
60ea41c6 | 7 | Summary(pl.UTF-8): Biblioteki uruchomieniowe Intel Graphics Compute dla OpenCL |
c7dfe9a1 | 8 | Name: opencl-clang |
38b9be4d | 9 | Version: 18.1.0 |
b8e7b499 | 10 | Release: 1 |
c7dfe9a1 JK |
11 | License: University of Illinois/NCSA Open Source License |
12 | Group: Libraries | |
649fde22 | 13 | Source0: https://github.com/intel/opencl-clang/archive/v%{version}/%{name}-%{version}.tar.gz |
38b9be4d | 14 | # Source0-md5: bc489b3d1222c1c637fd777bc056b5af |
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} |
91f591af | 19 | BuildRequires: cmake >= 3.13.4 |
5b943348 | 20 | BuildRequires: llvm-devel >= %{llvm_version} |
c7dfe9a1 | 21 | BuildRequires: pkgconfig |
77ea7f96 | 22 | BuildRequires: rpmbuild(macros) >= 1.605 |
c7dfe9a1 JK |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
24 | ||
25 | %description | |
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 | |
28 | SPIR-V modules. | |
29 | ||
60ea41c6 JB |
30 | %description -l pl.UTF-8 |
31 | Common clang to niewielka biblioteka obudowująca clanga. Ma API | |
32 | zorientowane na OpenCL i potrafi kompilować jądra C OpenCL do modułów | |
33 | WPIR-V | |
34 | ||
c7dfe9a1 JK |
35 | %package devel |
36 | Summary: Header files for %{name} library | |
37 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name} | |
38 | Group: Development/Libraries | |
15cf855e | 39 | %requires_eq clang-devel |
c7dfe9a1 JK |
40 | Requires: %{name} = %{version}-%{release} |
41 | ||
42 | %description devel | |
43 | Header files for %{name} library. | |
44 | ||
45 | %description devel -l pl.UTF-8 | |
46 | Pliki nagłówkowe biblioteki %{name}. | |
47 | ||
48 | %prep | |
649fde22 | 49 | %setup -q |
c7dfe9a1 JK |
50 | |
51 | %build | |
52 | install -d build | |
53 | cd build | |
54 | %cmake \ | |
55 | -DUSE_PREBUILT_LLVM=ON \ | |
56 | -DPREFERRED_LLVM_VERSION="%{llvm_version}" \ | |
57 | -DLLVMSPIRV_INCLUDED_IN_LLVM=OFF \ | |
58 | -DSPIRV_TRANSLATOR_DIR="%{_prefix}" \ | |
0a767a56 | 59 | -DGIT_EXECUTABLE=/bin/false \ |
c7dfe9a1 JK |
60 | ../ |
61 | %{__make} | |
62 | ||
63 | cd .. | |
64 | ||
65 | %install | |
66 | rm -rf $RPM_BUILD_ROOT | |
67 | ||
68 | %{__make} -C build install \ | |
69 | DESTDIR=$RPM_BUILD_ROOT | |
70 | ||
38b9be4d JP |
71 | %{__mv} $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.18.1 $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.%{llvm_version} |
72 | ln -s libopencl-clang.so.%{llvm_version} $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.18.1 | |
c7dfe9a1 JK |
73 | ln -sf libopencl-clang.so.%{llvm_version} $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so |
74 | ||
75 | %post -p /sbin/ldconfig | |
76 | %postun -p /sbin/ldconfig | |
77 | ||
78 | %clean | |
79 | rm -rf $RPM_BUILD_ROOT | |
80 | ||
81 | %files | |
82 | %defattr(644,root,root,755) | |
83 | %doc README.md | |
84 | %attr(755,root,root) %{_libdir}/libopencl-clang.so.%{llvm_version} | |
38b9be4d | 85 | %ghost %attr(755,root,root) %{_libdir}/libopencl-clang.so.18.1 |
c7dfe9a1 JK |
86 | |
87 | %files devel | |
88 | %defattr(644,root,root,755) | |
89 | %attr(755,root,root) %{_libdir}/libopencl-clang.so | |
90 | %{_includedir}/cclang |