diff --git a/OpenSceneGraph.spec b/OpenSceneGraph.spec index 4812582..9b08e9d 100644 --- a/OpenSceneGraph.spec +++ b/OpenSceneGraph.spec @@ -5,6 +5,7 @@ # %define apivers 2.4.0 +%define srcvers 2.4 # HACK: Work around to yum not being able to remove packages %define _obsolete_Producer 1 @@ -13,26 +14,16 @@ %define OSG1_Producer 1:1.2-0 Name: OpenSceneGraph -Version: 2.4.0 -Release: 3%{?dist} +Version: %{apivers} +Release: 4%{?dist} Summary: High performance real-time graphics toolkit Group: Applications/Multimedia # The OSGPL is just the wxWidgets license. License: wxWidgets URL: http://www.openscenegraph.org/ -%if "%{version}" >= "2.4.0" -Source0: http://www.openscenegraph.org/files/OpenSceneGraph-2.4.0/OpenSceneGraph-%{version}.zip -Patch0: OpenSceneGraph-2.4.0.diff -%else -%if "%{version}" >= "2.2.0" -Source0: http://www.openscenegraph.org/downloads/developer_releases/OpenSceneGraph-%{version}.zip -Patch0: OpenSceneGraph-2.2.0.diff -%else -Source0: http://www.openscenegraph.org/downloads/stable_releases/OpenSceneGraph-%{version}.zip +Source0: http://www.openscenegraph.org/downloads/stable_releases/OpenSceneGraph-%{srcvers}/OpenSceneGraph-%{version}.zip Patch0: OpenSceneGraph-%{version}.diff -%endif -%endif BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -59,6 +50,10 @@ BuildRequires: SDL-devel BuildRequires: fltk-devel +# OSG packaging madness ;) +%if "%{version}" >= "2.6.0" +%define OSGSRCDIR OpenSceneGraph-%{version} +%else %if "%{version}" >= "2.4.0" %define OSGSRCDIR OpenSceneGraph %else @@ -68,6 +63,7 @@ BuildRequires: fltk-devel %define OSGSRCDIR OpenSceneGraph %endif %endif +%endif %if "%{name}" == "OpenSceneGraph" Provides: OpenSceneGraph2 = %{version}-%{release} @@ -86,18 +82,32 @@ for rapid development of graphics applications. %setup -q -c cd %{OSGSRCDIR} %{?PATCH0:%patch0 -p1} +%if "%{version}" >= "2.4.0" +sed -i \ + -e 's,^OUTPUT_DIRECTORY.*doc/,OUTPUT_DIRECTORY = doc,' \ + -e 's,^HTML_OUTPUT[ ]*= OpenSceneGraphReferenceDocs,HTML_OUTPUT = html,' \ + doc/Doxyfiles/doxyfile.cmake +%endif cd .. %build mkdir -p BUILD pushd BUILD -# FIXME: Should add -DBUILD_DOCUMENTATION=ON to build the docs, but it's broken +%if "%{version}" >= "2.4.0" +%cmake -DBUILD_OSG_EXAMPLES=ON -DBUILD_OSG_WRAPPERS=ON -DBUILD_DOCUMENTATION=ON ../%{OSGSRCDIR} +%else +# Should add -DBUILD_DOCUMENTATION=ON, but it's broken %cmake -DBUILD_OSG_EXAMPLES=ON -DBUILD_OSG_WRAPPERS=ON ../%{OSGSRCDIR} +%endif make VERBOSE=1 %{?_smp_mflags} -# FIXME: Manually invoke doxygen, because doc-building is broken in OSG's cmake stuff +%if "%{version}" >= "2.4.0" +make DoxygenDoc +%else +# Manually invoke doxygen, because doc-building is broken in OSG's cmake stuff OSGHOME=../%{OSGSRCDIR} doxygen ../%{OSGSRCDIR}/doc/Doxyfiles/core_Doxyfile +%endif popd # HACK: Upstream stuff lacks cmake support and is broken @@ -137,11 +147,14 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) -%doc %{OSGSRCDIR}/*.txt +%doc %{OSGSRCDIR}/{AUTHORS,LICENSE,NEWS,README}.txt %{_bindir}/osgarchive %{_bindir}/osgconv %{_bindir}/osgversion %{_bindir}/osgviewer +%if "%{version}" >= "2.6.0" +%{_bindir}/osgfilecache +%endif %package libs Summary: Devel files for OpenSceneGraph @@ -249,6 +262,26 @@ Sample applications for OpenSceneGraph %files examples %defattr(-,root,root,-) +%if "%{version}" >= "2.6.0" +%{_bindir}/osgfilecache +%{_bindir}/osgfont +%{_bindir}/osgimagesequence +%{_bindir}/osgkdtree +%{_bindir}/osgscreencapture +%{_bindir}/osgwidgetaddremove +%{_bindir}/osgwidgetbox +%{_bindir}/osgwidgetcanvas +%{_bindir}/osgwidgetframe +%{_bindir}/osgwidgetinput +%{_bindir}/osgwidgetlabel +%{_bindir}/osgwidgetmenu +%{_bindir}/osgwidgetnotebook +%{_bindir}/osgwidgetscrolled +%{_bindir}/osgwidgetshader +%{_bindir}/osgwidgetstyled +%{_bindir}/osgwidgettable +%{_bindir}/osgwidgetwindow +%endif %if "%{version}" >= "2.4.0" %{_bindir}/osggeometryshaders %{_bindir}/osgmultiplerendertargets @@ -373,7 +406,7 @@ compile-time in a shared object library. %files -n OpenThreads %defattr(-,root,root,-) -%doc %{OSGSRCDIR}/*.txt +%doc %{OSGSRCDIR}/{AUTHORS,LICENSE,NEWS,README}.txt %{_libdir}/libOpenThreads.so.* # OpenThreads-devel @@ -394,6 +427,11 @@ Development files for OpenThreads. %{_includedir}/OpenThreads %changelog +* Wed Aug 13 2008 Ralf Corsépius - 2.4.0-4 +- Preps for 2.6.0. +- Reflect the Source0-URL having changed. +- Major spec-file overhaul. + * Thu May 22 2008 Tom "spot" Callaway - 2.4.0-3 - fix license tag