File OpenSceneGraph.spec of Package OpenSceneGraph
#
# spec file for package OpenSceneGraph
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%if 0%{?suse_version} > 1320 || (0%{?suse_version} == 1315 && 0%{?is_opensuse})
%bcond_without gdal
%else
%bcond_with gdal
%endif
%define _osg_so_nr 130
%define _opt_so_nr 20
Name: OpenSceneGraph
Version: 3.4.0
Release: 0
Summary: Open source high performance 3D graphics toolkit
License: LGPL-2.1
Group: Productivity/Graphics/Other
# NOTE: also SUSE-wxWidgets-3.0 http://trac.openscenegraph.org/projects/osg/attachment/wiki/Legal/LICENSE.txt
Url: http://openscenegraph.org/projects/osg
Source0: http://www.openscenegraph.org/downloads/stable_releases/OpenSceneGraph-%{version}/source/%{name}-%{version}.zip
Source99: %{name}-rpmlintrc
BuildRequires: cmake
BuildRequires: curl-devel
BuildRequires: fltk-devel
BuildRequires: freeglut-devel
BuildRequires: freetype2-devel
BuildRequires: gcc-c++
BuildRequires: giflib-devel
BuildRequires: libSDL-devel
BuildRequires: libSDL2-devel
BuildRequires: libjasper-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: libtiff-devel
BuildRequires: openal-soft-devel
BuildRequires: pkgconfig
BuildRequires: qt-devel
BuildRequires: unzip
BuildRequires: update-desktop-files
BuildRequires: wxWidgets-devel
%if %{with gdal}
BuildRequires: pkgconfig(gdal)
%endif
BuildRequires: pkgconfig(gstreamer-1.0)
BuildRequires: pkgconfig(gstreamer-app-1.0)
BuildRequires: pkgconfig(gstreamer-audio-1.0)
BuildRequires: pkgconfig(gstreamer-base-1.0)
BuildRequires: pkgconfig(gstreamer-fft-1.0)
BuildRequires: pkgconfig(gstreamer-pbutils-1.0)
BuildRequires: pkgconfig(gstreamer-video-1.0)
BuildRequires: pkgconfig(gtk+-2.0)
BuildRequires: pkgconfig(gtkglext-1.0)
BuildRequires: pkgconfig(librsvg-2.0) >= 2.35
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(poppler-glib)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%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.
%package -n libOpenSceneGraph%{_osg_so_nr}
Summary: Shared libraries for OpenSceneGraph
Group: System/Libraries
%if "%{_osg_so_nr}" == "130"
# try to cover up past mistakes
Obsoletes: libOpenSceneGraph100
%endif
%description -n libOpenSceneGraph%{_osg_so_nr}
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.
This package contains the shared libraries for OpenSceneGraph.
%package -n libOpenSceneGraph-devel
Summary: OpenSceneGraph development files
Group: Development/Libraries/C and C++
Requires: SDL-devel
Requires: curl-devel
Requires: freeglut-devel
Requires: freetype2-devel
Requires: giflib-devel
Requires: libOpenSceneGraph%{_osg_so_nr} = %{version}
Requires: libOpenThreads-devel = %{version}
Requires: libjpeg-devel
Requires: libpng-devel
Requires: libpoppler-glib-devel
Requires: librsvg-devel
Requires: libtiff-devel
Requires: openal-soft-devel
Requires: qt-devel
%description -n libOpenSceneGraph-devel
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.
This package contains the header and development files for
OpenSceneGraph.
%package -n libOpenThreads%{_opt_so_nr}
Summary: Shared libraries for OpenSceneGraph
Group: System/Libraries
%description -n libOpenThreads%{_opt_so_nr}
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.
This package contains the shared libraries for OpenSceneGraph.
%package -n libOpenThreads-devel
Summary: OpenSceneGraph development files
Group: Development/Libraries/C and C++
Requires: libOpenThreads%{_opt_so_nr} = %{version}
%description -n libOpenThreads-devel
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.
This package contains the header and development files for
OpenSceneGraph.
%package plugins
Summary: Plugins for OpenSceneGraph
Group: Productivity/Graphics/Other
%description plugins
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.
This package contains some plugins for OpenSceneGraph.
%package examples
Summary: OpenSceneGraph example applications
Group: Productivity/Graphics/Other
%description examples
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.
This package contains some example applications built with OpenSceneGraph
%prep
%setup -q
for file in *.txt ChangeLog; do
sed -i "s/\r//g" "$file"
done
chmod 644 *.txt ChangeLog
%build
%cmake \
-DBUILD_OSG_EXAMPLES=ON \
-DBUILD_OSG_PLUGINS=ON \
-DBUILD_DOCUMENTATION=OFF \
-DBUILD_OSG_WRAPPER=ON \
-DBUILD_OSG_APPLICATIONS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DDYNAMIC_OPENSCENEGRAPH=ON \
-DDYNAMIC_OPENTHREADS=ON
make %{?_smp_mflags}
%install
%cmake_install
# example bins installed in share dir, not acceptable. Note, this will break
# when %%{_datadir}/OpenSceneGraph is also used for other stuff
mv %{buildroot}%{_datadir}/OpenSceneGraph \
%{buildroot}%{_libdir}
%post -n libOpenSceneGraph%{_osg_so_nr} -p /sbin/ldconfig
%post -n libOpenThreads%{_opt_so_nr} -p /sbin/ldconfig
%postun -n libOpenSceneGraph%{_osg_so_nr} -p /sbin/ldconfig
%postun -n libOpenThreads%{_opt_so_nr} -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc AUTHORS.txt LICENSE.txt NEWS.txt README.txt ChangeLog
%{_bindir}/osg2cpp
%{_bindir}/osgarchive
%{_bindir}/osgconv
%{_bindir}/osgfilecache
%{_bindir}/osgversion
%{_bindir}/osgviewer
%{_bindir}/present3D
%files plugins
%defattr(-,root,root)
%{_libdir}/osgPlugins-%{version}/
%files -n libOpenSceneGraph%{_osg_so_nr}
%defattr(-,root,root)
%{_libdir}/libosg.so.*
%{_libdir}/libosgAnimation.so.*
%{_libdir}/libosgDB.so.*
%{_libdir}/libosgFX.so.*
%{_libdir}/libosgGA.so.*
%{_libdir}/libosgManipulator.so.*
%{_libdir}/libosgParticle.so.*
%{_libdir}/libosgShadow.so.*
%{_libdir}/libosgSim.so.*
%{_libdir}/libosgTerrain.so.*
%{_libdir}/libosgText.so.*
%{_libdir}/libosgUtil.so.*
%{_libdir}/libosgUI.so.*
%{_libdir}/libosgVolume.so.*
%{_libdir}/libosgViewer.so.*
%{_libdir}/libosgWidget.so.*
%{_libdir}/libosgPresentation.so.*
%{_libdir}/libosgQt.so.*
%files -n libOpenSceneGraph-devel
%defattr(-,root,root)
%{_includedir}/osg/
%{_includedir}/osgAnimation/
%{_includedir}/osgDB/
%{_includedir}/osgFX/
%{_includedir}/osgGA/
%{_includedir}/osgManipulator/
%{_includedir}/osgParticle/
%{_includedir}/osgShadow/
%{_includedir}/osgSim/
%{_includedir}/osgTerrain/
%{_includedir}/osgText/
%{_includedir}/osgUI/
%{_includedir}/osgUtil/
%{_includedir}/osgViewer/
%{_includedir}/osgVolume/
%{_includedir}/osgWidget/
%{_includedir}/osgQt/
%{_includedir}/osgPresentation/
%{_libdir}/libosg.so
%{_libdir}/libosgAnimation.so
%{_libdir}/libosgDB.so
%{_libdir}/libosgFX.so
%{_libdir}/libosgGA.so
%{_libdir}/libosgManipulator.so
%{_libdir}/libosgParticle.so
%{_libdir}/libosgShadow.so
%{_libdir}/libosgSim.so
%{_libdir}/libosgTerrain.so
%{_libdir}/libosgText.so
%{_libdir}/libosgUI.so
%{_libdir}/libosgUtil.so
%{_libdir}/libosgViewer.so
%{_libdir}/libosgVolume.so
%{_libdir}/libosgWidget.so
%{_libdir}/libosgPresentation.so
%{_libdir}/libosgQt.so
%{_libdir}/pkgconfig/openscenegraph.pc
%{_libdir}/pkgconfig/openscenegraph-osg*.pc
%files examples
%defattr(-,root,root)
%{_libdir}/OpenSceneGraph
%files -n libOpenThreads%{_opt_so_nr}
%defattr(-,root,root)
%{_libdir}/libOpenThreads.so.*
%files -n libOpenThreads-devel
%defattr(-,root,root)
%{_includedir}/OpenThreads/
%{_libdir}/libOpenThreads.so
%{_libdir}/pkgconfig/openthreads.pc
%changelog