]> git.pld-linux.org Git - packages/opencl-clang.git/blob - opencl-clang.spec
a48bf6790cb50242679ca61393ec0ea9abc56d45
[packages/opencl-clang.git] / opencl-clang.spec
1
2 # requires the OpenCL patches
3 %define llvm_version 7.0.1
4 %define llvm_rpm_version %{llvm_version}-3
5
6 %define spirv_llvm_translator_version 7.0.1
7
8 Summary:        Intel Graphics Compute Runtime for OpenCL
9 Name:           opencl-clang
10 Version:        8.0.1
11 Release:        1
12 License:        University of Illinois/NCSA Open Source License
13 Group:          Libraries
14 Source0:        https://github.com/intel/opencl-clang/archive/v%{version}/%{name}-%{version}.tar.gz
15 # Source0-md5:  cb6b746c837a6cac6c8906911b2ea9de
16 Patch0:         llvm_clang_vfs.patch
17 URL:            https://01.org/compute-runtime
18 BuildRequires:  SPIRV-LLVM-Translator-devel >= %{spirv_llvm_translator_version}
19 BuildRequires:  clang >= %{llvm_rpm_version}
20 BuildRequires:  clang-devel >= %{llvm_rpm_version}
21 BuildRequires:  cmake >= 3.4.3
22 BuildRequires:  llvm-devel >= %{llvm_rpm_version}
23 BuildRequires:  pkgconfig
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %description
27 Common clang is a thin wrapper library around clang. Common clang has
28 OpenCL-oriented API and is capable to compile OpenCL C kernels to
29 SPIR-V modules.
30
31 %package devel
32 Summary:        Header files for %{name} library
33 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki %{name}
34 Group:          Development/Libraries
35 %requires_eq    clang-devel
36 Requires:       %{name} = %{version}-%{release}
37
38 %description devel
39 Header files for %{name} library.
40
41 %description devel -l pl.UTF-8
42 Pliki nagłówkowe biblioteki %{name}.
43
44 %prep
45 %setup -q
46
47 %patch0 -p1
48
49 %build
50 install -d build
51 cd build
52 %cmake \
53         -DUSE_PREBUILT_LLVM=ON \
54         -DPREFERRED_LLVM_VERSION="%{llvm_version}" \
55         -DLLVMSPIRV_INCLUDED_IN_LLVM=OFF \
56         -DSPIRV_TRANSLATOR_DIR="%{_prefix}" \
57         -DGIT_EXECUTABLE=/bin/false \
58         ../
59 %{__make}
60
61 cd ..
62
63 %install
64 rm -rf $RPM_BUILD_ROOT
65
66 %{__make} -C build install \
67         DESTDIR=$RPM_BUILD_ROOT
68
69 mv $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.7 $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.%{llvm_version}
70 ln -s libopencl-clang.so.%{llvm_version} $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.7
71 ln -sf libopencl-clang.so.%{llvm_version} $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so
72
73 %post   -p /sbin/ldconfig
74 %postun -p /sbin/ldconfig
75
76 %clean
77 rm -rf $RPM_BUILD_ROOT
78
79 %files
80 %defattr(644,root,root,755)
81 %doc README.md
82 %attr(755,root,root) %{_libdir}/libopencl-clang.so.%{llvm_version}
83 %ghost %attr(755,root,root) %{_libdir}/libopencl-clang.so.7
84
85 %files devel
86 %defattr(644,root,root,755)
87 %attr(755,root,root) %{_libdir}/libopencl-clang.so
88 %{_includedir}/cclang
This page took 0.063526 seconds and 2 git commands to generate.