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