up to 11.0.0
[packages/opencl-clang.git] / opencl-clang.spec
CommitLineData
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
7Summary: Intel Graphics Compute Runtime for OpenCL
8Name: opencl-clang
16efc543
JP
9Version: 11.0.0
10Release: 1
c7dfe9a1
JK
11License: University of Illinois/NCSA Open Source License
12Group: Libraries
13Source0: https://github.com/intel/opencl-clang/archive/v%{version}/%{name}-%{version}.tar.gz
16efc543 14# Source0-md5: 31e0ca207e06d6bb1a49661cafd8a3ea
c7dfe9a1 15URL: https://01.org/compute-runtime
eac18d9c 16BuildRequires: SPIRV-LLVM-Translator-devel >= %{spirv_llvm_translator_version}
15cf855e 17BuildRequires: clang >= %{llvm_rpm_version}
5b943348 18BuildRequires: clang-devel >= %{llvm_version}
c7dfe9a1 19BuildRequires: cmake >= 3.4.3
5b943348 20BuildRequires: llvm-devel >= %{llvm_version}
c7dfe9a1 21BuildRequires: pkgconfig
c7dfe9a1
JK
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
15cf855e 33%requires_eq clang-devel
c7dfe9a1
JK
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
c7dfe9a1
JK
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}" \
0a767a56 53 -DGIT_EXECUTABLE=/bin/false \
c7dfe9a1
JK
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
16efc543
JP
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
c7dfe9a1
JK
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}
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
This page took 0.121459 seconds and 4 git commands to generate.