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