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