]> git.pld-linux.org Git - packages/Mesa.git/blob - Mesa.spec
- sorry, motif-devel is back in BR
[packages/Mesa.git] / Mesa.spec
1 #
2 %bcond_with     glide   # with GLIDE
3 #
4 Summary:        Free OpenGL implementation
5 Summary(pl):    Bezp³atna implementacja standardu OpenGL
6 Name:           Mesa
7 Version:        6.0.1
8 Release:        1
9 License:        MIT (core), LGPL (MesaGLU), SGI (GLU,libGLw) and others - see COPYRIGHT file
10 Group:          X11/Libraries
11 Source0:        http://dl.sourceforge.net/mesa3d/%{name}Lib-%{version}.tar.bz2
12 # Source0-md5:  b7f14088c5c2f14490d2739a91102112
13 Source1:        http://dl.sourceforge.net/mesa3d/%{name}Demos-%{version}.tar.bz2
14 # Source1-md5:  dd6aadfd9ca8e1cfa90c6ee492bc6f43
15 Patch0:         %{name}-libGLw.patch
16 URL:            http://www.mesa3d.org/
17 %ifarch %{ix86} alpha
18 %{?with_glide:BuildRequires:    Glide3-DRI-devel}
19 %{?with_glide:Requires: Glide3-DRI}
20 %endif
21 BuildRequires:  XFree86-devel
22 BuildRequires:  autoconf >= 2.50
23 BuildRequires:  automake
24 BuildRequires:  libtool >= 2:1.4d
25 BuildRequires:  motif-devel
26 BuildRequires:  perl-devel
27 Provides:       OpenGL
28 Obsoletes:      XFree86-OpenGL-core
29 Obsoletes:      XFree86-OpenGL-libs
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 # avoid XFree86-OpenGL* dependency
33 # Glide3 can be provided by Glide_V3-DRI or Glide_V5-DRI
34 %define         _noautoreqdep   libGL.so.1 libGLU.so.1 libOSMesa.so.4   libglide3.so.3
35
36 %define         _sysconfdir     /etc/X11
37
38 %description
39 Mesa is a 3-D graphics library with an API which is very similar to
40 that of OpenGL*. To the extent that Mesa utilizes the OpenGL command
41 syntax or state machine, it is being used with authorization from
42 Silicon Graphics, Inc. However, the author makes no claim that Mesa is
43 in any way a compatible replacement for OpenGL or associated with
44 Silicon Graphics, Inc. Those who want a licensed implementation of
45 OpenGL should contact a licensed vendor. This software is distributed
46 under the terms of the GNU Library General Public License, see the
47 LICENSE file for details.
48
49 - OpenGL(R) is a registered trademark of Silicon Graphics, Inc.
50
51 %description -l pl
52 Mesa jest bibliotek± 3D bêd±c± darmowym odpowiednikiem standardu
53 OpenGL(*).
54
55 - OpenGL jest zastrze¿onym znakiem towarowym firmy Silicon Graphics,
56   Inc.
57
58 %package devel
59 Summary:        Development environment for Mesa
60 Summary(pl):    ¦rodowisko programistyczne biblioteki Mesa
61 Group:          Development/Libraries
62 Requires:       %{name} = %{version}-%{release}
63 Requires:       XFree86-devel
64 Provides:       OpenGL-devel
65 Obsoletes:      XFree86-OpenGL-devel
66
67 %description devel
68 Header files and documentation needed for development.
69
70 %description devel -l pl
71 Pliki nag³ówkowe i dokumentacja do Mesy.
72
73 %package static
74 Summary:        Mesa static libraries
75 Summary(pl):    Biblioteki statyczne Mesy
76 Group:          Development/Libraries
77 Requires:       %{name}-devel = %{version}-%{release}
78 Provides:       OpenGL-static
79 Obsoletes:      XFree86-OpenGL-static
80
81 %description static
82 The static version of the Mesa libraries.
83
84 %description static -l pl
85 Biblioteki statyczne Mesy.
86
87 %package demos
88 Summary:        Mesa Demos
89 Summary(pl):    Demonstracje mo¿liwo¶ci bibliotek Mesa
90 Group:          Development/Libraries
91 Requires:       OpenGL-devel
92
93 %description demos
94 Demonstration programs for the Mesa libraries.
95
96 %description demos -l pl
97 Programy demonstracyjne dla bibliotek Mesa.
98
99 %prep
100 %setup -q -n Mesa-%{version} -b 1
101 %patch0 -p1
102
103 # fix demos
104 %{__perl} -pi -e "s,\.\./images/,%{_examplesdir}/Mesa/images/,g" progs/demos/*
105
106 %build
107 # runtime detection, so safe to enable
108 ASM=
109 # asm is currently broken
110 #%ifarch %{ix86}
111 #ASM="$ASM -DUSE_X86_ASM"
112 #%endif
113 #%ifarch i586 i686 k6 athlon
114 #ASM="$ASM -DUSE_MMX_ASM"
115 #%endif
116 #%ifarch i686 athlon
117 #ASM="$ASM -DUSE_SSE_ASM"
118 #%endif
119 #%ifarch sparc sparc64 sparcv9
120 #ASM="$ASM -DUSE_SPARC_ASM"
121 #%endif
122
123 %{__make} linux-static \
124         OPTFLAGS="%{rpmcflags} $ASM"
125 mv -f lib lib-static
126 %{__make} clean
127 %{__make} linux \
128         OPTFLAGS="%{rpmcflags} $ASM"
129
130 %install
131 rm -rf $RPM_BUILD_ROOT
132 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/GL,%{_mandir}/man3,%{_examplesdir}/Mesa}
133
134 cp -df lib-static/lib[GO]* $RPM_BUILD_ROOT%{_libdir}
135 cp -df lib/lib[GO]* $RPM_BUILD_ROOT%{_libdir}
136 cp -rf include/GL/{gl*,osmesa.h,xmesa*} src/glw/GLw*.h $RPM_BUILD_ROOT%{_includedir}/GL
137 rm -f $RPM_BUILD_ROOT%{_includedir}/GL/glut*
138
139 for l in demos redbook samples xdemos ; do
140         %{__make} -C progs/$l -f Makefile.X11 realclean
141 done
142 for l in demos redbook samples util xdemos images ; do
143         cp -Rf progs/$l $RPM_BUILD_ROOT%{_examplesdir}/Mesa/$l
144 done
145 rm -rf $RPM_BUILD_ROOT%{_examplesdir}/Mesa/*/{.deps,CVS,Makefile.{BeOS*,win,cygnus,DJ,dja}}
146
147 %clean
148 rm -rf $RPM_BUILD_ROOT
149
150 %post   -p /sbin/ldconfig
151 %postun -p /sbin/ldconfig
152
153 %files
154 %defattr(644,root,root,755)
155 %doc docs/{*.html,README.{3DFX,GGI,MITS,QUAKE,THREADS,X11},RELNOTES*,VERSIONS}
156 %attr(755,root,root) %{_libdir}/libGL*.so.*.*
157 %attr(755,root,root) %{_libdir}/libGL.so
158 %attr(755,root,root) %{_libdir}/libOSMesa.so.*.*
159
160 %files devel
161 %defattr(644,root,root,755)
162 %doc docs/*.spec
163 %attr(755,root,root) %{_libdir}/libGLU.so
164 %attr(755,root,root) %{_libdir}/libOSMesa.so
165 %{_libdir}/libGLw.a
166 %dir %{_includedir}/GL
167 %{_includedir}/GL/GLwDrawA.h
168 %{_includedir}/GL/GLwDrawAP.h
169 %{_includedir}/GL/GLwMDrawA.h
170 %{_includedir}/GL/GLwMDrawAP.h
171 %{_includedir}/GL/gl.h
172 %{_includedir}/GL/glext.h
173 %{_includedir}/GL/gl_mangle.h
174 %{_includedir}/GL/glu.h
175 %{_includedir}/GL/glu_mangle.h
176 %{_includedir}/GL/glx.h
177 %{_includedir}/GL/glxext.h
178 %{_includedir}/GL/glx_mangle.h
179 %{_includedir}/GL/osmesa.h
180 %{_includedir}/GL/xmesa.h
181 %{_includedir}/GL/xmesa_x.h
182 %{_includedir}/GL/xmesa_xf86.h
183
184 %files static
185 %defattr(644,root,root,755)
186 %{_libdir}/libGL.a
187 %{_libdir}/libGLU.a
188 %{_libdir}/libOSMesa.a
189
190 %files demos
191 %defattr(644,root,root,755)
192 %{_examplesdir}/Mesa
This page took 0.621638 seconds and 4 git commands to generate.