rpms/ogre/devel ogre-samples.sh,NONE,1.1 ogre.spec,1.5,1.6

Hans de Goede (jwrdegoede) fedora-extras-commits at redhat.com
Mon Jan 22 16:02:55 UTC 2007


Author: jwrdegoede

Update of /cvs/extras/rpms/ogre/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29025

Modified Files:
	ogre.spec 
Added Files:
	ogre-samples.sh 
Log Message:
* Fri Jan 19 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 1.2.3-2
- Rebuild for new cairomm
- Added a samples sub-package (suggested by Xavier Decoret)



--- NEW FILE ogre-samples.sh ---
#!/bin/bash

set -e

# find out LIBDIR
if [ -x /usr/lib64/OGRE/Samples/resources.cfg ]; then
  LIBDIR=/usr/lib64
else
  LIBDIR=/usr/lib
fi

mkdir -p $HOME/.ogre-samples
cd $HOME/.ogre-samples

cp -f $LIBDIR/OGRE/Samples/resources.cfg .
cp -f $LIBDIR/OGRE/Samples/media.cfg .

echo "# Defines plugins to load" > plugins.cfg
echo >> plugins.cfg
echo "# Define plugin folder" >> plugins.cfg
echo "PluginFolder=$LIBDIR/OGRE" >> plugins.cfg
echo >> plugins.cfg
echo "# Define D3D rendering implementation plugin" >> plugins.cfg
for i in `(cd $LIBDIR/OGRE; ls *.so)`; do
  if [ $i != libOgrePlatform.so ]; then
    echo "Plugin=$i" >> plugins.cfg
  fi
done

for i in `(cd $LIBDIR/OGRE/Samples/; find -type f -perm +111)`; do
  if [ $i != ./BSP ]; then
    $LIBDIR/OGRE/Samples/$i
  fi
done


Index: ogre.spec
===================================================================
RCS file: /cvs/extras/rpms/ogre/devel/ogre.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ogre.spec	27 Oct 2006 15:58:04 -0000	1.5
+++ ogre.spec	22 Jan 2007 16:02:25 -0000	1.6
@@ -1,11 +1,12 @@
 Name:           ogre
 Version:        1.2.3
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Object-Oriented Graphics Rendering Engine
 License:        LGPL
 Group:          System Environment/Libraries
 URL:            http://www.ogre3d.org/
 Source0:        http://dl.sf.net/sourceforge/ogre/ogre-linux_osx-v%(echo %{version} | tr . -).tar.bz2
+Source1:        ogre-samples.sh
 Patch0:         ogre-1.2.1-rpath.patch
 Patch1:         ogre-1.2.2-soname.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -42,6 +43,17 @@
 manual. Install this package if you want to develop programs that use Ogre.
 
 
+%package samples
+Summary: Ogre samples executables and media.
+Group:  Documentation
+
+%description samples
+This package contains the compiled (not the source) sample applications coming
+with Ogre.  It also contains some media (meshes, textures,...) needed by these
+samples. The samples are installed in %{_libdir}/Samples and must be executed
+from this directory!
+
+
 %prep
 %setup -q -n ogrenew
 %patch0 -p1 -z .rpath
@@ -54,9 +66,13 @@
 # we don't do this with a patch since we need %{_libdir}
 sed -i 's|libOgrePlatform.so|%{_libdir}/OGRE/libOgrePlatform.so|' \
   OgreMain/include/OgrePlatform.h
-rm -fr `find Docs -name CVS`
+# stop some CVS dirs from getting installed
+rm -fr `find Docs Samples/Media -name CVS`
 #remove execute bits from src-files for -debuginfo package
 chmod -x `find RenderSystems/GL -type f`
+# Fix path to Media files for the Samples
+sed -i 's|../../Media|%{_datadir}/OGRE/Samples/Media|g' \
+  Samples/Common/bin/resources.cfg
 
 
 %build
@@ -94,6 +110,21 @@
 install -p -m 644 Samples/Media/materials/textures/ogrelogo-small.jpg \
   $RPM_BUILD_ROOT%{_datadir}/OGRE/Media
 
+# Install the samples
+mkdir -p $RPM_BUILD_ROOT%{_libdir}/OGRE/Samples
+for exe in `find Samples/Common/bin -type f -perm +111 -print -maxdepth 1`
+do
+  install -p -m 755 $exe $RPM_BUILD_ROOT%{_libdir}/OGRE/Samples
+done
+for cfg in `find Samples/Common/bin -name \*.cfg -print -maxdepth 1`
+do
+  install -p -m 644 $cfg $RPM_BUILD_ROOT%{_libdir}/OGRE/Samples
+done
+install -p -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/Ogre-Samples
+
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/OGRE/Samples
+cp -a Samples/Media $RPM_BUILD_ROOT%{_datadir}/OGRE/Samples
+
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -112,6 +143,9 @@
 %{_libdir}/lib*Ogre*-%{version}.so
 %{_libdir}/OGRE
 %{_datadir}/OGRE
+%exclude %{_bindir}/Ogre-Samples
+%exclude %{_libdir}/OGRE/Samples
+%exclude %{_datadir}/OGRE/Samples
 
 %files devel
 %defattr(-,root,root,-)
@@ -124,8 +158,18 @@
 %defattr(-,root,root,-)
 %doc LINUX.DEV Docs/api Docs/manual Docs/vbo-update Docs/style.css
 
+%files samples
+%defattr(-,root,root)
+%{_bindir}/Ogre-Samples
+%{_libdir}/OGRE/Samples
+%{_datadir}/OGRE/Samples
+
 
 %changelog
+* Fri Jan 19 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 1.2.3-2
+- Rebuild for new cairomm
+- Added a samples sub-package (suggested by Xavier Decoret)
+
 * Fri Oct 27 2006 Hans de Goede <j.w.r.degoede at hhs.nl> 1.2.3-1
 - New upstream release 1.2.3
 - Warning as always with a new upstream ogre release this breaks the ABI




More information about the scm-commits mailing list