]>
Commit | Line | Data |
---|---|---|
d4711bf2 | 1 | |
b502ec5f | 2 | %define llvm_version 12.0.0 |
d4711bf2 JK |
3 | |
4 | Summary: LLVM/SPIR-V Bi-Directional Translator | |
7d626e41 | 5 | Summary(pl.UTF-8): Dwustronny translator LLVM/SPIR-V |
d4711bf2 | 6 | Name: SPIRV-LLVM-Translator |
b502ec5f JP |
7 | Version: 12.0.0 |
8 | Release: 1 | |
d4711bf2 JK |
9 | License: University of Illinois/NCSA Open Source License |
10 | Group: Libraries | |
7d626e41 | 11 | #Source0Download: https://github.com/KhronosGroup/SPIRV-LLVM-Translator/releases |
bbd8a7e7 | 12 | Source0: https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/v%{version}/%{name}-%{version}.tar.gz |
b502ec5f | 13 | # Source0-md5: d1db52b9dc305eebb9ed11a5324c58a3 |
d4711bf2 JK |
14 | # from Intel opencl-clang |
15 | Patch0: 0001-Update-LowerOpenCL-pass-to-handle-new-blocks-represn.patch | |
16 | URL: https://github.com/KhronosGroup/SPIRV-LLVM-Translator/ | |
17 | BuildRequires: cmake >= 3.3 | |
7d626e41 | 18 | BuildRequires: libstdc++-devel >= 6:4.7 |
d4711bf2 JK |
19 | BuildRequires: llvm-devel >= %{llvm_version} |
20 | BuildRequires: pkgconfig | |
c2f28166 | 21 | BuildRequires: rpmbuild(macros) >= 1.605 |
d4711bf2 JK |
22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
23 | ||
24 | %description | |
25 | LLVM/SPIR-V Bi-Directional Translator - a library and tool for | |
26 | translation between LLVM IR and SPIR-V. | |
27 | ||
7d626e41 JB |
28 | %description -l pl.UTF-8 |
29 | Dwustronny translator LLVM/SPIR-V - biblioteka i narzędzie do | |
30 | tłumaczenia między IR LLVM a SPIR-V. | |
31 | ||
d4711bf2 | 32 | %package devel |
7d626e41 JB |
33 | Summary: Header files for LLVMSPIRVLib library |
34 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki LLVMSPIRVLib | |
d4711bf2 JK |
35 | Group: Development/Libraries |
36 | Requires: %{name} = %{version}-%{release} | |
7d626e41 JB |
37 | Requires: libstdc++-devel >= 6:4.7 |
38 | Requires: llvm-devel >= %{llvm_version} | |
d4711bf2 JK |
39 | |
40 | %description devel | |
7d626e41 | 41 | Header files for LLVMSPIRVLib library. |
d4711bf2 JK |
42 | |
43 | %description devel -l pl.UTF-8 | |
7d626e41 | 44 | Pliki nagłówkowe biblioteki LLVMSPIRVLib. |
d4711bf2 JK |
45 | |
46 | %prep | |
bbd8a7e7 | 47 | %setup -qn %{name}-%{version} |
d4711bf2 JK |
48 | |
49 | %build | |
50 | ||
51 | install -d build | |
52 | cd build | |
7d626e41 | 53 | %cmake .. |
d4711bf2 | 54 | |
7d626e41 | 55 | %{__make} |
d4711bf2 JK |
56 | |
57 | %install | |
58 | rm -rf $RPM_BUILD_ROOT | |
59 | ||
60 | %{__make} -C build install \ | |
61 | DESTDIR=$RPM_BUILD_ROOT | |
62 | ||
b502ec5f JP |
63 | %{__mv} $RPM_BUILD_ROOT%{_libdir}/libLLVMSPIRVLib.so.12 $RPM_BUILD_ROOT%{_libdir}/libLLVMSPIRVLib.so.%{version} |
64 | ln -s libLLVMSPIRVLib.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libLLVMSPIRVLib.so.12 | |
d4711bf2 JK |
65 | ln -sf libLLVMSPIRVLib.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libLLVMSPIRVLib.so |
66 | ||
d4711bf2 JK |
67 | %clean |
68 | rm -rf $RPM_BUILD_ROOT | |
69 | ||
70 | %post -p /sbin/ldconfig | |
71 | %postun -p /sbin/ldconfig | |
72 | ||
73 | %files | |
74 | %defattr(644,root,root,755) | |
75 | %doc README.md LICENSE.TXT | |
b502ec5f JP |
76 | %attr(755,root,root) %{_libdir}/libLLVMSPIRVLib.so.12.*.* |
77 | %ghost %attr(755,root,root) %{_libdir}/libLLVMSPIRVLib.so.12 | |
d4711bf2 JK |
78 | |
79 | %files devel | |
80 | %defattr(644,root,root,755) | |
81 | %attr(755,root,root) %{_libdir}/libLLVMSPIRVLib.so | |
82 | %{_includedir}/LLVMSPIRVLib | |
83 | %{_pkgconfigdir}/LLVMSPIRVLib.pc |