]> git.pld-linux.org Git - packages/opencl-clang.git/blame - opencl-clang.spec
- llvm rebuild
[packages/opencl-clang.git] / opencl-clang.spec
CommitLineData
c7dfe9a1 1
ac26e2aa 2# requires the OpenCL patches
dd4d3266 3%define llvm_version 10.0.0
ac26e2aa 4
dd4d3266 5%define spirv_llvm_translator_version 10.0.0
c7dfe9a1
JK
6
7Summary: Intel Graphics Compute Runtime for OpenCL
8Name: opencl-clang
dd4d3266 9Version: 10.0.0
d6a28786 10Release: 2
c7dfe9a1
JK
11License: University of Illinois/NCSA Open Source License
12Group: Libraries
13Source0: https://github.com/intel/opencl-clang/archive/v%{version}/%{name}-%{version}.tar.gz
dd4d3266
JP
14# Source0-md5: a28bc82341f0ef4dbf749d2ee5e0a907
15Patch0: llvm10.patch
c7dfe9a1 16URL: https://01.org/compute-runtime
eac18d9c 17BuildRequires: SPIRV-LLVM-Translator-devel >= %{spirv_llvm_translator_version}
15cf855e 18BuildRequires: clang >= %{llvm_rpm_version}
5b943348 19BuildRequires: clang-devel >= %{llvm_version}
c7dfe9a1 20BuildRequires: cmake >= 3.4.3
5b943348 21BuildRequires: llvm-devel >= %{llvm_version}
c7dfe9a1 22BuildRequires: pkgconfig
c7dfe9a1
JK
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
15cf855e 34%requires_eq clang-devel
c7dfe9a1
JK
35Requires: %{name} = %{version}-%{release}
36
37%description devel
38Header files for %{name} library.
39
40%description devel -l pl.UTF-8
41Pliki nagłówkowe biblioteki %{name}.
42
43%prep
44%setup -q
dd4d3266 45%patch0 -p1
c7dfe9a1
JK
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
dd4d3266
JP
67mv $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.10 $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.%{llvm_version}
68ln -s libopencl-clang.so.%{llvm_version} $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.10
c7dfe9a1
JK
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}
dd4d3266 81%ghost %attr(755,root,root) %{_libdir}/libopencl-clang.so.10
c7dfe9a1
JK
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.049598 seconds and 4 git commands to generate.