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