]> git.pld-linux.org Git - packages/Mesa.git/blob - Mesa.spec
- split libGL/libGLU/libGLw/utils
[packages/Mesa.git] / Mesa.spec
1 #
2 # TODO:
3 # - separate libGL/libGLU/libGLw,progs?
4 #
5 # Conditional build:
6 %bcond_with     glide   # with GLIDE (broken now)
7 %bcond_without  motif   # build static libGLw without Motif interface
8 #
9 Summary:        Free OpenGL implementation
10 Summary(pl):    Wolnodostêpna implementacja standardu OpenGL
11 Name:           Mesa
12 Version:        6.4
13 Release:        1.1
14 License:        MIT (core), SGI (GLU,libGLw) and others - see COPYRIGHT file
15 Group:          X11/Libraries
16 Source0:        http://dl.sourceforge.net/mesa3d/%{name}Lib-%{version}.tar.bz2
17 # Source0-md5:  85a84e47a3f718f752f306b9e0954ef6
18 Source1:        http://dl.sourceforge.net/mesa3d/%{name}Demos-%{version}.tar.bz2
19 # Source1-md5:  1a8c4d4fc699233f5fdb902b8753099e
20 URL:            http://www.mesa3d.org/
21 %{?with_glide:BuildRequires:    Glide3-DRI-devel}
22 BuildRequires:  expat-devel
23 BuildRequires:  libdrm-devel >= 1.0.4-1.20051022
24 BuildRequires:  libstdc++-devel
25 BuildRequires:  libtool >= 2:1.4d
26 %{?with_motif:BuildRequires:    motif-devel}
27 BuildRequires:  sed >= 4.0
28 BuildRequires:  xorg-lib-libXxf86vm-devel
29 BuildRequires:  xorg-proto-glproto-devel
30 BuildRequires:  xorg-util-makedepend
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 # avoid XFree86-OpenGL* dependency
34 # Glide3 can be provided by Glide_V3-DRI or Glide_V5-DRI
35 %define         _noautoreqdep   libGL.so.1 libGLU.so.1 libOSMesa.so.4   libglide3.so.3
36
37 %define         _sysconfdir     /etc/X11
38
39 %description
40 Mesa is a 3-D graphics library with an API which is very similar to
41 that of OpenGL(R). To the extent that Mesa utilizes the OpenGL command
42 syntax or state machine, it is being used with authorization from
43 Silicon Graphics, Inc. However, the author does not possess an OpenGL
44 license from SGI, and makes no claim that Mesa is in any way a
45 compatible replacement for OpenGL or associated with SGI.
46
47 %description -l pl
48 Mesa jest bibliotek± grafiki 3D z API bardzo podobnym do OpenGL(R). Do
49 tego stopnia, ¿e Mesa u¿ywa sk³adni i automatu OpenGL jest u¿ywana z
50 autoryzacj± Silicon Graphics, Inc. Jednak autor nie posiada licencji
51 OpenGL od SGI i nie twierdzi, ¿e Mesa jest kompatybilnym zamiennikiem
52 OpenGL ani powi±zana z SGI.
53
54 %package libGL
55 Summary:        Free Mesa3D implementation of libGL OpenGL library
56 Summary(pl):    Wolnodostêpna implementacja Mesa3D biblioteki libGL ze standardu OpenGL
57 License:        MIT
58 Group:          X11/Libraries
59 %{?with_glide:Requires: Glide3-DRI}
60 Provides:       OpenGL = 1.5
61 # reports version 1.3, but supports glXGetProcAddress() from 1.4
62 Provides:       OpenGL-GLX = 1.4
63 Obsoletes:      XFree86-OpenGL-libGL
64
65 %description libGL
66 Mesa is a 3-D graphics library with an API which is very similar to
67 that of OpenGL(R). To the extent that Mesa utilizes the OpenGL command
68 syntax or state machine, it is being used with authorization from
69 Silicon Graphics, Inc. However, the author does not possess an OpenGL
70 license from SGI, and makes no claim that Mesa is in any way a
71 compatible replacement for OpenGL or associated with SGI.
72
73 This package contains libGL which implements OpenGL 1.5 and GLX 1.4
74 specifications. It uses DRI for rendering.
75
76 %description libGL -l pl
77 Mesa jest bibliotek± grafiki 3D z API bardzo podobnym do OpenGL(R). Do
78 tego stopnia, ¿e Mesa u¿ywa sk³adni i automatu OpenGL jest u¿ywana z
79 autoryzacj± Silicon Graphics, Inc. Jednak autor nie posiada licencji
80 OpenGL od SGI i nie twierdzi, ¿e Mesa jest kompatybilnym zamiennikiem
81 OpenGL ani powi±zana z SGI.
82
83 Ten pakiet zawiera libGL implementuj±c± specyfikacje OpenGL 1.5 oraz
84 GLX 1.4. U¿ywa DRI do renderowania.
85
86 %package libGL-devel
87 Summary:        Header files for Mesa3D libGL library
88 Summary(pl):    Pliki nag³ówkowe biblioteki libGL z projektu Mesa3D
89 License:        MIT
90 Group:          X11/Development/Libraries
91 # loose dependency on libGL to use with other libGL binaries
92 Requires:       OpenGL >= 1.5
93 Requires:       xorg-lib-libX11-devel
94 Provides:       OpenGL-devel = 1.5
95 Provides:       OpenGL-GLX-devel = 1.4
96 Obsoletes:      Mesa-devel
97 Obsoletes:      XFree86-OpenGL-devel
98 Obsoletes:      XFree86-OpenGL-devel-base
99
100 %description libGL-devel
101 Header files for Mesa3D libGL library.
102
103 %description libGL-devel -l pl
104 Pliki nag³ówkowe biblioteki libGL z projektu Mesa3D.
105
106 %package libGL-static
107 Summary:        Static Mesa3D libGL library
108 Summary(pl):    Statyczna biblioteka libGL z projektu Mesa3D
109 License:        MIT
110 Group:          X11/Development/Libraries
111 Requires:       %{name}-libGL-devel = %{version}-%{release}
112 Provides:       OpenGL-static = 1.5
113 Obsoletes:      Mesa-static
114
115 %description libGL-static
116 Static Mesa3D libGL library. It uses software renderer.
117
118 %description libGL-static -l pl
119 Statyczna biblioteka libGL z projektu Mesa3D. U¿ywa programowego
120 renderingu.
121
122 %package libGLU
123 Summary:        SGI implementation of libGLU OpenGL library
124 Summary(pl):    Implementacja SGI biblioteki libGLU ze standardu OpenGL
125 License:        SGI Free Software License B v1.1
126 Group:          Libraries
127 # loose dependency on libGL.so.1 to use with other libGL binaries
128 Requires:       OpenGL >= 1.2
129 Provides:       OpenGL-GLU = 1.3
130 Obsoletes:      Mesa-devel
131 Obsoletes:      XFree86-OpenGL-libs
132
133 %description libGLU
134 SGI implementation of libGLU OpenGL library. It implements OpenGL GLU
135 1.3 specifications.
136
137 %description libGLU -l pl
138 Implementacja SGI biblioteki libGLU ze standardu OpenGL. Implementuje
139 specyfikacjê OpenGL GLU 1.3.
140
141 %package libGLU-devel
142 Summary:        Header files for SGI libGLU library
143 Summary(pl):    Pliki nag³ówkowe biblioteki SGI libGLU
144 License:        SGI Free Software License B v1.1
145 Group:          Development/Libraries
146 Requires:       %{name}-libGLU = %{version}-%{release}
147 Requires:       OpenGL-devel >= 1.2
148 Requires:       libstdc++-devel
149 Provides:       OpenGL-GLU-devel = 1.3
150
151 %description libGLU-devel
152 Header files for SGI libGLU library.
153
154 %description libGLU-devel -l pl
155 Pliki nag³ówkowe biblioteki SGI libGLU.
156
157 %package libGLU-static
158 Summary:        Static SGI libGLU library
159 Summary(pl):    Statyczna biblioteka SGI libGLU
160 License:        SGI Free Software License B v1.1
161 Group:          Development/Libraries
162 Requires:       %{name}-libGLU-devel = %{version}-%{release}
163 Provides:       OpenGL-GLU-static = 1.3
164
165 %description libGLU-static
166 Static SGI libGLU library.
167
168 %description libGLU-static -l pl
169 Statyczna biblioteka SGI libGLU.
170
171 %package libGLw
172 Summary:        SGI OpenGL Xt widgets library
173 Summary(pl):    Biblioteka SGI widgetów Xt dla OpenGL-a
174 License:        SGI MIT-like
175 Group:          Libraries
176 # loose dependency on libGL.so.1 to use with other libGL binaries
177 Requires:       OpenGL >= 1.1
178 Provides:       OpenGL-GLw
179
180 %description libGLw
181 SGI OpenGL Xt widgets library.
182
183 %description libGLU -l pl
184 Biblioteka SGI widgetów Xt dla OpenGL-a.
185
186 %package libGLw-devel
187 Summary:        Header files for SGI libGLw library
188 Summary(pl):    Pliki nag³ówkowe biblioteki SGI libGLw
189 License:        SGI Free Software License B v1.1
190 Group:          Development/Libraries
191 Requires:       %{name}-libGLw = %{version}-%{release}
192 Requires:       OpenGL-devel >= 1.2
193 Provides:       OpenGL-GLw-devel
194
195 %description libGLw-devel
196 Header files for SGI libGLw library.
197
198 %description libGLw-devel -l pl
199 Pliki nag³ówkowe biblioteki SGI libGLw.
200
201 %package libGLw-static
202 Summary:        Static SGI libGLw library
203 Summary(pl):    Statyczna biblioteka SGI libGLw
204 License:        SGI Free Software License B v1.1
205 Group:          Development/Libraries
206 Requires:       %{name}-libGLw-devel = %{version}-%{release}
207 Provides:       OpenGL-GLw-static
208
209 %description libGLw-static
210 Static SGI libGLw library.
211
212 %description libGLw-static -l pl
213 Statyczna biblioteka SGI libGLw.
214
215 %package utils
216 Summary:        OpenGL utilities from Mesa3D
217 Summary(pl):    Programy narzêdziowe OpenGL z projektu Mesa3D
218 Group:          X11/Applications/Graphisc
219 # loose deps on libGL/libGLU
220
221 %description utils
222 OpenGL utilities from Mesa3D: glxgears and glxinfo.
223
224 %description utils -l pl
225 Programy narzêdziowe OpenGL z projektu Mesa3D: glxgears i glxinfo.
226
227 %package demos
228 Summary:        Mesa Demos
229 Summary(pl):    Programy demonstruj±ce mo¿liwo¶ci bibliotek Mesa
230 Group:          Development/Libraries
231 Requires:       OpenGL-devel
232
233 %description demos
234 Demonstration programs for the Mesa libraries.
235
236 %description demos -l pl
237 Programy demonstracyjne dla bibliotek Mesa.
238
239 %package dri
240 Summary:        X.org DRI drivers
241 Summary(pl):    Sterowniki DRI dla X.org
242 Group:          Development/Libraries
243 Requires:       xorg-xserver-server
244
245 %description dri
246 X.org DRI drivers.
247
248 %description dri -l pl
249 Sterowniki DRI dla X.org.
250
251 #%package dri-driver-ffb ...
252
253 %prep
254 %setup -q -n Mesa-%{version} -b 1
255
256 # fix demos
257 find progs -type f|xargs sed -i -e "s,\.\./images/,%{_examplesdir}/%{name}-%{version}/images/,g"
258
259 %ifnarch sparc sparcv9 sparc64
260 # for sunffb driver - useful on sparc only
261 sed -i -e 's/ ffb$//' configs/linux-dri
262 %endif
263
264 %build
265 %ifarch %{ix86}
266 targ=-x86
267 %else
268 targ=""
269 %endif
270
271 %{__make} linux${targ}-static \
272         CC="%{__cc}" \
273         CXX="%{__cxx}" \
274         OPT_FLAGS="%{rpmcflags}" \
275         XLIB_DIR=%{_libdir} \
276         GLW_SOURCES="GLwDrawA.c%{?with_motif: GLwMDrawA.c}" \
277         SRC_DIRS="mesa glu glw" \
278         PROGRAM_DIRS=
279 mv -f lib lib-static
280 %{__make} clean
281
282 %{__make} linux-dri${targ} \
283         CC="%{__cc}" \
284         CXX="%{__cxx}" \
285         MKDEP=makedepend \
286         OPT_FLAGS="%{rpmcflags}" \
287         XLIB_DIR=%{_libdir} \
288         SRC_DIRS="glx/x11 mesa glu glw" \
289         PROGRAM_DIRS=
290 mv -f lib lib-dri
291 %{__make} clean \
292         MKDEP=makedepend
293
294 %{__make} linux${targ} \
295         CC="%{__cc}" \
296         CXX="%{__cxx}" \
297         OPT_FLAGS="%{rpmcflags}" \
298         XLIB_DIR=%{_libdir} \
299         SRC_DIRS="mesa" \
300         PROGRAM_DIRS=
301
302 %{__make} -C progs/xdemos \
303         CC="%{__cc}" \
304         CXX="%{__cxx}" \
305         OPT_FLAGS="%{rpmcflags}" \
306         XLIB_DIR=%{_libdir} \
307         PROGS="glxgears" \
308         APP_LIB_DEPS="-L\$(LIB_DIR) -lGL"
309
310 %{__make} -C progs/xdemos \
311         CC="%{__cc}" \
312         CXX="%{__cxx}" \
313         OPT_FLAGS="%{rpmcflags}" \
314         XLIB_DIR=%{_libdir} \
315         PROGS="glxinfo" \
316         APP_LIB_DEPS="-L\$(LIB_DIR) -lGLU -lGL"
317
318 %install
319 rm -rf $RPM_BUILD_ROOT
320 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}/GL,%{_examplesdir}/%{name}-%{version}}
321 install -d $RPM_BUILD_ROOT%{_libdir}/xorg/modules/dri
322
323 cp -df lib-static/lib* $RPM_BUILD_ROOT%{_libdir}
324 cp -df lib-dri/lib* $RPM_BUILD_ROOT%{_libdir}
325 cp -df lib/libOSMesa* $RPM_BUILD_ROOT%{_libdir}
326 cp -rf include/GL/{gl[!u]*,glu.h,glu_*,osmesa.h,xmesa*} src/glw/GLw*.h $RPM_BUILD_ROOT%{_includedir}/GL
327 cp -df lib-dri/*_dri.so $RPM_BUILD_ROOT%{_libdir}/xorg/modules/dri
328
329 install progs/xdemos/{glxgears,glxinfo} $RPM_BUILD_ROOT%{_bindir}
330 for l in demos redbook samples xdemos ; do
331         %{__make} -C progs/$l clean
332 done
333 for l in demos redbook samples util xdemos images ; do
334         cp -Rf progs/$l $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/$l
335 done
336 rm -rf $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/*/{.deps,CVS,Makefile.{BeOS*,win,cygnus,DJ,dja}}
337
338 %clean
339 rm -rf $RPM_BUILD_ROOT
340
341 %post   libGL -p /sbin/ldconfig
342 %postun libGL -p /sbin/ldconfig
343
344 %post   libGLU -p /sbin/ldconfig
345 %postun libGLU -p /sbin/ldconfig
346
347 %post   libGLw -p /sbin/ldconfig
348 %postun libGLw -p /sbin/ldconfig
349
350 %files libGL
351 %defattr(644,root,root,755)
352 %doc docs/{*.html,README.{3DFX,GGI,MITS,QUAKE,THREADS,X11},RELNOTES*,VERSIONS}
353 %attr(755,root,root) %{_libdir}/libGL.so.*.*
354 %attr(755,root,root) %{_libdir}/libOSMesa.so.*.*
355 # symlink for binary apps which fail to conform Linux OpenGL ABI
356 # (and dlopen libGL.so instead of libGL.so.1)
357 %attr(755,root,root) %{_libdir}/libGL.so
358
359 %files libGL-devel
360 %defattr(644,root,root,755)
361 %doc docs/*.spec
362 %attr(755,root,root) %{_libdir}/libOSMesa.so
363 %dir %{_includedir}/GL
364 %{_includedir}/GL/gl.h
365 %{_includedir}/GL/glext.h
366 %{_includedir}/GL/gl_mangle.h
367 %{_includedir}/GL/glx.h
368 %{_includedir}/GL/glxext.h
369 %{_includedir}/GL/glx_mangle.h
370 %{_includedir}/GL/osmesa.h
371 %{_includedir}/GL/xmesa.h
372 %{_includedir}/GL/xmesa_x.h
373 %{_includedir}/GL/xmesa_xf86.h
374
375 %files libGL-static
376 %defattr(644,root,root,755)
377 %{_libdir}/libGL.a
378 %{_libdir}/libOSMesa.a
379
380 %files libGLU
381 %defattr(644,root,root,755)
382 %attr(755,root,root) %{_libdir}/libGLU.so.*.*
383
384 %files libGLU-devel
385 %defattr(644,root,root,755)
386 %attr(755,root,root) %{_libdir}/libGLU.so
387 %{_includedir}/GL/glu.h
388 %{_includedir}/GL/glu_mangle.h
389
390 %files libGLU-static
391 %defattr(644,root,root,755)
392 %{_libdir}/libGLU.a
393
394 %files libGLw
395 %defattr(644,root,root,755)
396 %attr(755,root,root) %{_libdir}/libGLw.so.*.*
397
398 %files libGLw-devel
399 %defattr(644,root,root,755)
400 %attr(755,root,root) %{_libdir}/libGLw.so
401 %{_includedir}/GL/GLwDrawA.h
402 %{_includedir}/GL/GLwDrawAP.h
403 %{_includedir}/GL/GLwMDrawA.h
404 %{_includedir}/GL/GLwMDrawAP.h
405
406 %files libGLw-static
407 %defattr(644,root,root,755)
408 %{_libdir}/libGLw.a
409
410 %files utils
411 %defattr(644,root,root,755)
412 %attr(755,root,root) %{_bindir}/glxgears
413 %attr(755,root,root) %{_bindir}/glxinfo
414
415 %files dri
416 %defattr(644,root,root,755)
417 %dir %{_libdir}/xorg/modules/dri
418 # XXX: split
419 %ifarch sparc sparcv9 sparc64
420 # sunffb (sparc only)
421 %attr(755,root,root) %{_libdir}/xorg/modules/dri/ffb_dri.so
422 %endif
423 # i810
424 %attr(755,root,root) %{_libdir}/xorg/modules/dri/i810_dri.so
425 %attr(755,root,root) %{_libdir}/xorg/modules/dri/i830_dri.so
426 %attr(755,root,root) %{_libdir}/xorg/modules/dri/i915_dri.so
427 # ati
428 %attr(755,root,root) %{_libdir}/xorg/modules/dri/mach64_dri.so
429 %attr(755,root,root) %{_libdir}/xorg/modules/dri/r128_dri.so
430 %attr(755,root,root) %{_libdir}/xorg/modules/dri/r200_dri.so
431 %attr(755,root,root) %{_libdir}/xorg/modules/dri/r300_dri.so
432 %attr(755,root,root) %{_libdir}/xorg/modules/dri/radeon_dri.so
433 # glint (requires update)
434 #%attr(755,root,root) %{_libdir}/xorg/modules/dri/gamma_dri.so
435 # mga
436 %attr(755,root,root) %{_libdir}/xorg/modules/dri/mga_dri.so
437 # s3virge (but driver not ready?)
438 %attr(755,root,root) %{_libdir}/xorg/modules/dri/s3v_dri.so
439 # savage
440 %attr(755,root,root) %{_libdir}/xorg/modules/dri/savage_dri.so
441 # sis
442 %attr(755,root,root) %{_libdir}/xorg/modules/dri/sis_dri.so
443 # tdfx
444 %attr(755,root,root) %{_libdir}/xorg/modules/dri/tdfx_dri.so
445 # trident
446 %attr(755,root,root) %{_libdir}/xorg/modules/dri/trident_dri.so
447 # via
448 %attr(755,root,root) %{_libdir}/xorg/modules/dri/unichrome_dri.so
449
450 %files demos
451 %defattr(644,root,root,755)
452 %{_examplesdir}/%{name}-%{version}
This page took 0.066034 seconds and 3 git commands to generate.