]> git.pld-linux.org Git - packages/opencl-clang.git/blame - opencl-clang.spec
up to final 12.0.0
[packages/opencl-clang.git] / opencl-clang.spec
CommitLineData
c7dfe9a1 1
ac26e2aa 2# requires the OpenCL patches
2b3682a3 3%define llvm_version 12.0.0
ac26e2aa 4
2b3682a3
JP
5%define spirv_llvm_translator_version 12.0.0
6
c7dfe9a1
JK
7Summary: Intel Graphics Compute Runtime for OpenCL
8Name: opencl-clang
2b3682a3 9Version: 12.0.0
649fde22 10Release: 1
c7dfe9a1
JK
11License: University of Illinois/NCSA Open Source License
12Group: Libraries
649fde22
JP
13Source0: https://github.com/intel/opencl-clang/archive/v%{version}/%{name}-%{version}.tar.gz
14# Source0-md5: e8abbdba2d39f3f090d949dd8fc4737b
c7dfe9a1 15URL: https://01.org/compute-runtime
eac18d9c 16BuildRequires: SPIRV-LLVM-Translator-devel >= %{spirv_llvm_translator_version}
15cf855e 17BuildRequires: clang >= %{llvm_rpm_version}
5b943348 18BuildRequires: clang-devel >= %{llvm_version}
c7dfe9a1 19BuildRequires: cmake >= 3.4.3
5b943348 20BuildRequires: llvm-devel >= %{llvm_version}
c7dfe9a1 21BuildRequires: pkgconfig
77ea7f96 22BuildRequires: rpmbuild(macros) >= 1.605
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
649fde22 44%setup -q
c7dfe9a1
JK
45
46%build
47install -d build
48cd build
49%cmake \
50 -DUSE_PREBUILT_LLVM=ON \
51 -DPREFERRED_LLVM_VERSION="%{llvm_version}" \
52 -DLLVMSPIRV_INCLUDED_IN_LLVM=OFF \
53 -DSPIRV_TRANSLATOR_DIR="%{_prefix}" \
0a767a56 54 -DGIT_EXECUTABLE=/bin/false \
c7dfe9a1
JK
55 ../
56%{__make}
57
58cd ..
59
60%install
61rm -rf $RPM_BUILD_ROOT
62
63%{__make} -C build install \
64 DESTDIR=$RPM_BUILD_ROOT
65
2b3682a3
JP
66mv $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.12 $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.%{llvm_version}
67ln -s libopencl-clang.so.%{llvm_version} $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.12
c7dfe9a1
JK
68ln -sf libopencl-clang.so.%{llvm_version} $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so
69
70%post -p /sbin/ldconfig
71%postun -p /sbin/ldconfig
72
73%clean
74rm -rf $RPM_BUILD_ROOT
75
76%files
77%defattr(644,root,root,755)
78%doc README.md
79%attr(755,root,root) %{_libdir}/libopencl-clang.so.%{llvm_version}
2b3682a3 80%ghost %attr(755,root,root) %{_libdir}/libopencl-clang.so.12
c7dfe9a1
JK
81
82%files devel
83%defattr(644,root,root,755)
84%attr(755,root,root) %{_libdir}/libopencl-clang.so
85%{_includedir}/cclang
This page took 0.070021 seconds and 4 git commands to generate.