]> git.pld-linux.org Git - packages/opencl-clang.git/blob - opencl-clang.spec
- release 2 (by relup.sh)
[packages/opencl-clang.git] / opencl-clang.spec
1
2 # requires the OpenCL patches
3 %define llvm_version 9.0.0
4
5 %define spirv_llvm_translator_version 9.0.0
6
7 Summary:        Intel Graphics Compute Runtime for OpenCL
8 Name:           opencl-clang
9 Version:        9.0.0
10 Release:        2
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
14 # Source0-md5:  ca856bc6ec05fcf3a7d8374d97904b28
15 URL:            https://01.org/compute-runtime
16 BuildRequires:  SPIRV-LLVM-Translator-devel >= %{spirv_llvm_translator_version}
17 BuildRequires:  clang >= %{llvm_rpm_version}
18 BuildRequires:  clang-devel >= %{llvm_version}
19 BuildRequires:  cmake >= 3.4.3
20 BuildRequires:  llvm-devel >= %{llvm_version}
21 BuildRequires:  pkgconfig
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
33 %requires_eq    clang-devel
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
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}" \
53         -DGIT_EXECUTABLE=/bin/false \
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
65 mv $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.9 $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.%{llvm_version}
66 ln -s libopencl-clang.so.%{llvm_version} $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.9
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}
79 %ghost %attr(755,root,root) %{_libdir}/libopencl-clang.so.9
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.078481 seconds and 4 git commands to generate.