Hi Eric, Hi Timo,

Fedora 8 repository already have OpenSceneGraph package for OSG 2.0.
You can take the source package and use its spec file.

HTH

David Callu


2008/5/15 Eric Sokolowsky <[EMAIL PROTECTED]>:

> Timo Penndorf wrote:
>
>> Hello,
>>
>> i want to create rpm packages of osg for fedora. Are
>> there spec files?
>>
>
>
> I had a spec file for OSG 1.2, but it's woefully out of date. I intend to
> update it for OSG 2.4 at some point but I have to get my application working
> with 2.4 first. If you want to start with my spec file it's attached. I did
> remove glut support and introspection so if you want those pieces you'll
> have to add them yourself. It's possible that the original author (Ralf
> Corsepius) has maintained this file more thoroughly than I have.
>
> -Eric
>
> #
> # Copyright (c) 2005, 2006 Ralf Corsepius, Ulm, Germany.
> # This file and all modifications and additions to the pristine
> # package are under the same license as the package itself.
> #
>
> %define apivers 1.0
> %define osgvers 1.2
> %define otvers 1.5
> %define prodvers 1.1
>
> Name:           OpenSceneGraph
> Version:        %{osgvers}
> Release:        svs11.rh5%{?dist}
> Summary:        High performance real-time graphics toolkit
>
> Group:          Applications/Multimedia
> License:        OSGPL
> URL:            http://www.openscenegraph.org/
> Source0 <http://www.openscenegraph.org/Source0>:
> http://www.openscenegraph.org/downloads/snapshots/OSG_OP_OT-%{osgvers}.zip<http://www.openscenegraph.org/downloads/snapshots/OSG_OP_OT-%%7Bosgvers%7D.zip>
>
> Patch0:         OpenSceneGraph-%{osgvers}.diff
>
> BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u}
> -n)
>
> BuildRequires:  flex bison
> #BuildRequires:  libGL-devel
> #BuildRequires:         libGLU-devel
> #BuildRequires: libXmu-devel
> #BuildRequires: libX11-devel
> BuildRequires:  Inventor-devel
> #BuildRequires: freeglut-devel
> BuildRequires:  libjpeg-devel
> BuildRequires:  giflib-devel
> BuildRequires:  libtiff-devel
> BuildRequires:  libpng-devel
> BuildRequires:  doxygen
> Requires:       libstdc++ >= 4.0.2
>
> %{?_with_gdal:BuildRequires:    gdal-devel}
> %{?_with_demeter:BuildRequires: demeter-devel}
>
> %description
> The OpenSceneGraph is an OpenSource, cross platform graphics toolkit for
> the
> development of high performance graphics applications such as flight
> simulators, games, virtual reality and scientific visualization.
> Based around the concept of a SceneGraph, it provides an object oriented
> framework on top of OpenGL freeing the developer from implementing and
> optimizing low level graphics calls, and provides many additional utilities
> for rapid development of graphics applications.
>
> %prep
> %setup -q -n OSG_OP_OT-%{osgvers}
> %patch0 -p1
>
> # backup, we hack this file later
> cp OpenSceneGraph/Make/dependencies \
>  OpenSceneGraph/Make/dependencies.bak
>
> # Propagate RPM_OPT_FLAGS
> for file in OpenSceneGraph/src/osgWrappers/*/GNUmakefile; do
>  sed -i -e '/^OPTF.*$/d' $file
> done
>
> for dir in OpenThreads Producer OpenSceneGraph; do
> # Add DESTDIR
> # Remove bogus -lstdc++
> # Install examples to %%{_bindir}
>  sed -i \
>    -e 's,^\(INST_LOCATION[ ]*?=\).*$,\1 $(DESTDIR)%{_prefix},g' \
>    -e 's,^\(INST_INCLUDE[ ]*=\).*$,\1 $(DESTDIR)%{_includedir},g' \
>    -e 's,^\(INST_SHARE[ ]*=\).*$,\1 $(DESTDIR)%{_datadir},g' \
>    -e 's,^\(INST_LIBS[ ]*=\).*$,\1 $(DESTDIR)%{_libdir},g' \
>    -e 's,^\(INST_EXAMPLES[ ]*=\).*$,\1 $(DESTDIR)%{_bindir},g' \
>    -e 's,\(^[ \t]*LIBS[ ]*=.*\) -lstdc++,\1,g' \
>    -e 's, -lXi,,g' \
>    -e 's,^\([ ]*LDFLAGS.*soname.*$\),# \1,g' \
>    $dir/Make/makedefs
>
> # Propagate RPM_OPT_FLAGS
>  echo "OPTF = $RPM_OPT_FLAGS" >> $dir/Make/makedefs
>
> # Fix quoting bug
>  sed -i \
>    -e 's, DOF=$(OPTF) , "DOF=$(OPTF)" ,g' \
>    $dir/Make/makerules
>
> # Fix broken shell fragments
>  sed -i \
>    -e 's,do\\,do \\,g' \
>    -e 's,else\\,else \\,g' \
>    -e 's,fi\\,fi;\\,g' \
>    -e 's,done\\,done;\\,g' \
>    -e 's,then\\,then \\,g' \
>    $dir/Make/*rules
>
>  find $dir -name GNUmakefile -exec grep -l '^[ ]*LIB[ ]*=' {} \; | \
>    xargs sed -i \
>      -e 's,\(^include.*makedefs\)[ ]*$,\1\ninclude
> \$(TOPDIR)/Make/libdefs,'
>
> # Fix libdir
>  sed -i \
>    -e 's,^prefix=.*$,prefix = %{_prefix},' \
>    -e 's,^includedir=.*$,includedir = %{_includedir},' \
>    -e 's,^libdir=.*$,libdir = %{_libdir},' \
>    -e 's,^Version:.*$,Version: %{apivers},' \
>    -e '/^Conflicts:$/d' \
>    $dir/Make/$(echo $dir | tr [:upper:] [:lower:]).pc
> done
>
> %build
> rm -rf $RPM_BUILD_ROOT
> %ifarch x86_64
> export
> LD_LIBRARY_PATH="$PWD/Producer/lib/Linux64:$PWD/OpenThreads/lib/Linux64"
> %else
> export
> LD_LIBRARY_PATH="$PWD/Producer/lib/Linux32:$PWD/OpenThreads/lib/Linux32"
> %endif
>
> # configure
> echo "# Fedora custom settings" > OpenSceneGraph/Make/dependencies
> echo "COMPILE_EXAMPLES = yes" >> OpenSceneGraph/Make/dependencies
> #echo "COMPILE_INTROSPECTION = yes" >> OpenSceneGraph/Make/dependencies
> echo "INVENTOR_INSTALLED = yes" >> OpenSceneGraph/Make/dependencies
> #echo "GLUT_INSTALLED = yes" >> OpenSceneGraph/Make/dependencies
> %{?_with_gdal:echo "GDAL_INSTALLED = yes" >>
> OpenSceneGraph/Make/dependencies}
> %{?_with_demeter:echo "DEMETER_INSTALLED = yes" >>
> OpenSceneGraph/Make/dependencies}
> echo >> OpenSceneGraph/Make/dependencies
> cat OpenSceneGraph/Make/dependencies.bak >>
> OpenSceneGraph/Make/dependencies
>
> for dir in OpenThreads Producer OpenSceneGraph; do
>  make -j 3 -C $dir \
>    COMPILE_OSG_OP_OT_WITH_SONAMES=YES \
>    OPENTHREADS_INC_DIR="$PWD/OpenThreads/include" \
>    OPENTHREADS_LIB_DIR="$PWD/OpenThreads/lib/\$(OS)\$(ARCH)" \
>    PRODUCER_INC_DIR="$PWD/Producer/include" \
>    PRODUCER_LIB_DIR="$PWD/Producer/lib/\$(OS)\$(ARCH)" \
>    %{?_smp_mflags}
> done
>
>  doxygen OpenThreads/dist/debian/Doxyfile-openthreads
>  doxygen OpenSceneGraph/dist/debian/Doxyfile-openscenegraph
>  doxygen Producer/dist/debian/Doxyfile-producer
>
> %install
> rm -rf $RPM_BUILD_ROOT
> %ifarch x86_64
> export
> LD_LIBRARY_PATH="$PWD/Producer/lib/Linux64:$PWD/OpenThreads/lib/Linux64"
> %else
> export
> LD_LIBRARY_PATH="$PWD/Producer/lib/Linux32:$PWD/OpenThreads/lib/Linux32"
> %endif
>
> for dir in OpenThreads Producer OpenSceneGraph; do
>  make -C $dir \
>    COMPILE_OSG_OP_OT_WITH_SONAMES="YES" \
>    OPENTHREADS_INC_DIR="$PWD/OpenThreads/include" \
>    OPENTHREADS_LIB_DIR="$PWD/OpenThreads/lib/\$(OS)\$(ARCH)" \
>    PRODUCER_INC_DIR="$PWD/Producer/include" \
>    PRODUCER_LIB_DIR="$PWD/Producer/lib/\$(OS)\$(ARCH)" \
>    install DESTDIR="$RPM_BUILD_ROOT"
> done
>
> rm -rf $RPM_BUILD_ROOT%{_datadir}/OpenSceneGraph/src
>
> # HACK ALERT: This should be fixed inside of the makefiles.
> # fix up shared library symlinks
> pushd ${RPM_BUILD_ROOT}%{_libdir} > /dev/null
>  for i in lib*.so; do
>    if test -f $i; then
>      rm -f $i.*
>      soname=$(objdump -p $i | grep SONAME | sed 's,[ ]*SONAME[ ]*,,')
>      mv $i $soname
>      ln -s $soname $i
>    fi
>  done
> popd > /dev/null
> /sbin/ldconfig -n ${RPM_BUILD_ROOT}%{_libdir}
>
> install -m 644 -D OpenThreads/Make/openthreads.pc
> ${RPM_BUILD_ROOT}%{_libdir}/pkgconfig/openthreads.pc
> install -m 644 -D OpenSceneGraph/Make/openscenegraph.pc
> ${RPM_BUILD_ROOT}%{_libdir}/pkgconfig/openscenegraph.pc
> install -m 644 -D Producer/Make/producer.pc
> ${RPM_BUILD_ROOT}%{_libdir}/pkgconfig/producer.pc
>
> %clean
> rm -rf $RPM_BUILD_ROOT
>
> %post -p /sbin/ldconfig
>
> %postun -p /sbin/ldconfig
>
>
> %files
> %defattr(-,root,root,-)
> %doc OpenSceneGraph/*.txt
> %{_bindir}/osgarchive
> %{_bindir}/osgconv
> %{_bindir}/osgversion
> %{_bindir}/osgviewer
> %{?_with_gdal:%{_bindir}/osgdem}
> %{_libdir}/osgPlugins
> %{_libdir}/libosg*.so.*
>
> %package devel
> Summary:        Devel files for OpenSceneGraph
> Group:          Applications/Multimedia
> Requires:       %name = %{version}-%{release}
> Requires:       Producer-devel = %{prodvers}-%{release}
>
> %description devel
> Development files for OpenSceneGraph.
>
> %files devel
> %defattr(-,root,root,-)
> %doc OpenSceneGraph/html
> %{_includedir}/osg*
> %{_libdir}/pkgconfig/openscenegraph.pc
> %{_libdir}/libosg*.so
>
> # OpenSceneGraph-examples
> %package examples
> Summary:        Sample applications for OpenSceneGraph
> Group:          Applications/Multimedia
>
> %description examples
> Sample applications for OpenSceneGraph
>
> %files examples
> %defattr(-,root,root,-)
> %{_bindir}/osganimate
> %{_bindir}/osgautotransform
> %{_bindir}/osgbillboard
> %{_bindir}/osgblendequation
> %{_bindir}/osgcallback
> %{_bindir}/osgcamera
> %{_bindir}/osgcameragroup
> %{_bindir}/osgcatch
> #%{_bindir}/osgcegui
> %{_bindir}/osgclip
> %{_bindir}/osgcluster
> %{_bindir}/osgcopy
> %{_bindir}/osgcubemap
> %{_bindir}/osgdelaunay
> %{_bindir}/osgdepthpartition
> %{_bindir}/osgdepthshadow
> %{_bindir}/osgdistortion
> %{_bindir}/osgforest
> %{_bindir}/osgfxbrowser
> %{_bindir}/osggeodemo
> %{_bindir}/osggeometry
> %{_bindir}/osghangglide
> %{_bindir}/osghud
> %{_bindir}/osgimpostor
> #%{_bindir}/osgintrospection
> %{_bindir}/osgkeyboard
> %{_bindir}/osgkeyboardmouse
> %{_bindir}/osglauncher
> %{_bindir}/osglight
> %{_bindir}/osglightpoint
> %{_bindir}/osglogicop
> %{_bindir}/osglogo
> %{_bindir}/osgmotionblur
> %{_bindir}/osgmovie
> %{_bindir}/osgmultiplecameras
> %{_bindir}/osgmultitexture
> %{_bindir}/osgoccluder
> %{_bindir}/osgpagedlod
> %{_bindir}/osgparametric
> %{_bindir}/osgparticle
> %{_bindir}/osgparticleeffects
> %{_bindir}/osgpick
> %{_bindir}/osgplanets
> %{_bindir}/osgpoints
> %{_bindir}/osgpointsprite
> %{_bindir}/osgprecipitation
> %{_bindir}/osgprerender
> %{_bindir}/osgprerendercubemap
> %{_bindir}/osgreflect
> %{_bindir}/osgscalarbar
> %{_bindir}/osgscribe
> %{_bindir}/osgsequence
> %{_bindir}/osgshaders
> %{_bindir}/osgshaderterrain
> %{_bindir}/osgshadowtexture
> %{_bindir}/osgshape
> %{_bindir}/osgsimple
> %{_bindir}/osgsimplepager
> %{_bindir}/osgsimplifier
> %{_bindir}/osgslice
> %{_bindir}/osgspacewarp
> %{_bindir}/osgspheresegment
> %{_bindir}/osgspotlight
> %{_bindir}/osgstereoimage
> %{_bindir}/osgteapot
> %{_bindir}/osgtesselate
> %{_bindir}/osgtext
> %{_bindir}/osgtexture1D
> %{_bindir}/osgtexture2D
> %{_bindir}/osgtexture3D
> %{_bindir}/osgtexturerectangle
> %{_bindir}/osgunittests
> %{_bindir}/osgvertexprogram
> %{_bindir}/osgvolume
> %{_bindir}/osgwindows
>
> %{?_with_gdal:%{_bindir}/osgphotoalbum}
> %{?_with_gdal:%{_bindir}/osgbluemarble}
> %{?_with_gdal:%{_bindir}/osgsimulation}
>
> #%{_bindir}/osgGLUTsimple
> #%{_bindir}/osgGLUTkeyboardmouse
>
> %{_datadir}/OpenSceneGraph
>
> # OpenThreads
> %package -n OpenThreads
> Summary:        OpenThreads
> Group:          Applications/Multimedia
> License:        LGPL
> Version:    %{otvers}
>
> %description -n OpenThreads
> OpenThreads is intended to provide a minimal & complete Object-Oriented
> (OO)
> thread interface for C++ programmers.  It is loosely modeled on the Java
> thread API, and the POSIX Threads standards.  The architecture of the
> library is designed around "swappable" thread models which are defined at
> compile-time in a shared object library.
>
> %post -n OpenThreads -p /sbin/ldconfig
>
> %postun -n OpenThreads -p /sbin/ldconfig
>
> %files -n OpenThreads
> %defattr(-,root,root,-)
> %doc OpenThreads/*.txt
> %{_libdir}/libOpenThreads.so.*
>
> # OpenThreads-devel
> %package -n OpenThreads-devel
> Summary:        Devel files for OpenThreads
> Group:          Applications/Multimedia
> License:        LGPL
> Requires:       OpenThreads = %{version}-%{release}
> Version:    %{otvers}
>
> %description -n OpenThreads-devel
> Development files for OpenThreads.
>
> %files -n OpenThreads-devel
> %defattr(-,root,root,-)
> %doc OpenThreads/html
> %{_libdir}/pkgconfig/openthreads.pc
> %{_libdir}/libOpenThreads.so
> %{_includedir}/OpenThreads
>
>
> # Producer
> %package -n Producer
> Summary:        Producer
> License:        OSGPL
> Group:          Applications/Multimedia
> Provides:       OpenProducer = %{version}-%{release}
> Version:    %{prodvers}
>
> %description -n Producer
> Open Producer (or simply Producer) is a cross-platform, C++ library for
> managing OpenGL rendering contexts in a windowing system independent
> manner.
> Producer provides a simple, yet powerfully scalable approach for real-time
> 3D
> applications wishing to run within a single window to large, multidisplay
> systems.
>
> %post -n Producer -p /sbin/ldconfig
>
> %postun -n Producer -p /sbin/ldconfig
>
> %files -n Producer
> %defattr(-,root,root,-)
> %doc Producer/*.txt
> %{_libdir}/libProducer.so.*
>
> # Producer-devel
> %package -n Producer-devel
> Summary:        Devel files for Producer
> Group:          Applications/Multimedia
> License:        OSGPL
> Requires:       Producer = %{version}-%{release}
> Requires:       OpenThreads-devel = %{otvers}-%{release}
> Provides:       OpenProducer-devel = %{version}-%{release}
> Version:    %{prodvers}
>
> %description -n Producer-devel
> Development files for Producer.
>
> %files -n Producer-devel
> %defattr(-,root,root,-)
> %doc Producer/html
> %{_libdir}/pkgconfig/producer.pc
> %{_libdir}/libProducer.so
> %{_includedir}/Producer
>
> %changelog
> * Wed Oct 11 2006 Eric Sokolowsky <[EMAIL PROTECTED]> 1.2
> - Removed irrelevant build dependencies.
> - Added requirement for libstdc++ version.
> - Removed Introspection and glut.
> - Compiles with -j 3 for greater parallelization.
> - Moved the doxygen files within the distribution.
> - Updated example program list found with OSG 1.2, removing osgfbo,
>  osgpbuffer, osgdemeter, and osgcameragroup; and adding osgcegui (which
>  has external dependencies so is not used).
> - Updated version numbers for Producer (1.1) and OpenThreads (1.5).
>
> * Tue Sep 05 2006 Ralf CorsÃ(c)pius <[EMAIL PROTECTED]> - %{osgvers}-2
> - Mass rebuild.
>
> * Thu Aug 24 2006 Ralf CorsÃ(c)pius <[EMAIL PROTECTED]> - 1.1-1
> - Upstream update.
>
> * Sat Jul 08 2006 Ralf CorsÃ(c)pius <[EMAIL PROTECTED]> - 1.0-5
> - Rebuilt to with gcc-4.1.1-6.
>
> * Tue Jun 07 2006 Ralf CorsÃ(c)pius <[EMAIL PROTECTED]> - 1.0-4
> - Try to avoid adding SONAMEs on plugins and applications.
>
> * Tue Jun 06 2006 Ralf CorsÃ(c)pius <[EMAIL PROTECTED]> - 1.0-3
> - Add SONAME hack to spec (PR 193934).
> - Regenerate OpenSceneGraph-1.0.diff.
> - Remove OpenSceneGraph-1.0.diff from look-aside cache. Add to CVS instead.
> - Fix broken shell fragments.
>
> * Sun Feb 19 2006 Ralf CorsÃ(c)pius <[EMAIL PROTECTED]> - 1.0-2
> - Rebuild.
>
> * Sat Dec 10 2005 Ralf CorsÃ(c)pius <[EMAIL PROTECTED]> - 1.0-1
> - Upstream update.
>
> * Wed Dec 07 2005 Ralf CorsÃ(c)pius <[EMAIL PROTECTED]> - 0.9.9-5
> - Try at getting this package buildable with modular X11.
>
> * Tue Dec 06 2005 Ralf Corsepius <[EMAIL PROTECTED]> - 0.9.9-4%{?dist}.1
> - Merge diffs into one file.
> - Fix up *.pcs from inside of *.spec.
>
> * Sun Aug 28 2005 Ralf Corsepius <[EMAIL PROTECTED]> - 0.9.9-4
> - Propagate %%_libdir to pkgconfig files.
> - Fix typo in %%ifarch magic to setup LD_LIBRARY_PATH
> - Move configuration to %%build.
> - Spec file cosmetics.
>
> * Sat Aug 27 2005 Ralf Corsepius <[EMAIL PROTECTED]> - 0.9.9-3
> - Add full URL to Debian patch.
> - Add _with_demeter.
> - Extend Producer %%description.
> - Extend OpenThreads %%description.
>
> * Tue Aug 09 2005 Ralf Corsepius <[EMAIL PROTECTED]> - 0.9.9-2
> - Fix license to OSGPL.
> - Change permissions on pkgconfig files to 0644.
>
> * Tue Aug 02 2005 Ralf Corsepius <[EMAIL PROTECTED]> - 0.9.9-1
> - FE submission.
>
> * Thu Jul 21 2005 Ralf Corsepius <[EMAIL PROTECTED]> - 0.9.9-0
> - Initial spec.
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to