]> git.pld-linux.org Git - packages/Mesa.git/blob - Mesa.spec
- don't build glut (we have it in glut.spec)
[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.3.2
13 Release:        1
14 License:        MIT (core), LGPL (MesaGLU), 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:  0df27701df0924d17ddf41185efa8ce1
18 Source1:        http://dl.sourceforge.net/mesa3d/%{name}Demos-%{version}.tar.bz2
19 # Source1-md5:  96708868450c188205e42229b5d813c4
20 # from Gentoo:
21 # http://www.gentoo.org/cgi-bin/viewcvs.cgi/media-libs/mesa/files/mesa-add-dri-asm-files.patch?rev=1.1&content-type=text/vnd.viewcvs-markup
22 Patch0:         %{name}-dri-asm.patch
23 URL:            http://www.mesa3d.org/
24 BuildRequires:  expat-devel
25 BuildRequires:  libdrm-devel
26 BuildRequires:  libstdc++-devel
27 BuildRequires:  libtool >= 2:1.4d
28 %{?with_motif:BuildRequires:    motif-devel}
29 BuildRequires:  sed >= 4.0
30 BuildRequires:  xorg-lib-libXi-devel
31 BuildRequires:  xorg-lib-libXmu-devel
32 BuildRequires:  xorg-lib-libXp-devel
33 BuildRequires:  xorg-lib-libXxf86vm-devel
34 BuildRequires:  xorg-proto-glproto-devel
35 BuildRequires:  xorg-util-makedepend
36 %if %{with glide}
37 BuildRequires:  Glide3-DRI-devel
38 Requires:       Glide3-DRI
39 %endif
40 Provides:       OpenGL = 1.5
41 Provides:       OpenGL-GLU = 1.3
42 # reports version 1.3, but supports glXGetProcAddress() from 1.4
43 Provides:       OpenGL-GLX = 1.4
44 Obsoletes:      XFree86-OpenGL-libGL
45 Obsoletes:      XFree86-OpenGL-libs
46 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48 # avoid XFree86-OpenGL* dependency
49 # Glide3 can be provided by Glide_V3-DRI or Glide_V5-DRI
50 %define         _noautoreqdep   libGL.so.1 libGLU.so.1 libOSMesa.so.4   libglide3.so.3
51
52 %define         _sysconfdir     /etc/X11
53
54 %description
55 Mesa is a 3-D graphics library with an API which is very similar to
56 that of OpenGL(R). To the extent that Mesa utilizes the OpenGL command
57 syntax or state machine, it is being used with authorization from
58 Silicon Graphics, Inc. However, the author does not possess an OpenGL
59 license from SGI, and makes no claim that Mesa is in any way a
60 compatible replacement for OpenGL or associated with SGI.
61
62 %description -l pl
63 Mesa jest bibliotek± grafiki 3D z API bardzo podobnym do OpenGL(R). Do
64 tego stopnia, ¿e Mesa u¿ywa sk³adni i automatu OpenGL jest u¿ywana z
65 autoryzacj± Silicon Graphics, Inc. Jednak autor nie posiada licencji
66 OpenGL od SGI i nie twierdzi, ¿e Mesa jest kompatybilnym zamiennikiem
67 OpenGL ani powi±zana z SGI.
68
69 %package devel
70 Summary:        Development environment for Mesa
71 Summary(pl):    ¦rodowisko programistyczne biblioteki Mesa
72 Group:          Development/Libraries
73 Requires:       %{name} = %{version}-%{release}
74 Requires:       xorg-lib-libX11-devel
75 Requires:       xorg-lib-libXp-devel
76 Provides:       OpenGL-devel = 1.5
77 Provides:       OpenGL-GLU-devel = 1.3
78 Provides:       OpenGL-GLX-devel = 1.4
79 Obsoletes:      XFree86-OpenGL-devel
80 Obsoletes:      XFree86-OpenGL-devel-base
81
82 %description devel
83 Header files and documentation needed for development.
84
85 %description devel -l pl
86 Pliki nag³ówkowe i dokumentacja do Mesy.
87
88 %package static
89 Summary:        Mesa static libraries
90 Summary(pl):    Biblioteki statyczne Mesy
91 Group:          Development/Libraries
92 Requires:       %{name}-devel = %{version}-%{release}
93 Provides:       OpenGL-static = 1.5
94 Provides:       OpenGL-GLU-static = 1.3
95 Obsoletes:      XFree86-OpenGL-static
96
97 %description static
98 The static version of the Mesa libraries.
99
100 %description static -l pl
101 Biblioteki statyczne Mesy.
102
103 %package demos
104 Summary:        Mesa Demos
105 Summary(pl):    Demonstracje mo¿liwo¶ci bibliotek Mesa
106 Group:          Development/Libraries
107 Requires:       OpenGL-devel
108
109 %description demos
110 Demonstration programs for the Mesa libraries.
111
112 %description demos -l pl
113 Programy demonstracyjne dla bibliotek Mesa.
114
115 %package dri
116 Summary:        X.org DRI drivers
117 Summary(pl):    Sterowniki DRI dla X.org
118 Group:          Development/Libraries
119 Requires:       OpenGL
120
121 %description dri
122 X.org DRI drivers.
123
124 %description dri -l pl
125 Sterowniki DRI dla X.org.
126
127 %prep
128 %setup -q -n Mesa-%{version} -b 1
129 %patch0 -p1
130
131 # fix demos
132 find progs -type f|xargs sed -i -e "s,\.\./images/,%{_examplesdir}/%{name}-%{version}/images/,g"
133
134 %build
135 %ifarch %{ix86}
136 targ=-x86
137 %else
138 targ=""
139 %endif
140
141 %{__make} linux${targ}-static \
142         CC="%{__cc}" \
143         CXX="%{__cxx}" \
144         OPT_FLAGS="%{rpmcflags}" \
145         XLIB_DIR=%{_libdir} \
146         GLW_SOURCES="GLwDrawA.c%{?with_motif: GLwMDrawA.c}" \
147         SRC_DIRS="mesa glu glw" \
148         PROGRAM_DIRS=
149 mv -f lib lib-static
150 %{__make} clean
151
152 %{__make} linux-dri${targ} \
153         CC="%{__cc}" \
154         CXX="%{__cxx}" \
155         MKDEP=makedepend \
156         OPT_FLAGS="%{rpmcflags}" \
157         XLIB_DIR=%{_libdir} \
158         SRC_DIRS="glx/x11 mesa glu glw" \
159         PROGRAM_DIRS=
160 mv -f lib lib-dri
161 %{__make} clean \
162         MKDEP=makedepend
163
164 %{__make} linux${targ} \
165         CC="%{__cc}" \
166         CXX="%{__cxx}" \
167         OPT_FLAGS="%{rpmcflags}" \
168         XLIB_DIR=%{_libdir} \
169         SRC_DIRS="mesa glu glw" \
170         PROGRAM_DIRS=
171
172 %{__make} -C progs/xdemos \
173         CC="%{__cc}" \
174         CXX="%{__cxx}" \
175         OPT_FLAGS="%{rpmcflags}" \
176         XLIB_DIR=%{_libdir} \
177         PROGS="glxgears" \
178         APP_LIB_DEPS="-L\$(LIB_DIR) -lGL"
179
180 %{__make} -C progs/xdemos \
181         CC="%{__cc}" \
182         CXX="%{__cxx}" \
183         OPT_FLAGS="%{rpmcflags}" \
184         XLIB_DIR=%{_libdir} \
185         PROGS="glxinfo" \
186         APP_LIB_DEPS="-L\$(LIB_DIR) -lGLU -lGL"
187
188 %install
189 rm -rf $RPM_BUILD_ROOT
190 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}/GL,%{_examplesdir}/%{name}-%{version}}
191 install -d $RPM_BUILD_ROOT%{_libdir}/xorg/modules/dri
192
193 cp -df lib-static/lib* $RPM_BUILD_ROOT%{_libdir}
194 cp -df lib-dri/lib* $RPM_BUILD_ROOT%{_libdir}
195 cp -df lib/libOS* $RPM_BUILD_ROOT%{_libdir}
196 cp -rf include/GL/{gl[!u]*,glu.h,glu_*,osmesa.h,xmesa*} src/glw/GLw*.h $RPM_BUILD_ROOT%{_includedir}/GL
197 cp -df lib-dri/*_dri.so $RPM_BUILD_ROOT%{_libdir}/xorg/modules/dri
198
199 install progs/xdemos/{glxgears,glxinfo} $RPM_BUILD_ROOT%{_bindir}
200 for l in demos redbook samples xdemos ; do
201         %{__make} -C progs/$l clean
202 done
203 for l in demos redbook samples util xdemos images ; do
204         cp -Rf progs/$l $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/$l
205 done
206 rm -rf $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/*/{.deps,CVS,Makefile.{BeOS*,win,cygnus,DJ,dja}}
207
208 %clean
209 rm -rf $RPM_BUILD_ROOT
210
211 %post   -p /sbin/ldconfig
212 %postun -p /sbin/ldconfig
213
214 %files
215 %defattr(644,root,root,755)
216 %doc docs/{*.html,README.{3DFX,GGI,MITS,QUAKE,THREADS,X11},RELNOTES*,VERSIONS}
217 %attr(755,root,root) %{_bindir}/glx*
218 %attr(755,root,root) %{_libdir}/libGL.so.*.*
219 %attr(755,root,root) %{_libdir}/libGLU.so.*.*
220 %attr(755,root,root) %{_libdir}/libGLw.so.*.*
221 %attr(755,root,root) %{_libdir}/libOSMesa.so.*.*
222 # symlink for binary apps which fail to conform Linux OpenGL ABI
223 # (and dlopen libGL.so instead of libGL.so.1)
224 %attr(755,root,root) %{_libdir}/libGL.so
225
226 %files devel
227 %defattr(644,root,root,755)
228 %doc docs/*.spec
229 %attr(755,root,root) %{_libdir}/libGLU.so
230 %attr(755,root,root) %{_libdir}/libGLw.so
231 %attr(755,root,root) %{_libdir}/libOSMesa.so
232 %dir %{_includedir}/GL
233 %{_includedir}/GL/GLwDrawA.h
234 %{_includedir}/GL/GLwDrawAP.h
235 %{_includedir}/GL/GLwMDrawA.h
236 %{_includedir}/GL/GLwMDrawAP.h
237 %{_includedir}/GL/gl.h
238 %{_includedir}/GL/glext.h
239 %{_includedir}/GL/gl_mangle.h
240 %{_includedir}/GL/glu.h
241 %{_includedir}/GL/glu_mangle.h
242 %{_includedir}/GL/glx.h
243 %{_includedir}/GL/glxext.h
244 %{_includedir}/GL/glx_mangle.h
245 %{_includedir}/GL/osmesa.h
246 %{_includedir}/GL/xmesa.h
247 %{_includedir}/GL/xmesa_x.h
248 %{_includedir}/GL/xmesa_xf86.h
249
250 %files static
251 %defattr(644,root,root,755)
252 %{_libdir}/libGL.a
253 %{_libdir}/libGLU.a
254 %{_libdir}/libGLw.a
255 %{_libdir}/libOSMesa.a
256
257 %files demos
258 %defattr(644,root,root,755)
259 %{_examplesdir}/%{name}-%{version}
260
261 %files dri
262 %defattr(644,root,root,755)
263 %dir %{_libdir}/xorg/modules/dri
264 %attr(755,root,root) %{_libdir}/xorg/modules/dri/*_dri.so
This page took 0.040958 seconds and 4 git commands to generate.