]>
Commit | Line | Data |
---|---|---|
af1c7ed7 | 1 | |
85dcd294 JK |
2 | %define snap 20161027 |
3 | %define commit b371439d6fbc6b7b7cd5b4ef7046faa6cdf0e9e2 | |
dc0fdaa7 JK |
4 | %define _ver %(echo %{version} | tr _ -) |
5 | Summary: SPIR-V Tools | |
6 | Name: spirv-tools | |
85dcd294 | 7 | Version: v2016.6.s%{snap} |
43bb1953 | 8 | Release: 2 |
dc0fdaa7 JK |
9 | License: MIT-like |
10 | Group: Applications | |
af1c7ed7 | 11 | Source0: https://github.com/KhronosGroup/SPIRV-Tools/archive/%{commit}/%{name}-s%{snap}.tar.gz |
85dcd294 | 12 | # Source0-md5: 7312ed45ce0e279aa5829c867ce227e1 |
dc0fdaa7 | 13 | Patch0: cmake-lib64.patch |
d0e0a7d3 | 14 | Patch1: no-git-describe.patch |
dc0fdaa7 JK |
15 | URL: https://github.com/KhronosGroup/SPIRV-Tools |
16 | BuildRequires: cmake | |
85dcd294 | 17 | BuildRequires: spirv-headers |
43bb1953 | 18 | BuildConflicts: spirv-tools < v2016.6 |
dc0fdaa7 JK |
19 | Requires: %{name}-libs = %{version}-%{release} |
20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
21 | ||
22 | %description | |
23 | The SPIR-V Tools project provides an API and commands for processing | |
24 | SPIR-V modules. | |
25 | ||
26 | The project includes an assembler, binary module parser, disassembler, | |
27 | and validator for SPIR-V, all based on a common static library. The | |
28 | library contains all of the implementation details, and is used in the | |
29 | standalone tools whilst also enabling integration into other code | |
30 | bases directly. | |
31 | ||
32 | The interfaces are still under development, and are expected to | |
33 | change. | |
34 | ||
35 | SPIR-V is defined by the Khronos Group Inc. | |
36 | ||
37 | %package libs | |
38 | Summary: SPIR-V Tools library | |
39 | Group: Libraries | |
40 | ||
41 | %description libs | |
42 | The SPIR-V Tools project provides an API for processing SPIR-V | |
43 | modules. | |
44 | ||
45 | %package devel | |
46 | Summary: Header files for %{name} library | |
47 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name} | |
48 | Group: Development/Libraries | |
85dcd294 | 49 | Requires: spirv-headers |
dc0fdaa7 JK |
50 | Requires: %{name}-libs = %{version}-%{release} |
51 | ||
52 | %description devel | |
53 | Header files for %{name} library. | |
54 | ||
55 | %description devel -l pl.UTF-8 | |
56 | Pliki nagłówkowe biblioteki %{name}. | |
57 | ||
58 | %prep | |
85dcd294 | 59 | %setup -q -n SPIRV-Tools-%{commit} |
8036bc88 | 60 | |
dc0fdaa7 | 61 | %patch0 -p1 |
d0e0a7d3 | 62 | %patch1 -p1 |
dc0fdaa7 JK |
63 | |
64 | %build | |
85dcd294 JK |
65 | install -d build external/spirv-headers/include |
66 | ln -s /usr/include/spirv external/spirv-headers/include/spirv | |
67 | ||
dc0fdaa7 JK |
68 | cd build |
69 | %cmake \ | |
70 | ../ | |
71 | ||
d0e0a7d3 JK |
72 | # we know better than utils/update_build_version.py |
73 | echo '"spirv-tools %{commit}\\n"' > build-version.inc | |
74 | ||
dc0fdaa7 JK |
75 | %{__make} |
76 | ||
77 | %install | |
78 | rm -rf $RPM_BUILD_ROOT | |
79 | ||
80 | cd build | |
81 | %{__make} install \ | |
82 | DESTDIR=$RPM_BUILD_ROOT | |
625333b6 JK |
83 | cd .. |
84 | ||
dc0fdaa7 JK |
85 | %clean |
86 | rm -rf $RPM_BUILD_ROOT | |
87 | ||
88 | %post libs -p /sbin/ldconfig | |
89 | %postun libs -p /sbin/ldconfig | |
90 | ||
91 | %files | |
92 | %defattr(644,root,root,755) | |
93 | %doc LICENSE README.md syntax.md | |
94 | %attr(755,root,root) %{_bindir}/spirv-* | |
95 | ||
96 | %files libs | |
97 | %defattr(644,root,root,755) | |
98 | %attr(755,root,root) %{_libdir}/libSPIRV-Tools.so | |
85dcd294 | 99 | %attr(755,root,root) %{_libdir}/libSPIRV-Tools-opt.so |
dc0fdaa7 JK |
100 | |
101 | %files devel | |
102 | %defattr(644,root,root,755) | |
dc0fdaa7 | 103 | %{_includedir}/spirv-tools |