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