]> git.pld-linux.org Git - packages/Mesa.git/blob - Mesa.spec
- many small fixes, mostly inpired by kloczek
[packages/Mesa.git] / Mesa.spec
1 #
2 # _with_glide: with GLIDE
3 #
4 Summary:        Free OpenGL implementation
5 Summary(pl):    Bezp³atna implementacja standardu OpenGL
6 Name:           Mesa
7 Version:        5.0.1
8 Release:        1
9 License:        MIT (core), LGPL (MesaGLU), SGI (GLU,libGLw) and others - see COPYRIGHT file
10 Group:          X11/Libraries
11 Source0:        http://dl.sourceforge.net/mesa3d/%{name}Lib-%{version}.tar.bz2
12 # Source0-md5:  513b4bbd7d38951f05027179063d876b
13 Source1:        http://dl.sourceforge.net/mesa3d/%{name}Demos-%{version}.tar.bz2
14 # Source1-md5:  37190374a98c3c892f0698be9ca3acf0
15 Patch0:         %{name}-am.patch
16 Patch1:         %{name}-ac.patch
17 Patch2:         %{name}-libGLw.patch
18 URL:            http://www.mesa3d.org/
19 %ifarch %{ix86} alpha
20 %{?_with_glide:BuildRequires:   Glide3-DRI-devel}
21 %{?_with_glide:Requires:        Glide3-DRI}
22 %endif
23 BuildRequires:  XFree86-devel
24 BuildRequires:  autoconf
25 BuildRequires:  motif-devel
26 BuildRequires:  perl
27 Provides:       OpenGL
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 Obsoletes:      XFree86-OpenGL-core
30 Obsoletes:      XFree86-OpenGL-libs
31
32 # avoid XFree86-OpenGL* dependency
33 # Glide3 can be provided by Glide_V3-DRI or Glide_V5-DRI
34 %define         _noautoreqdep   libGL.so.1 libGLU.so.1 libOSMesa.so.4   libglide3.so.3
35
36 %define         _sysconfdir     /etc/X11
37
38 %description
39 Mesa is a 3-D graphics library with an API which is very similar to
40 that of OpenGL*. To the extent that Mesa utilizes the OpenGL command
41 syntax or state machine, it is being used with authorization from
42 Silicon Graphics, Inc. However, the author makes no claim that Mesa is
43 in any way a compatible replacement for OpenGL or associated with
44 Silicon Graphics, Inc. Those who want a licensed implementation of
45 OpenGL should contact a licensed vendor. This software is distributed
46 under the terms of the GNU Library General Public License, see the
47 LICENSE file for details.
48
49 - OpenGL(R) is a registered trademark of Silicon Graphics, Inc.
50
51 %description -l pl
52 Mesa jest bibliotek± 3D bêd±c± darmowym odpowiednikiem standardu
53 OpenGL(*).
54
55 - OpenGL jest zastrze¿onym znakiem towarowym firmy Silicon Graphics,
56   Inc.
57
58 %package devel
59 Summary:        Development environment for Mesa
60 Summary(pl):    ¦rodowisko programistyczne biblioteki Mesa
61 Group:          Development/Libraries
62 Requires:       %{name} = %{version}
63 Requires:       XFree86-devel
64 Provides:       OpenGL-devel
65 Obsoletes:      XFree86-OpenGL-devel
66
67 %description devel
68 Header files and documentation needed for development.
69
70 %description devel -l pl
71 Pliki nag³ówkowe i dokumentacja do Mesy.
72
73 %package static
74 Summary:        Mesa static libraries
75 Summary(pl):    Biblioteki statyczne Mesy
76 Group:          Development/Libraries
77 Requires:       %{name}-devel = %{version}
78 Provides:       OpenGL-static
79 Obsoletes:      XFree86-OpenGL-static
80
81 %description static
82 The static version of the Mesa libraries.
83
84 %description static -l pl
85 Biblioteki statyczne Mesy.
86
87 %package demos
88 Summary:        Mesa Demos
89 Summary(pl):    Demonstracje mo¿liwo¶ci bibliotek Mesa
90 Group:          Development/Libraries
91 Requires:       OpenGL-devel
92
93 %description demos
94 Demonstration programs for the Mesa libraries.
95
96 %description demos -l pl
97 Programy demonstracyjne dla bibliotek Mesa.
98
99 %prep
100 %setup -q -n Mesa-%{version} -b 1
101 %patch0 -p1
102 %patch1 -p1
103 %patch2 -p1
104
105 # fix demos
106 perl -pi -e "s,\.\./images/,%{_examplesdir}/Mesa/images/,g" demos/*
107
108 %build
109 %configure \
110         --enable-static \
111         --enable-shared \
112         --with-ggi="no" \
113         --with-svga="no" \
114         --disable-ggi-fbdev \
115         --disable-ggi-genkgi \
116         --enable-optimize \
117         %{!?_with_glide:--without-glide} \
118 %ifarch %{ix86} \
119         --enable-x86 \
120   %ifarch i586 i686 k6 athlon \
121         --enable-mmx \
122         --enable-3dnow \
123     %ifarch i686 athlon \
124         --enable-katmai \
125     %else \
126         --disable-katmai \
127     %endif \
128   %else \
129         --disable-mmx \
130         --disable-3dnow \
131   %endif \
132 %else \
133 %ifarch sparc \
134         --enable-sparc \
135 %endif \
136         --disable-x86 \
137         --disable-mmx \
138         --disable-3dnow
139 %endif
140
141 %{__make}
142         
143 cd widgets-mesa
144 %{__autoconf}
145 %configure \
146         --with-motif
147 %{__make} || :
148 cd ../widgets-sgi
149 touch depend
150 %{__make} dep
151 %{__make} linux OPTFLAGS="%{rpmcflags}"
152 cd ..
153
154 %install
155 rm -rf $RPM_BUILD_ROOT
156 install -d $RPM_BUILD_ROOT{%{_mandir}/man3,/usr/src/examples/Mesa}
157
158 %{__make} install \
159         DESTDIR=$RPM_BUILD_ROOT
160
161 SPWD=`pwd`
162 cd widgets-mesa
163 %{__make} install \
164         prefix=$RPM_BUILD_ROOT%{_prefix} \
165         mandir=$RPM_BUILD_ROOT%{_mandir}/man3
166 # Mesa widgets are not binary compatible with SGI ones
167 cd $RPM_BUILD_ROOT%{_includedir}/GL
168 mkdir Mesa-widgets
169 mv -f GLw*.h Mesa*.h Mesa-widgets
170 cd $SPWD
171
172 install widgets-sgi/libGLw* $RPM_BUILD_ROOT%{_libdir}
173 install widgets-sgi/GLw*.h $RPM_BUILD_ROOT%{_includedir}/GL
174
175 for l in book demos samples xdemos images ; do
176         cp -Rf $l $RPM_BUILD_ROOT%{_examplesdir}/Mesa/$l
177 done
178 rm -rf $RPM_BUILD_ROOT%{_examplesdir}/Mesa/*/{.deps,CVS,Makefile.{BeOS*,win,cygnus,DJ,dja}}
179
180 rm -f docs/*~
181
182 %clean
183 rm -rf $RPM_BUILD_ROOT
184
185 %post   -p /sbin/ldconfig
186 %postun -p /sbin/ldconfig
187
188 %files
189 %defattr(644,root,root,755)
190 %doc docs/{CONFORM,COPYRIGHT,README,README.{3DFX,GGI,MITS,QUAKE,THREADS,X11},RELNOTES*,VERSIONS}
191 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mesa.conf
192 %attr(755,root,root) %{_libdir}/libGL*.so.*.*
193 %attr(755,root,root) %{_libdir}/libGL.so
194 %attr(755,root,root) %{_libdir}/libOSMesa.so.*.*
195
196 %files devel
197 %defattr(644,root,root,755)
198 %doc docs/{DEVINFO,*.spec}
199 %{_libdir}/libGL.la
200 %attr(755,root,root) %{_libdir}/libGLU.so
201 %{_libdir}/libGLU.la
202 %attr(755,root,root) %{_libdir}/libOSMesa.so
203 %{_libdir}/libOSMesa.la
204 %{_libdir}/libGLw.a
205 %{_libdir}/libMesaGLw*.a
206 %dir %{_includedir}/GL
207 %{_includedir}/GL/Mesa-widgets
208 %{_includedir}/GL/GLwDrawA.h
209 %{_includedir}/GL/GLwDrawAP.h
210 %{_includedir}/GL/GLwMDrawA.h
211 %{_includedir}/GL/GLwMDrawAP.h
212 %{_includedir}/GL/gl.h
213 %{_includedir}/GL/glext.h
214 %{_includedir}/GL/gl_mangle.h
215 %{_includedir}/GL/glu.h
216 %{_includedir}/GL/glu_mangle.h
217 %{_includedir}/GL/glx.h
218 %{_includedir}/GL/glxext.h
219 %{_includedir}/GL/glx_mangle.h
220 %{_includedir}/GL/osmesa.h
221 %{_includedir}/GL/xmesa.h
222 %{_includedir}/GL/xmesa_x.h
223 %{_includedir}/GL/xmesa_xf86.h
224 %{_mandir}/man3/*
225
226 %files static
227 %defattr(644,root,root,755)
228 %{_libdir}/libGL.a
229 %{_libdir}/libGLU.a
230 %{_libdir}/libOSMesa.a
231
232 %files demos
233 %defattr(644,root,root,755)
234 %{_examplesdir}/Mesa
This page took 0.050967 seconds and 4 git commands to generate.