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