]>
Commit | Line | Data |
---|---|---|
b97285fb JK |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # build with tests | |
4 | # | |
5 | Summary: Khronos reference front-end for GLSL and ESSL | |
6 | Name: glslang | |
7 | Version: 3.0 | |
8 | Release: 0.1 | |
9 | License: BSD-like | |
10 | Group: Applications/Graphics | |
11 | Source0: https://github.com/KhronosGroup/glslang/archive/%{version}/%{name}-%{version}.tar.gz | |
12 | # Source0-md5: f8c8cf31836790f6c1571694f78ec6db | |
13 | URL: https://github.com/KhronosGroup/glslang | |
14 | BuildRequires: cmake | |
15 | BuildRequires: llvm-devel | |
16 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
17 | ||
18 | %description | |
19 | An OpenGL and OpenGL ES shader front end and validator. | |
20 | ||
21 | %package devel | |
22 | Summary: Khronos reference front-end library for GLSL and ESSL | |
23 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name} | |
24 | Group: Development/Libraries | |
25 | ||
26 | %description devel | |
27 | A front-end library for programmatic parsing of GLSL/ESSL into an AST. | |
28 | ||
29 | %prep | |
30 | %setup -q | |
31 | ||
32 | %build | |
33 | install -d build | |
34 | cd build | |
35 | %cmake \ | |
36 | ../ | |
37 | %{__make} | |
38 | %{__make} install | |
39 | ||
40 | %if %{with tests} | |
41 | install/bin/glslangValidator -i ../Test/sample.vert ../Test/sample.frag | |
42 | %endif | |
43 | ||
44 | %install | |
45 | rm -rf $RPM_BUILD_ROOT | |
46 | ||
47 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}} | |
48 | ||
49 | cd build | |
50 | cp -p install/bin/* $RPM_BUILD_ROOT%{_bindir} | |
51 | cp -p install/lib/* $RPM_BUILD_ROOT%{_libdir} | |
52 | cd .. | |
53 | ||
54 | install -d $RPM_BUILD_ROOT%{_includedir}/%{name}/{SPIRV,glslang/{Include,MachineIndependent/preprocessor,OSDependent/Linux,Public}} | |
55 | cp -p SPIRV/{*.h,*.hpp} $RPM_BUILD_ROOT%{_includedir}/%{name}/SPIRV | |
56 | cp -p glslang/Include/*.h $RPM_BUILD_ROOT%{_includedir}/%{name}/glslang/Include | |
57 | cp -p glslang/MachineIndependent/*.h $RPM_BUILD_ROOT%{_includedir}/%{name}/glslang/MachineIndependent | |
58 | cp -p glslang/MachineIndependent/preprocessor/*.h $RPM_BUILD_ROOT%{_includedir}/%{name}/glslang/MachineIndependent/preprocessor | |
59 | cp -p glslang/OSDependent/Linux/*.h $RPM_BUILD_ROOT%{_includedir}/%{name}/glslang/OSDependent/Linux | |
60 | cp -p glslang/Public/*.h $RPM_BUILD_ROOT%{_includedir}/%{name}/glslang/Public | |
61 | ||
62 | %clean | |
63 | rm -rf $RPM_BUILD_ROOT | |
64 | ||
65 | %files | |
66 | %defattr(644,root,root,755) | |
67 | %doc README-spirv-remap.txt | |
68 | %attr(755,root,root) %{_bindir}/* | |
69 | ||
70 | %files devel | |
71 | %defattr(644,root,root,755) | |
72 | %doc README.md Todo.txt | |
73 | %{_libdir}/*.a | |
74 | %{_includedir}/%{name} |