]>
Commit | Line | Data |
---|---|---|
d4711bf2 | 1 | |
26ee0b68 | 2 | %define llvm_version 13.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 |
26ee0b68 | 7 | Version: 13.0.0 |
b502ec5f | 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 |
26ee0b68 | 13 | # Source0-md5: cbb2be6155fda636dd1e4db09dfb1261 |
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 |
26ee0b68 | 22 | BuildRequires: spirv-headers >= 1.5.4-3 |
d4711bf2 JK |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
24 | ||
25 | %description | |
26 | LLVM/SPIR-V Bi-Directional Translator - a library and tool for | |
27 | translation between LLVM IR and SPIR-V. | |
28 | ||
7d626e41 JB |
29 | %description -l pl.UTF-8 |
30 | Dwustronny translator LLVM/SPIR-V - biblioteka i narzędzie do | |
31 | tłumaczenia między IR LLVM a SPIR-V. | |
32 | ||
d4711bf2 | 33 | %package devel |
7d626e41 JB |
34 | Summary: Header files for LLVMSPIRVLib library |
35 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki LLVMSPIRVLib | |
d4711bf2 JK |
36 | Group: Development/Libraries |
37 | Requires: %{name} = %{version}-%{release} | |
7d626e41 JB |
38 | Requires: libstdc++-devel >= 6:4.7 |
39 | Requires: llvm-devel >= %{llvm_version} | |
d4711bf2 JK |
40 | |
41 | %description devel | |
7d626e41 | 42 | Header files for LLVMSPIRVLib library. |
d4711bf2 JK |
43 | |
44 | %description devel -l pl.UTF-8 | |
7d626e41 | 45 | Pliki nagłówkowe biblioteki LLVMSPIRVLib. |
d4711bf2 JK |
46 | |
47 | %prep | |
bbd8a7e7 | 48 | %setup -qn %{name}-%{version} |
d4711bf2 JK |
49 | |
50 | %build | |
51 | ||
52 | install -d build | |
53 | cd build | |
26ee0b68 JP |
54 | %cmake .. \ |
55 | -DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=/usr/include/spirv/unified1 | |
d4711bf2 | 56 | |
7d626e41 | 57 | %{__make} |
d4711bf2 JK |
58 | |
59 | %install | |
60 | rm -rf $RPM_BUILD_ROOT | |
61 | ||
62 | %{__make} -C build install \ | |
63 | DESTDIR=$RPM_BUILD_ROOT | |
64 | ||
26ee0b68 JP |
65 | %{__mv} $RPM_BUILD_ROOT%{_libdir}/libLLVMSPIRVLib.so.13 $RPM_BUILD_ROOT%{_libdir}/libLLVMSPIRVLib.so.%{version} |
66 | ln -s libLLVMSPIRVLib.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libLLVMSPIRVLib.so.13 | |
d4711bf2 JK |
67 | ln -sf libLLVMSPIRVLib.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libLLVMSPIRVLib.so |
68 | ||
d4711bf2 JK |
69 | %clean |
70 | rm -rf $RPM_BUILD_ROOT | |
71 | ||
72 | %post -p /sbin/ldconfig | |
73 | %postun -p /sbin/ldconfig | |
74 | ||
75 | %files | |
76 | %defattr(644,root,root,755) | |
77 | %doc README.md LICENSE.TXT | |
26ee0b68 JP |
78 | %attr(755,root,root) %{_libdir}/libLLVMSPIRVLib.so.13.*.* |
79 | %ghost %attr(755,root,root) %{_libdir}/libLLVMSPIRVLib.so.13 | |
d4711bf2 JK |
80 | |
81 | %files devel | |
82 | %defattr(644,root,root,755) | |
83 | %attr(755,root,root) %{_libdir}/libLLVMSPIRVLib.so | |
84 | %{_includedir}/LLVMSPIRVLib | |
85 | %{_pkgconfigdir}/LLVMSPIRVLib.pc |