]> git.pld-linux.org Git - packages/opencl-clang.git/blame - opencl-clang.spec
up to 16.0.0
[packages/opencl-clang.git] / opencl-clang.spec
CommitLineData
c7dfe9a1 1
ac26e2aa 2# requires the OpenCL patches
91f591af
JP
3%define llvm_version 16.0.0
4%define spirv_llvm_translator_version 16.0.0
2b3682a3 5
c7dfe9a1 6Summary: Intel Graphics Compute Runtime for OpenCL
60ea41c6 7Summary(pl.UTF-8): Biblioteki uruchomieniowe Intel Graphics Compute dla OpenCL
c7dfe9a1 8Name: opencl-clang
91f591af
JP
9Version: 16.0.0
10Release: 1
c7dfe9a1
JK
11License: University of Illinois/NCSA Open Source License
12Group: Libraries
649fde22 13Source0: https://github.com/intel/opencl-clang/archive/v%{version}/%{name}-%{version}.tar.gz
91f591af
JP
14# Source0-md5: f2eb3b9f9201349860f0e7ef0eb31d46
15Patch0: cxx17.patch
16Patch1: llvm16.patch
17Patch2: soname.patch
18Patch3: standalone.patch
c7dfe9a1 19URL: https://01.org/compute-runtime
eac18d9c 20BuildRequires: SPIRV-LLVM-Translator-devel >= %{spirv_llvm_translator_version}
15cf855e 21BuildRequires: clang >= %{llvm_rpm_version}
5b943348 22BuildRequires: clang-devel >= %{llvm_version}
91f591af 23BuildRequires: cmake >= 3.13.4
5b943348 24BuildRequires: llvm-devel >= %{llvm_version}
c7dfe9a1 25BuildRequires: pkgconfig
77ea7f96 26BuildRequires: rpmbuild(macros) >= 1.605
c7dfe9a1
JK
27BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29%description
30Common clang is a thin wrapper library around clang. Common clang has
31OpenCL-oriented API and is capable to compile OpenCL C kernels to
32SPIR-V modules.
33
60ea41c6
JB
34%description -l pl.UTF-8
35Common clang to niewielka biblioteka obudowująca clanga. Ma API
36zorientowane na OpenCL i potrafi kompilować jądra C OpenCL do modułów
37WPIR-V
38
c7dfe9a1
JK
39%package devel
40Summary: Header files for %{name} library
41Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name}
42Group: Development/Libraries
15cf855e 43%requires_eq clang-devel
c7dfe9a1
JK
44Requires: %{name} = %{version}-%{release}
45
46%description devel
47Header files for %{name} library.
48
49%description devel -l pl.UTF-8
50Pliki nagłówkowe biblioteki %{name}.
51
52%prep
649fde22 53%setup -q
91f591af
JP
54%patch0 -p1
55%patch1 -p1
56%patch2 -p1
57%patch3 -p1
c7dfe9a1
JK
58
59%build
60install -d build
61cd build
62%cmake \
63 -DUSE_PREBUILT_LLVM=ON \
64 -DPREFERRED_LLVM_VERSION="%{llvm_version}" \
65 -DLLVMSPIRV_INCLUDED_IN_LLVM=OFF \
66 -DSPIRV_TRANSLATOR_DIR="%{_prefix}" \
0a767a56 67 -DGIT_EXECUTABLE=/bin/false \
c7dfe9a1
JK
68 ../
69%{__make}
70
71cd ..
72
73%install
74rm -rf $RPM_BUILD_ROOT
75
76%{__make} -C build install \
77 DESTDIR=$RPM_BUILD_ROOT
78
91f591af
JP
79%{__mv} $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.16 $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.%{llvm_version}
80ln -s libopencl-clang.so.%{llvm_version} $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.16
c7dfe9a1
JK
81ln -sf libopencl-clang.so.%{llvm_version} $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so
82
83%post -p /sbin/ldconfig
84%postun -p /sbin/ldconfig
85
86%clean
87rm -rf $RPM_BUILD_ROOT
88
89%files
90%defattr(644,root,root,755)
91%doc README.md
92%attr(755,root,root) %{_libdir}/libopencl-clang.so.%{llvm_version}
91f591af 93%ghost %attr(755,root,root) %{_libdir}/libopencl-clang.so.16
c7dfe9a1
JK
94
95%files devel
96%defattr(644,root,root,755)
97%attr(755,root,root) %{_libdir}/libopencl-clang.so
98%{_includedir}/cclang
This page took 0.607471 seconds and 4 git commands to generate.