]> git.pld-linux.org Git - packages/opencl-clang.git/blame_incremental - opencl-clang.spec
Release 4 (by relup.sh)
[packages/opencl-clang.git] / opencl-clang.spec
... / ...
CommitLineData
1
2# requires the OpenCL patches
3%define llvm_version 11.0.0
4
5%define spirv_llvm_translator_version 11.0.0
6
7Summary: Intel Graphics Compute Runtime for OpenCL
8Name: opencl-clang
9Version: 11.0.0
10Release: 4
11License: University of Illinois/NCSA Open Source License
12Group: Libraries
13Source0: https://github.com/intel/opencl-clang/archive/v%{version}/%{name}-%{version}.tar.gz
14# Source0-md5: 31e0ca207e06d6bb1a49661cafd8a3ea
15URL: https://01.org/compute-runtime
16BuildRequires: SPIRV-LLVM-Translator-devel >= %{spirv_llvm_translator_version}
17BuildRequires: clang >= %{llvm_rpm_version}
18BuildRequires: clang-devel >= %{llvm_version}
19BuildRequires: cmake >= 3.4.3
20BuildRequires: llvm-devel >= %{llvm_version}
21BuildRequires: pkgconfig
22BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24%description
25Common clang is a thin wrapper library around clang. Common clang has
26OpenCL-oriented API and is capable to compile OpenCL C kernels to
27SPIR-V modules.
28
29%package devel
30Summary: Header files for %{name} library
31Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name}
32Group: Development/Libraries
33%requires_eq clang-devel
34Requires: %{name} = %{version}-%{release}
35
36%description devel
37Header files for %{name} library.
38
39%description devel -l pl.UTF-8
40Pliki nagłówkowe biblioteki %{name}.
41
42%prep
43%setup -q
44
45%build
46install -d build
47cd 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}" \
53 -DGIT_EXECUTABLE=/bin/false \
54 ../
55%{__make}
56
57cd ..
58
59%install
60rm -rf $RPM_BUILD_ROOT
61
62%{__make} -C build install \
63 DESTDIR=$RPM_BUILD_ROOT
64
65mv $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.11 $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.%{llvm_version}
66ln -s libopencl-clang.so.%{llvm_version} $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.11
67ln -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
73rm -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}
79%ghost %attr(755,root,root) %{_libdir}/libopencl-clang.so.11
80
81%files devel
82%defattr(644,root,root,755)
83%attr(755,root,root) %{_libdir}/libopencl-clang.so
84%{_includedir}/cclang
This page took 0.050693 seconds and 4 git commands to generate.