]>
Commit | Line | Data |
---|---|---|
778c937e JB |
1 | # TODO: |
2 | # - what should provide GL headers when %{with default_gl}? packages with khronos headers alone? | |
3 | # | |
4 | # Conditional build: | |
5 | %bcond_with default_gl # build dispatcher as default libGL/libGLX/libGLESv1_CM/libGLESv2 provider | |
6 | # | |
7 | Summary: Vendor-neutral OpenGL dispatch library | |
8 | Summary(pl.UTF-8): Niezależna od producenta biblioteka przekazująca wywołania OpenGL | |
9 | Name: libglvnd | |
10 | Version: 0.1.1 | |
11 | Release: 1 | |
12 | License: MIT-like | |
13 | Group: Libraries | |
14 | #Source0Download: https://github.com/NVIDIA/libglvnd/releases | |
15 | Source0: https://github.com/NVIDIA/libglvnd/archive/v%{version}/%{name}-%{version}.tar.gz | |
16 | # Source0-md5: 564820301daf6b4c7d80cbfbc04efc8c | |
17 | URL: https://github.com/NVIDIA/libglvnd | |
18 | BuildRequires: autoconf >= 2.63 | |
19 | BuildRequires: automake >= 1:1.11 | |
20 | BuildRequires: libtool | |
21 | BuildRequires: xorg-lib-libX11-devel | |
22 | BuildRequires: xorg-lib-libXext-devel | |
23 | BuildRequires: xorg-proto-glproto-devel | |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
25 | ||
26 | %if %{with default_gl} | |
27 | %define gl_libdir %{_libdir} | |
28 | %else | |
29 | %define gl_libdir %{_libdir}/%{name} | |
30 | %define noautoprov_files %{_libdir}/%{name} | |
31 | %endif | |
32 | ||
33 | %description | |
34 | This is a work-in-progress implementation of the vendor-neutral | |
35 | dispatch layer for arbitrating OpenGL API calls between multiple | |
36 | vendors on a per-screen basis, as described by Andy Ritger's OpenGL | |
37 | ABI proposal: | |
38 | <https://github.com/aritger/linux-opengl-abi-proposal/blob/master/linux-opengl-abi-proposal.txt>. | |
39 | ||
40 | Currently, only the GLX window-system API and OpenGL are supported, | |
41 | but in the future this library may support EGL and OpenGL ES as well. | |
42 | ||
43 | %description -l pl.UTF-8 | |
44 | Ten pakiet to (będąca w trakcie tworzenia) implementacja warstwy | |
45 | przekazującej wywołania dowolnych wywołań API OpenGL między różnymi | |
46 | producentami w zależności od ekranu, zgodnie z propozycją opisaną | |
47 | przez Andy Ritgera: | |
48 | <https://github.com/aritger/linux-opengl-abi-proposal/blob/master/linux-opengl-abi-proposal.txt>. | |
49 | ||
50 | Obecnie obsługiwane jest tylko API systemu okienek GLX oraz OpenGL, w | |
51 | przyszłości biblioteka może obsługiwać także EGL i OpenGL ES. | |
52 | ||
53 | %package devel | |
54 | Summary: Header files for libglvnd interface | |
55 | Summary(pl.UTF-8): Pliki nagłówkowe interfejsu libglvnd | |
56 | Group: Development/Libraries | |
57 | Requires: %{name} = %{version}-%{release} | |
58 | # <GL/gl.h> | |
59 | Requires: OpenGL-devel | |
60 | # <GL/glx.h> | |
61 | Requires: OpenGL-GLX-devel | |
62 | ||
63 | %description devel | |
64 | Header files for libglvnd interface. | |
65 | ||
66 | %description devel -l pl.UTF-8 | |
67 | Pliki nagłówkowe interfejsu libglvnd. | |
68 | ||
69 | %package libGL | |
70 | Summary: OpenGL 4.x interface glvnd libraries | |
71 | Summary(pl.UTF-8): Biblioteki glvnd interfejsu OpenGL 4.x | |
72 | Group: Libraries | |
73 | Requires: %{name} = %{version}-%{release} | |
74 | ||
75 | %description libGL | |
76 | OpenGL 4.x interface glvnd libraries. | |
77 | ||
78 | %description libGL -l pl.UTF-8 | |
79 | Biblioteki glvnd interfejsu OpenGL 4.x. | |
80 | ||
81 | %package libGL-devel | |
82 | Summary: Development files for glvnd OpenGL 4.x interface | |
83 | Summary(pl.UTF-8): Pliki programistyczne glvnd interfejsu OpenGL 4.x | |
84 | Group: Development/Libraries | |
85 | Requires: %{name}-libGL = %{version}-%{release} | |
86 | #Requires: khronos-OpenGL-headers(?) | |
87 | #%{?with_default_gl:Provides: OpenGL-devel = 4.?} | |
88 | ||
89 | %description libGL-devel | |
90 | Development files for glvnd OpenGL 4.x interface. | |
91 | ||
92 | %description libGL-devel -l pl.UTF-8 | |
93 | Pliki programistyczne glvnd interfejsu OpenGL 4.x. | |
94 | ||
95 | %package libGLES | |
96 | Summary: OpenGL ES 1, 2, 3 interface glvnd libraries | |
97 | Summary(pl.UTF-8): Biblioteki glvnd interfejsów OpenGL ES 1, 2, 3 | |
98 | Group: Libraries | |
99 | Requires: %{name} = %{version}-%{release} | |
100 | ||
101 | %description libGLES | |
102 | OpenGL ES 1, 2, 3 interface glvnd libraries. | |
103 | ||
104 | %description libGLES -l pl.UTF-8 | |
105 | Biblioteki glvnd interfejsów OpenGL ES 1, 2, 3. | |
106 | ||
107 | %package libGLES-devel | |
108 | Summary: Development files for glvnd OpenGL ES 1, 2, 3 interfaces | |
109 | Summary(pl.UTF-8): Pliki programistyczne glvnd interfejsów OpenGL ES 1, 2, 3 | |
110 | Group: Development/Libraries | |
111 | Requires: %{name}-libGLES = %{version}-%{release} | |
112 | #Requires: khronos-OpenGLES-headers(?) | |
113 | %if 0 && %{with default_gl} | |
114 | Provides: OpenGLES-devel | |
115 | Provides: OpenGLESv1-devel = 1.? | |
116 | Provides: OpenGLESv2-devel = 2.? | |
117 | Provides: OpenGLESv3-devel = 3.? | |
118 | %endif | |
119 | ||
120 | %description libGLES-devel | |
121 | Development files for glvnd OpenGL ES 1, 2, 3 interfaces. | |
122 | ||
123 | %description libGLES-devel -l pl.UTF-8 | |
124 | Pliki programistyczne glvnd interfejsów OpenGL ES 1, 2, 3. | |
125 | ||
126 | %prep | |
127 | %setup -q | |
128 | ||
129 | %build | |
130 | %{__libtoolize} | |
131 | %{__aclocal} -I m4 | |
132 | %{__autoconf} | |
133 | %{__autoheader} | |
134 | %{__automake} | |
135 | %configure \ | |
136 | --disable-silent-rules \ | |
137 | %{!?with_static_libs:--disable-static} | |
138 | %{__make} | |
139 | ||
140 | %install | |
141 | rm -rf $RPM_BUILD_ROOT | |
142 | ||
143 | %{__make} install \ | |
144 | DESTDIR=$RPM_BUILD_ROOT | |
145 | ||
146 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la | |
147 | ||
148 | %if %{without default_gl} | |
149 | install -d $RPM_BUILD_ROOT%{gl_libdir} | |
150 | %{__mv} $RPM_BUILD_ROOT%{_libdir}/lib{GL,GLESv1_CM,GLESv2}.* $RPM_BUILD_ROOT%{gl_libdir} | |
151 | %endif | |
152 | ||
153 | %clean | |
154 | rm -rf $RPM_BUILD_ROOT | |
155 | ||
156 | %post -p /sbin/ldconfig | |
157 | %postun -p /sbin/ldconfig | |
158 | ||
159 | %post libGL -p /sbin/ldconfig | |
160 | %postun libGL -p /sbin/ldconfig | |
161 | ||
162 | %post libGLES -p /sbin/ldconfig | |
163 | %postun libGLES -p /sbin/ldconfig | |
164 | ||
165 | %files | |
166 | %defattr(644,root,root,755) | |
167 | %doc README.md | |
168 | %attr(755,root,root) %{_libdir}/libGLdispatch.so.*.*.* | |
169 | %attr(755,root,root) %ghost %{_libdir}/libGLdispatch.so.0 | |
170 | %if %{without default_gl} | |
171 | %dir %{_libdir}/%{name} | |
172 | %endif | |
173 | ||
174 | %files devel | |
175 | %defattr(644,root,root,755) | |
176 | %attr(755,root,root) %{_libdir}/libGLdispatch.so | |
177 | %{_includedir}/glvnd | |
178 | %{_pkgconfigdir}/libglvnd.pc | |
179 | ||
180 | %files libGL | |
181 | %defattr(644,root,root,755) | |
182 | %if %{with default_gl} | |
183 | %attr(755,root,root) %{_libdir}/libGL.so.*.*.* | |
184 | %attr(755,root,root) %ghost %{_libdir}/libGL.so.1 | |
185 | %attr(755,root,root) %{_libdir}/libGL.so | |
186 | %else | |
187 | %attr(755,root,root) %{gl_libdir}/libGL.so.*.*.* | |
188 | %attr(755,root,root) %{gl_libdir}/libGL.so.1 | |
189 | %attr(755,root,root) %{gl_libdir}/libGL.so | |
190 | %endif | |
191 | ||
192 | %attr(755,root,root) %{_libdir}/libGLX.so.*.*.* | |
193 | %attr(755,root,root) %ghost %{_libdir}/libGLX.so.0 | |
194 | ||
195 | %attr(755,root,root) %{_libdir}/libOpenGL.so.*.*.* | |
196 | %attr(755,root,root) %ghost %{_libdir}/libOpenGL.so.0 | |
197 | ||
198 | %files libGL-devel | |
199 | %defattr(644,root,root,755) | |
200 | %attr(755,root,root) %{_libdir}/libGLX.so | |
201 | %attr(755,root,root) %{_libdir}/libOpenGL.so | |
202 | ||
203 | %files libGLES | |
204 | %defattr(644,root,root,755) | |
205 | %if %{with default_gl} | |
206 | %attr(755,root,root) %{_libdir}/libGLESv1_CM.so.*.*.* | |
207 | %attr(755,root,root) %ghost %{_libdir}/libGLESv1_CM.so.1 | |
208 | %attr(755,root,root) %{_libdir}/libGLESv2.so.*.*.* | |
209 | %attr(755,root,root) %ghost %{_libdir}/libGLESv2.so.2 | |
210 | %else | |
211 | %attr(755,root,root) %{gl_libdir}/libGLESv1_CM.so.*.*.* | |
212 | %attr(755,root,root) %{gl_libdir}/libGLESv1_CM.so.1 | |
213 | %attr(755,root,root) %{gl_libdir}/libGLESv2.so.*.*.* | |
214 | %attr(755,root,root) %{gl_libdir}/libGLESv2.so.2 | |
215 | %endif | |
216 | ||
217 | %files libGLES-devel | |
218 | %defattr(644,root,root,755) | |
219 | %attr(755,root,root) %{gl_libdir}/libGLESv1_CM.so | |
220 | %attr(755,root,root) %{gl_libdir}/libGLESv2.so |