From 5027c3949f0ab121eb3cd0eb694df9d19b3e8f37 Mon Sep 17 00:00:00 2001 From: Jerome Glisse Date: Thu, 22 Jul 2010 14:36:01 +0000 Subject: [PATCH] Initial import (#605719). --- .cvsignore | 2 + import.log | 1 + mesa-demos.spec | 87 +++++++++++++++++++++++++++++++++++++++++++ mesad-git-snapshot.sh | 22 +++++++++++ sources | 2 + 5 files changed, 114 insertions(+) create mode 100644 import.log create mode 100644 mesa-demos.spec create mode 100755 mesad-git-snapshot.sh diff --git a/.cvsignore b/.cvsignore index e69de29..ccae5d7 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1,2 @@ +mesa-demos-20100615.tar.bz2 +xdriinfo-1.0.3.tar.bz2 diff --git a/import.log b/import.log new file mode 100644 index 0000000..df1c444 --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +mesa-demos-1_0-120100615:HEAD:mesa-demos-1.0-120100615.src.rpm:1279809338 diff --git a/mesa-demos.spec b/mesa-demos.spec new file mode 100644 index 0000000..712a81a --- /dev/null +++ b/mesa-demos.spec @@ -0,0 +1,87 @@ +%define gitdate 20100615 +%define tarball mesa-demos +%define xdriinfo xdriinfo-1.0.3 + +%define demodir %{_libdir}/mesa + +Summary: Mesa demos +Name: mesa-demos +Version: 1.0 +Release: 1%{gitdate} +License: MIT +Group: System Environment/Libraries +URL: http://www.mesa3d.org +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +Source0: %{tarball}-%{gitdate}.tar.bz2 +Source1: http://www.x.org/pub/individual/app/%{xdriinfo}.tar.bz2 +Source2: mesad-git-snapshot.sh + +BuildRequires: pkgconfig autoconf automake +BuildRequires: freeglut-devel +BuildRequires: elfutils +BuildRequires: libGL-devel +BuildRequires: libGLU-devel +BuildRequires: glew-devel + +Group: Development/Libraries + +%description +This package provides some demo applications for testing Mesa. + +%package -n glx-utils +Summary: GLX utilities +Group: Development/Libraries + +%description -n glx-utils +The glx-utils package provides the glxinfo and glxgears utilities. + +%prep +%setup -q -n %{tarball}-%{gitdate} -b1 + +# Hack the demos to use installed data files + +sed -i 's,../images,%{_libdir}/mesa,' src/demos/*.c +sed -i 's,geartrain.dat,%{_libdir}/mesa/&,' src/demos/geartrain.c +sed -i 's,isosurf.dat,%{_libdir}/mesa/&,' src/demos/isosurf.c +sed -i 's,terrain.dat,%{_libdir}/mesa/&,' src/demos/terrain.c + +%build +autoreconf -i +%configure --bindir=%{demodir} +make %{?_smp_mflags} + +pushd ../%{xdriinfo} +%configure +make %{?_smp_mflags} +popd + +%install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT +install -m 0644 src/images/*.rgb $RPM_BUILD_ROOT/%{demodir} +install -m 0644 src/demos/*.dat $RPM_BUILD_ROOT/%{demodir} + +pushd ../%{xdriinfo} +make %{?_smp_mflags} install DESTDIR=$RPM_BUILD_ROOT +popd + +%clean +rm -rf $RPM_BUILD_ROOT + +%check + +%files +%defattr(-,root,root,-) +%{demodir} + +%files -n glx-utils +%defattr(-,root,root,-) +%{demodir}/glxgears +%{demodir}/glxinfo +%{_bindir}/xdriinfo +%{_datadir}/man/man1/xdriinfo.1* + +%changelog +* Tue Jun 15 2010 Jerome Glisse 7.7 +- Initial build. diff --git a/mesad-git-snapshot.sh b/mesad-git-snapshot.sh new file mode 100755 index 0000000..8a50e44 --- /dev/null +++ b/mesad-git-snapshot.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +# Usage: ./make-git-snapshot.sh [COMMIT] +# +# to make a snapshot of the given tag/branch. Defaults to HEAD. +# Point env var REF to a local mesa repo to reduce clone time. + +DIRNAME=mesa-demos-$( date +%Y%m%d ) + +echo REF ${REF:+--reference $REF} +echo DIRNAME $DIRNAME +echo HEAD ${1:-HEAD} + +rm -rf $DIRNAME + +git clone ${REF:+--reference $REF} \ + git://git.freedesktop.org/git/mesa/demos $DIRNAME + +GIT_DIR=$DIRNAME/.git git archive --format=tar --prefix=$DIRNAME/ ${1:-HEAD} \ + | bzip2 > $DIRNAME.tar.bz2 + +# rm -rf $DIRNAME diff --git a/sources b/sources index e69de29..8c26bf9 100644 --- a/sources +++ b/sources @@ -0,0 +1,2 @@ +9ed011dfe6f987c089723cc1fc33fad9 mesa-demos-20100615.tar.bz2 +cb304d1ce562ac48b68eedeba38c662f xdriinfo-1.0.3.tar.bz2