2 # - what should provide GL headers when %{with default_gl}? packages with khronos headers alone?
5 %bcond_with default_gl # build dispatcher as default libGL/libGLX/libGLESv1_CM/libGLESv2 provider
7 Summary: Vendor-neutral OpenGL dispatch library
8 Summary(pl.UTF-8): Niezależna od producenta biblioteka przekazująca wywołania OpenGL
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: 5ed9218738892d5865cd68ce9cdcd5c3
17 URL: https://github.com/NVIDIA/libglvnd
18 BuildRequires: autoconf >= 2.63
19 BuildRequires: automake >= 1:1.11
20 BuildRequires: libtool
21 BuildRequires: pkgconfig
22 BuildRequires: python >= 1:2.7
23 BuildRequires: python-modules >= 1:2.7
24 BuildRequires: xorg-lib-libX11-devel
25 BuildRequires: xorg-lib-libXext-devel
26 BuildRequires: xorg-proto-glproto-devel
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 %if %{with default_gl}
30 %define gl_libdir %{_libdir}
32 %define gl_libdir %{_libdir}/%{name}
33 %define noautoprov_files %{_libdir}/%{name}
35 # _glapi_tls_Current symbol
36 %define skip_post_check_so libOpenGL.so.* libGL.so.* libGLESv1_CM.so.* libGLESv2.so.*
39 This is a work-in-progress implementation of the vendor-neutral
40 dispatch layer for arbitrating OpenGL API calls between multiple
41 vendors on a per-screen basis, as described by Andy Ritger's OpenGL
43 <https://github.com/aritger/linux-opengl-abi-proposal/blob/master/linux-opengl-abi-proposal.txt>.
45 Currently, only the GLX window-system API and OpenGL are supported,
46 but in the future this library may support EGL and OpenGL ES as well.
48 %description -l pl.UTF-8
49 Ten pakiet to (będąca w trakcie tworzenia) implementacja warstwy
50 przekazującej wywołania dowolnych wywołań API OpenGL między różnymi
51 producentami w zależności od ekranu, zgodnie z propozycją opisaną
53 <https://github.com/aritger/linux-opengl-abi-proposal/blob/master/linux-opengl-abi-proposal.txt>.
55 Obecnie obsługiwane jest tylko API systemu okienek GLX oraz OpenGL, w
56 przyszłości biblioteka może obsługiwać także EGL i OpenGL ES.
59 Summary: Header files for libglvnd interface
60 Summary(pl.UTF-8): Pliki nagłówkowe interfejsu libglvnd
61 Group: Development/Libraries
62 Requires: %{name} = %{version}-%{release}
64 Requires: OpenGL-devel
66 Requires: OpenGL-GLX-devel
69 Header files for libglvnd interface.
71 %description devel -l pl.UTF-8
72 Pliki nagłówkowe interfejsu libglvnd.
75 Summary: EGL interface glvnd libraries
76 Summary(pl.UTF-8): Biblioteki glvnd interfejsu EGL
78 Requires: %{name} = %{version}-%{release}
81 EGL interface glvnd libraries.
83 %description libEGL -l pl.UTF-8
84 Biblioteki glvnd interfejsu EGL.
87 Summary: Development files for glvnd EGL interface
88 Summary(pl.UTF-8): Pliki programistyczne glvnd interfejsu EGL
89 Group: Development/Libraries
90 Requires: %{name}-libEGL = %{version}-%{release}
91 #Requires: khronos-EGL-headers(?)
92 #%{?with_default_gl:Provides: EGL-devel = ?}
94 %description libEGL-devel
95 Development files for glvnd EGL interface.
97 %description libEGL-devel -l pl.UTF-8
98 Pliki programistyczne glvnd interfejsu EGL.
101 Summary: OpenGL 4.x interface glvnd libraries
102 Summary(pl.UTF-8): Biblioteki glvnd interfejsu OpenGL 4.x
104 Requires: %{name} = %{version}-%{release}
107 OpenGL 4.x interface glvnd libraries.
109 %description libGL -l pl.UTF-8
110 Biblioteki glvnd interfejsu OpenGL 4.x.
113 Summary: Development files for glvnd OpenGL 4.x interface
114 Summary(pl.UTF-8): Pliki programistyczne glvnd interfejsu OpenGL 4.x
115 Group: Development/Libraries
116 Requires: %{name}-libGL = %{version}-%{release}
117 #Requires: khronos-OpenGL-headers(?)
118 #%{?with_default_gl:Provides: OpenGL-devel = 4.?}
120 %description libGL-devel
121 Development files for glvnd OpenGL 4.x interface.
123 %description libGL-devel -l pl.UTF-8
124 Pliki programistyczne glvnd interfejsu OpenGL 4.x.
127 Summary: OpenGL ES 1, 2, 3 interface glvnd libraries
128 Summary(pl.UTF-8): Biblioteki glvnd interfejsów OpenGL ES 1, 2, 3
130 Requires: %{name} = %{version}-%{release}
133 OpenGL ES 1, 2, 3 interface glvnd libraries.
135 %description libGLES -l pl.UTF-8
136 Biblioteki glvnd interfejsów OpenGL ES 1, 2, 3.
138 %package libGLES-devel
139 Summary: Development files for glvnd OpenGL ES 1, 2, 3 interfaces
140 Summary(pl.UTF-8): Pliki programistyczne glvnd interfejsów OpenGL ES 1, 2, 3
141 Group: Development/Libraries
142 Requires: %{name}-libGLES = %{version}-%{release}
143 #Requires: khronos-OpenGLES-headers(?)
144 %if 0 && %{with default_gl}
145 Provides: OpenGLES-devel
146 Provides: OpenGLESv1-devel = 1.?
147 Provides: OpenGLESv2-devel = 2.?
148 Provides: OpenGLESv3-devel = 3.?
151 %description libGLES-devel
152 Development files for glvnd OpenGL ES 1, 2, 3 interfaces.
154 %description libGLES-devel -l pl.UTF-8
155 Pliki programistyczne glvnd interfejsów OpenGL ES 1, 2, 3.
167 CFLAGS="%{rpmcflags} -O1" \
168 --disable-silent-rules \
169 %{!?with_static_libs:--disable-static}
173 rm -rf $RPM_BUILD_ROOT
176 DESTDIR=$RPM_BUILD_ROOT
178 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
180 %if %{without default_gl}
181 install -d $RPM_BUILD_ROOT%{gl_libdir}
182 %{__mv} $RPM_BUILD_ROOT%{_libdir}/lib{EGL,GL,GLESv1_CM,GLESv2}.* $RPM_BUILD_ROOT%{gl_libdir}
185 install -d $RPM_BUILD_ROOT%{_datadir}/glvnd/egl_vendor.d
188 rm -rf $RPM_BUILD_ROOT
190 %post -p /sbin/ldconfig
191 %postun -p /sbin/ldconfig
193 %if %{with default_gl}
194 %post libEGL -p /sbin/ldconfig
195 %postun libEGL -p /sbin/ldconfig
197 %post libGL -p /sbin/ldconfig
198 %postun libGL -p /sbin/ldconfig
200 %post libGLES -p /sbin/ldconfig
201 %postun libGLES -p /sbin/ldconfig
205 %defattr(644,root,root,755)
207 %attr(755,root,root) %{_libdir}/libGLdispatch.so.*.*.*
208 %attr(755,root,root) %ghost %{_libdir}/libGLdispatch.so.0
209 %if %{without default_gl}
210 %dir %{_libdir}/%{name}
212 %dir %{_datadir}/glvnd
215 %defattr(644,root,root,755)
216 %attr(755,root,root) %{_libdir}/libGLdispatch.so
218 %{_pkgconfigdir}/libglvnd.pc
221 %defattr(644,root,root,755)
222 %if %{with default_gl}
223 %attr(755,root,root) %{_libdir}/libEGL.so.*.*.*
224 %attr(755,root,root) %ghost %{_libdir}/libEGL.so.1
226 %attr(755,root,root) %{gl_libdir}/libEGL.so.*.*.*
227 %attr(755,root,root) %{gl_libdir}/libEGL.so.1
229 %dir %{_datadir}/glvnd/egl_vendor.d
232 %defattr(644,root,root,755)
233 %attr(755,root,root) %{gl_libdir}/libEGL.so
236 %defattr(644,root,root,755)
237 %if %{with default_gl}
238 %attr(755,root,root) %{_libdir}/libGL.so.*.*.*
239 %attr(755,root,root) %ghost %{_libdir}/libGL.so.1
240 %attr(755,root,root) %{_libdir}/libGL.so
242 %attr(755,root,root) %{gl_libdir}/libGL.so.*.*.*
243 %attr(755,root,root) %{gl_libdir}/libGL.so.1
244 %attr(755,root,root) %{gl_libdir}/libGL.so
247 %attr(755,root,root) %{_libdir}/libGLX.so.*.*.*
248 %attr(755,root,root) %ghost %{_libdir}/libGLX.so.0
250 %attr(755,root,root) %{_libdir}/libOpenGL.so.*.*.*
251 %attr(755,root,root) %ghost %{_libdir}/libOpenGL.so.0
254 %defattr(644,root,root,755)
255 %attr(755,root,root) %{_libdir}/libGLX.so
256 %attr(755,root,root) %{_libdir}/libOpenGL.so
259 %defattr(644,root,root,755)
260 %if %{with default_gl}
261 %attr(755,root,root) %{_libdir}/libGLESv1_CM.so.*.*.*
262 %attr(755,root,root) %ghost %{_libdir}/libGLESv1_CM.so.1
263 %attr(755,root,root) %{_libdir}/libGLESv2.so.*.*.*
264 %attr(755,root,root) %ghost %{_libdir}/libGLESv2.so.2
266 %attr(755,root,root) %{gl_libdir}/libGLESv1_CM.so.*.*.*
267 %attr(755,root,root) %{gl_libdir}/libGLESv1_CM.so.1
268 %attr(755,root,root) %{gl_libdir}/libGLESv2.so.*.*.*
269 %attr(755,root,root) %{gl_libdir}/libGLESv2.so.2
273 %defattr(644,root,root,755)
274 %attr(755,root,root) %{gl_libdir}/libGLESv1_CM.so
275 %attr(755,root,root) %{gl_libdir}/libGLESv2.so