]> git.pld-linux.org Git - packages/spirv-tools.git/blob - spirv-tools.spec
revert last commit, spirv-headers should be fixed
[packages/spirv-tools.git] / spirv-tools.spec
1
2 %define snap    20161027
3 %define commit  b371439d6fbc6b7b7cd5b4ef7046faa6cdf0e9e2
4 %define _ver    %(echo %{version} | tr _ -)
5 Summary:        SPIR-V Tools
6 Name:           spirv-tools
7 Version:        v2016.6.s%{snap}
8 Release:        2
9 License:        MIT-like
10 Group:          Applications
11 Source0:        https://github.com/KhronosGroup/SPIRV-Tools/archive/%{commit}/%{name}-s%{snap}.tar.gz
12 # Source0-md5:  7312ed45ce0e279aa5829c867ce227e1
13 Patch0:         cmake-lib64.patch
14 Patch1:         no-git-describe.patch
15 URL:            https://github.com/KhronosGroup/SPIRV-Tools
16 BuildRequires:  cmake
17 BuildRequires:  spirv-headers
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
48 Requires:       spirv-headers
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
58 %setup -q -n SPIRV-Tools-%{commit}
59
60 %patch0 -p1
61 %patch1 -p1
62
63 %build
64 install -d build external/spirv-headers/include
65 ln -s /usr/include/spirv external/spirv-headers/include/spirv
66
67 cd build
68 %cmake \
69         ../
70
71 # we know better than utils/update_build_version.py
72 echo '"spirv-tools %{commit}\\n"' > build-version.inc
73
74 %{__make}
75
76 %install
77 rm -rf $RPM_BUILD_ROOT
78
79 cd build
80 %{__make} install \
81         DESTDIR=$RPM_BUILD_ROOT
82 cd ..
83
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
98 %attr(755,root,root) %{_libdir}/libSPIRV-Tools-opt.so
99
100 %files devel
101 %defattr(644,root,root,755)
102 %{_includedir}/spirv-tools
This page took 0.085321 seconds and 3 git commands to generate.