]> git.pld-linux.org Git - packages/libglvnd.git/blob - libglvnd.spec
package %{_datadir}/glvnd/{,egl_vendor.d}
[packages/libglvnd.git] / libglvnd.spec
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:        1.0.0
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:  5145758075fddaf8ea682b7ae792ed2f
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)
28
29 %if %{with default_gl}
30 %define         gl_libdir       %{_libdir}
31 %else
32 %define         gl_libdir       %{_libdir}/%{name}
33 %define         noautoprov_files        %{_libdir}/%{name}
34 %endif
35 # _glapi_tls_Current symbol
36 %define         skip_post_check_so      libOpenGL.so.* libGL.so.* libGLESv1_CM.so.* libGLESv2.so.*
37
38 %description
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
42 ABI proposal:
43 <https://github.com/aritger/linux-opengl-abi-proposal/blob/master/linux-opengl-abi-proposal.txt>.
44
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.
47
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ą
52 przez Andy Ritgera:
53 <https://github.com/aritger/linux-opengl-abi-proposal/blob/master/linux-opengl-abi-proposal.txt>.
54
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.
57
58 %package devel
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}
63 # <GL/gl.h>
64 Requires:       OpenGL-devel
65 # <GL/glx.h>
66 Requires:       OpenGL-GLX-devel
67
68 %description devel
69 Header files for libglvnd interface.
70
71 %description devel -l pl.UTF-8
72 Pliki nagłówkowe interfejsu libglvnd.
73
74 %package libEGL
75 Summary:        EGL interface glvnd libraries
76 Summary(pl.UTF-8):      Biblioteki glvnd interfejsu EGL
77 Group:          Libraries
78 Requires:       %{name} = %{version}-%{release}
79
80 %description libEGL
81 EGL interface glvnd libraries.
82
83 %description libEGL -l pl.UTF-8
84 Biblioteki glvnd interfejsu EGL.
85
86 %package libEGL-devel
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 = ?}
93
94 %description libEGL-devel
95 Development files for glvnd EGL interface.
96
97 %description libEGL-devel -l pl.UTF-8
98 Pliki programistyczne glvnd interfejsu EGL.
99
100 %package libGL
101 Summary:        OpenGL 4.x interface glvnd libraries
102 Summary(pl.UTF-8):      Biblioteki glvnd interfejsu OpenGL 4.x
103 Group:          Libraries
104 Requires:       %{name} = %{version}-%{release}
105
106 %description libGL
107 OpenGL 4.x interface glvnd libraries.
108
109 %description libGL -l pl.UTF-8
110 Biblioteki glvnd interfejsu OpenGL 4.x.
111
112 %package libGL-devel
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.?}
119
120 %description libGL-devel
121 Development files for glvnd OpenGL 4.x interface.
122
123 %description libGL-devel -l pl.UTF-8
124 Pliki programistyczne glvnd interfejsu OpenGL 4.x.
125
126 %package libGLES
127 Summary:        OpenGL ES 1, 2, 3 interface glvnd libraries
128 Summary(pl.UTF-8):      Biblioteki glvnd interfejsów OpenGL ES 1, 2, 3
129 Group:          Libraries
130 Requires:       %{name} = %{version}-%{release}
131
132 %description libGLES
133 OpenGL ES 1, 2, 3 interface glvnd libraries.
134
135 %description libGLES -l pl.UTF-8
136 Biblioteki glvnd interfejsów OpenGL ES 1, 2, 3.
137
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.?
149 %endif
150
151 %description libGLES-devel
152 Development files for glvnd OpenGL ES 1, 2, 3 interfaces.
153
154 %description libGLES-devel -l pl.UTF-8
155 Pliki programistyczne glvnd interfejsów OpenGL ES 1, 2, 3.
156
157 %prep
158 %setup -q
159
160 %build
161 %{__libtoolize}
162 %{__aclocal} -I m4
163 %{__autoconf}
164 %{__autoheader}
165 %{__automake}
166 %configure \
167         CFLAGS="%{rpmcflags} -O1" \
168         --disable-silent-rules \
169         %{!?with_static_libs:--disable-static}
170 %{__make}
171
172 %install
173 rm -rf $RPM_BUILD_ROOT
174
175 %{__make} install \
176         DESTDIR=$RPM_BUILD_ROOT
177
178 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
179
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}
183 %endif
184
185 install -d $RPM_BUILD_ROOT%{_datadir}/glvnd/egl_vendor.d
186
187 %clean
188 rm -rf $RPM_BUILD_ROOT
189
190 %post   -p /sbin/ldconfig
191 %postun -p /sbin/ldconfig
192
193 %if %{with default_gl}
194 %post   libEGL -p /sbin/ldconfig
195 %postun libEGL -p /sbin/ldconfig
196
197 %post   libGL -p /sbin/ldconfig
198 %postun libGL -p /sbin/ldconfig
199
200 %post   libGLES -p /sbin/ldconfig
201 %postun libGLES -p /sbin/ldconfig
202 %endif
203
204 %files
205 %defattr(644,root,root,755)
206 %doc README.md
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}
211 %endif
212 %dir %{_datadir}/glvnd
213
214 %files devel
215 %defattr(644,root,root,755)
216 %attr(755,root,root) %{_libdir}/libGLdispatch.so
217 %{_includedir}/glvnd
218 %{_pkgconfigdir}/libglvnd.pc
219
220 %files libEGL
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
225 %else
226 %attr(755,root,root) %{gl_libdir}/libEGL.so.*.*.*
227 %attr(755,root,root) %{gl_libdir}/libEGL.so.1
228 %endif
229 %dir %{_datadir}/glvnd/egl_vendor.d
230
231 %files libEGL-devel
232 %defattr(644,root,root,755)
233 %attr(755,root,root) %{gl_libdir}/libEGL.so
234
235 %files libGL
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
241 %else
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
245 %endif
246
247 %attr(755,root,root) %{_libdir}/libGLX.so.*.*.*
248 %attr(755,root,root) %ghost %{_libdir}/libGLX.so.0
249
250 %attr(755,root,root) %{_libdir}/libOpenGL.so.*.*.*
251 %attr(755,root,root) %ghost %{_libdir}/libOpenGL.so.0
252
253 %files libGL-devel
254 %defattr(644,root,root,755)
255 %attr(755,root,root) %{_libdir}/libGLX.so
256 %attr(755,root,root) %{_libdir}/libOpenGL.so
257
258 %files libGLES
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
265 %else
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
270 %endif
271
272 %files libGLES-devel
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
This page took 0.738142 seconds and 3 git commands to generate.