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