| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- ##
- ## mesa.spec -- OpenPKG RPM Package Specification
- ## Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/>
- ## Copyright (c) 2000-2006 Ralf S. Engelschall <http://engelschall.com/>
- ##
- ## Permission to use, copy, modify, and distribute this software for
- ## any purpose with or without fee is hereby granted, provided that
- ## the above copyright notice and this permission notice appear in all
- ## copies.
- ##
- ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
- ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- ## SUCH DAMAGE.
- ##
- # package information
- Name: mesa
- Summary: OpenGL Toolkit
- URL: http://www.mesa3d.org/
- Vendor: Brian Paul
- Packager: OpenPKG Foundation e.V.
- Distribution: OpenPKG Community
- Class: PLUS
- Group: XWindow
- License: LGPL
- Version: 6.5
- Release: 20061015
- # package options
- %option with_demos no
- # list of sources
- Source0: http://osdn.dl.sourceforge.net/sourceforge/mesa3d/MesaLib-%{version}.tar.bz2
- Source1: http://osdn.dl.sourceforge.net/sourceforge/mesa3d/MesaGLUT-%{version}.tar.bz2
- Source2: http://osdn.dl.sourceforge.net/sourceforge/mesa3d/MesaDemos-%{version}.tar.bz2
- Patch0: mesa.patch
- Patch1: mesa.patch.demos
- # build information
- Prefix: %{l_prefix}
- BuildRoot: %{l_buildroot}
- BuildPreReq: OpenPKG, openpkg >= 20040130, X11, gcc, make, autoconf
- PreReq: OpenPKG, openpkg >= 20040130, X11
- AutoReq: no
- AutoReqProv: no
- %description
- Mesa is a 3-D graphics library with an API which is very similar to
- that of OpenGL. To the extent that Mesa utilizes the OpenGL command
- syntax or state machine, it is being used with authorization from
- Silicon Graphics, Inc. (SGI).
- %track
- prog mesa:MesaLib = {
- version = %{version}
- url = http://prdownloads.sourceforge.net/mesa3d/
- regex = MesaLib-(6\.\d+)\.tar\.bz2
- }
- prog mesa:MesaGLUT = {
- version = %{version}
- url = http://prdownloads.sourceforge.net/mesa3d/
- regex = MesaGLUT-(6\.\d+)\.tar\.bz2
- }
- prog mesa:MesaDemos = {
- version = %{version}
- url = http://prdownloads.sourceforge.net/mesa3d/
- regex = MesaDemos-(6\.\d+)\.tar\.bz2
- }
- %prep
- %setup -q -n Mesa-%{version}
- %setup -q -n Mesa-%{version} -T -D -b 1
- %patch -p0
- %if "%{with_demos}" == "yes"
- %setup -q -n Mesa-%{version} -T -D -b 2
- chmod 644 progs/demos/glslnoise.c
- %patch -p0 -P 1
- %endif
- %{l_shtool} subst \
- -e "s;@l_x11bindir@;`%{l_rc} --query x11_bindir`;g" \
- configs/default
- %build
- case "%{l_platform -t}" in
- *-freebsd* ) plat="freebsd" ;;
- *-netbsd* ) plat="netbsd" ;;
- i?86*-linux* ) plat="linux-x86-static" ;;
- *-linux* ) plat="linux-static" ;;
- i?86*-sunos* ) plat="solaris-x86-gcc" ;;
- *-sunos* ) plat="sunos5-gcc" ;;
- * ) echo "platform %{l_platform -t} not supported" 2>&1; exit 1; ;;
- esac
- CC="%{l_cc}" \
- CXX="%{l_cxx}" \
- CFLAGS="%{l_cflags -O}" \
- CXXFLAGS="%{l_cxxflags -O}" \
- CPPFLAGS="%{l_cppflags}" \
- LDFLAGS="%{l_ldflags}" \
- X11LIB_DIR="`%{l_rc} --query x11_libdir`" \
- %{l_make} %{l_mflags} $plat
- %install
- rm -rf $RPM_BUILD_ROOT
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/lib \
- $RPM_BUILD_ROOT%{l_prefix}/include/GL
- %{l_shtool} install -c -m 644 \
- lib/* $RPM_BUILD_ROOT%{l_prefix}/lib/
- %{l_shtool} install -c -m 644 \
- include/GL/*.h $RPM_BUILD_ROOT%{l_prefix}/include/GL/
- %if "%{with_demos}" == "yes"
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/lib/mesa/demos \
- $RPM_BUILD_ROOT%{l_prefix}/lib/mesa/images
- %{l_shtool} install -s -c -m 755 \
- `find progs/demos/ -type f -prune -perm 755 -print` \
- `find progs/redbook/ -type f -prune -perm 755 -print` \
- `find progs/samples/ -type f -prune -perm 755 -print` \
- `find progs/xdemos/ -type f -prune -perm 755 -print` \
- $RPM_BUILD_ROOT%{l_prefix}/lib/mesa/demos/
- %{l_shtool} install -c -m 644 \
- progs/images/* $RPM_BUILD_ROOT%{l_prefix}/lib/mesa/images/
- %endif
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
- %files -f files
- %clean
- rm -rf $RPM_BUILD_ROOT
|