]> git.pld-linux.org Git - packages/opencl-clang.git/blame - opencl-clang.spec
another fix to the LLVM/Clang dependencies
[packages/opencl-clang.git] / opencl-clang.spec
CommitLineData
c7dfe9a1 1
ac26e2aa 2# requires the OpenCL patches
15cf855e
JK
3%define llvm_version 7.0.1
4%define llvm_rpm_version %{llvm_version}-3
ac26e2aa 5
c7dfe9a1
JK
6%define spirv_llvm_translator_version 7.0.1
7
8Summary: Intel Graphics Compute Runtime for OpenCL
9Name: opencl-clang
10Version: 8.0.1
11Release: 1
12License: University of Illinois/NCSA Open Source License
13Group: Libraries
14Source0: https://github.com/intel/opencl-clang/archive/v%{version}/%{name}-%{version}.tar.gz
15# Source0-md5: cb6b746c837a6cac6c8906911b2ea9de
16Patch0: llvm_clang_vfs.patch
17URL: https://01.org/compute-runtime
eac18d9c 18BuildRequires: SPIRV-LLVM-Translator-devel >= %{spirv_llvm_translator_version}
15cf855e
JK
19BuildRequires: clang >= %{llvm_rpm_version}
20BuildRequires: clang-devel >= %{llvm_rpm_version}
c7dfe9a1 21BuildRequires: cmake >= 3.4.3
15cf855e 22BuildRequires: llvm-devel >= %{llvm_rpm_version}
c7dfe9a1 23BuildRequires: pkgconfig
c7dfe9a1
JK
24BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26%description
27Common clang is a thin wrapper library around clang. Common clang has
28OpenCL-oriented API and is capable to compile OpenCL C kernels to
29SPIR-V modules.
30
31%package devel
32Summary: Header files for %{name} library
33Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name}
34Group: Development/Libraries
15cf855e 35%requires_eq clang-devel
c7dfe9a1
JK
36Requires: %{name} = %{version}-%{release}
37
38%description devel
39Header files for %{name} library.
40
41%description devel -l pl.UTF-8
42Pliki nagłówkowe biblioteki %{name}.
43
44%prep
45%setup -q
46
47%patch0 -p1
48
49%build
50install -d build
51cd 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}" \
0a767a56 57 -DGIT_EXECUTABLE=/bin/false \
c7dfe9a1
JK
58 ../
59%{__make}
60
61cd ..
62
63%install
64rm -rf $RPM_BUILD_ROOT
65
66%{__make} -C build install \
67 DESTDIR=$RPM_BUILD_ROOT
68
69mv $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.7 $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.%{llvm_version}
70ln -s libopencl-clang.so.%{llvm_version} $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.7
71ln -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
77rm -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.073537 seconds and 4 git commands to generate.