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