File tulip.spec of Package tulip

#
# spec file for package tulip (Version 3.3.1)
#
# Copyright (c) 2010 SUSE LINUX Products 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/
#

# norootforbuild

%define use_cmake 0

Name:           tulip
BuildRequires:  Mesa-devel doxygen freefont ftgl-devel glew-devel libdrm-devel libjpeg-devel libqt4-devel libxml2-devel update-alternatives update-desktop-files xorg-x11-devel
BuildRequires:  cmake
%if 0%{?suse_version} > 1110
BuildRequires:  libgle-devel
%else
BuildRequires:  gle
%endif
# These are for (cd docs; make html) below
# To speed up build time, this is pre-generated
#BuildRequires: doxygen graphviz-gd xmltex passivetex texlive texlive-bin java libqt4-devel-doc-data
%if 0%{?suse_version} > 1020
BuildRequires:  fdupes
%endif
Summary:        Visualization of huge graphs
Version:        3.3.1
Release:        1
# .so version
%define tulip_version 3.3
Url:            http://www.tulip-software.org
Source:         tulip-%{version}.tar.bz2
Source1:        tulip.desktop
Source2:        tulip-%{version}-userManual.pdf
Source3:        tulip-%{version}-devHandbook.pdf
Source4:        tulip-rpmlintrc
Patch:          tulip-gcc45.patch
Patch1:         lib64-install.patch
Patch2:         enable-tlprender.patch
License:        GPLv2+
Group:          Productivity/Graphics/Visualization/Graph
Requires:       Mesa
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
AutoReqProv:    on

%description
Tulip software is a system dedicated to the visualization of huge
graphs. It manages graphs with a number of elements(node and edges) up
to 500.000 on a personal computer(PIII 600, with 256MB). Its SuperGraph
technology architecture enables to do the following things :

* 3D visualizations
* 3D modifications
* Plug-in support for easy evolution
* Building of clusters and navigation into it
* Automatic drawing of graphs
* Automatic clustering of graphs
* Automatic selection of elements
* Automatic Metric coloration of graphs

Authors:
--------
    Auber David <auber@tulip-software.org>
    Visualization Module improvements, Bertrand Mathieu
    Tlp Import/export Improvements, Bertrand Mathieu
    A lot of other things, Bertrand Mathieu
    GCC-3 port of the Graph Library, Sebastien Grivet.
    GEM plug-in, David Duke.
    Adjacency Matrix import plug-in Luis Garcia.
    Poset Import plug-in Luis Garcia.

%package devel
License:        GPLv2+
Summary:        Visualization of huge graphs - development files
Group:          Development/Libraries/Other
Requires:       tulip = %{version}
%if 0%{?suse_version} >= 1120
BuildArch:      noarch
%endif

%description devel
Tulip software is a system dedicated to the visualization of huge
graphs. It manages graphs with a number of elements(node and edges) up
to 500.000 on a personal computer(PIII 600, with 256MB). Its SuperGraph
technology architecture enables to do the following things :

* 3D visualizations
* 3D modifications
* Plug-in support for easy evolution
* Building of clusters and navigation into it
* Automatic drawing of graphs
* Automatic clustering of graphs
* Automatic selection of elements
* Automatic Metric coloration of graphs

Authors:
--------
    Auber David <auber@tulip-software.org>
    Visualization Module improvements, Bertrand Mathieu
    Tlp Import/export Improvements, Bertrand Mathieu
    A lot of other things, Bertrand Mathieu
    GCC-3 port of the Graph Library, Sebastien Grivet.
    GEM plug-in, David Duke.
    Adjacency Matrix import plug-in Luis Garcia.
    Poset Import plug-in Luis Garcia.

%package doc
License:        GPLv2+
Summary:        Visualization of huge graphs - user documentation
Group:          Productivity/Graphics/Visualization/Graph
Requires:       tulip = %{version}
%if 0%{?suse_version} >= 1120
BuildArch:      noarch
%endif

%description doc
Tulip software is a system dedicated to the visualization of huge
graphs. It manages graphs with a number of elements(node and edges) up
to 500.000 on a personal computer(PIII 600, with 256MB). Its SuperGraph
technology architecture enables to do the following things :

* 3D visualizations
* 3D modifications
* Plug-in support for easy evolution
* Building of clusters and navigation into it
* Automatic drawing of graphs
* Automatic clustering of graphs
* Automatic selection of elements
* Automatic Metric coloration of graphs

Authors:
--------
    Auber David <auber@tulip-software.org>
    Visualization Module improvements, Bertrand Mathieu
    Tlp Import/export Improvements, Bertrand Mathieu
    A lot of other things, Bertrand Mathieu
    GCC-3 port of the Graph Library, Sebastien Grivet.
    GEM plug-in, David Duke.
    Adjacency Matrix import plug-in Luis Garcia.
    Poset Import plug-in Luis Garcia.

%package devel-doc
License:        GPLv2+
Summary:        Visualization of huge graphs - development documentation
Group:          Documentation/HTML
Requires:       tulip-doc = %{version}
%if 0%{?suse_version} >= 1120
BuildArch:      noarch
%endif

%description devel-doc
Tulip software is a system dedicated to the visualization of huge
graphs. It manages graphs with a number of elements(node and edges) up
to 500.000 on a personal computer(PIII 600, with 256MB). Its SuperGraph
technology architecture enables to do the following things :

* 3D visualizations
* 3D modifications
* Plug-in support for easy evolution
* Building of clusters and navigation into it
* Automatic drawing of graphs
* Automatic clustering of graphs
* Automatic selection of elements
* Automatic Metric coloration of graphs

Authors:
--------
    Auber David <auber@tulip-software.org>
    Visualization Module improvements, Bertrand Mathieu
    Tlp Import/export Improvements, Bertrand Mathieu
    A lot of other things, Bertrand Mathieu
    GCC-3 port of the Graph Library, Sebastien Grivet.
    GEM plug-in, David Duke.
    Adjacency Matrix import plug-in Luis Garcia.
    Poset Import plug-in Luis Garcia.

%package -n     libtulip
License:        GPLv2+
Summary:        A library for handling large graphs
Group:          Productivity/Graphics/Visualization/Graph

%description -n libtulip
See package 'tulip' for details.

Authors:
--------
    Auber David <auber@tulip-software.org>
    Visualization Module improvements, Bertrand Mathieu
    Tlp Import/export Improvements, Bertrand Mathieu
    A lot of other things, Bertrand Mathieu
    GCC-3 port of the Graph Library, Sebastien Grivet.
    GEM plug-in, David Duke.
    Adjacency Matrix import plug-in Luis Garcia.
    Poset Import plug-in Luis Garcia.

%package -n     libtulip-ogl
License:        GPLv2+
Summary:        A library for displaying graph in a GL context
Group:          Productivity/Graphics/Visualization/Graph
Requires:       Mesa

%description -n libtulip-ogl
See package 'tulip' for details.

Authors:
--------
    Auber David <auber@tulip-software.org>
    Visualization Module improvements, Bertrand Mathieu
    Tlp Import/export Improvements, Bertrand Mathieu
    A lot of other things, Bertrand Mathieu
    GCC-3 port of the Graph Library, Sebastien Grivet.
    GEM plug-in, David Duke.
    Adjacency Matrix import plug-in Luis Garcia.
    Poset Import plug-in Luis Garcia.

%package -n     libtulip-qt4
License:        GPLv2+
Provides:       libtulip-qt3
Obsoletes:      libtulip-qt3
Summary:        A set of Qt Widgets for tulip/tulip-ogl
Group:          Productivity/Graphics/Visualization/Graph

%description -n libtulip-qt4
See package 'tulip' for details.

Authors:
--------
    Auber David <auber@tulip-software.org>
    Visualization Module improvements, Bertrand Mathieu
    Tlp Import/export Improvements, Bertrand Mathieu
    A lot of other things, Bertrand Mathieu
    GCC-3 port of the Graph Library, Sebastien Grivet.
    GEM plug-in, David Duke.
    Adjacency Matrix import plug-in Luis Garcia.
    Poset Import plug-in Luis Garcia.

%prep
%setup -q
%patch -p1
%patch1 -p1
%patch2 -p1

%build
%{?suse_update_config:%{suse_update_config -f}}

%if 0%{?use_cmake}
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=TRUE \
  -DCMAKE_C_FLAGS_RELEASE:STRING="$RPM_OPT_FLAGS -fno-strict-aliasing -Wall -O2 -g" \
  -DCMAKE_CXX_FLAGS_RELEASE:STRING="$RPM_OPT_FLAGS -fno-strict-aliasing -Wno-deprecated -Wall -O2 -g" \
  -DCMAKE_BUILD_TYPE=Release -DCMAKE_SKIP_RPATH=1 ..
%else
autoreconf --force --install
#./gen-conf.sh
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -Wno-deprecated"
%configure \
       --docdir=%{_docdir}/tulip \
       --enable-shared \
       --with-pic \
       --disable-static \
       --enable-stats-gui \
       --enable-tlprender \
       --with-qt-dir=%{_bindir} \
       --with-qt-libraries=%{_libdir} \
       --with-qt-includes=%{_includedir} \
       --x-includes=/usr/X11R6/include \
       --x-libraries=%{_libdir} \
       --with-gl-includes=%{_includedir} \
       --with-gl-libraries=%{_libdir}
%endif

# parallel make is not working, do not use it. -Marcus 20091115
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS"
# generating docs during build is disabled
#(cd docs; make html)
# copy pre-generated docs instead

%install
make DESTDIR=$RPM_BUILD_ROOT install
cp %_sourcedir/tulip-%{version}-devHandbook.pdf .
cp %_sourcedir/tulip-%{version}-userManual.pdf .
#cd docs
#sh gen-profile.sh
#make DESTDIR=${RPM_BUILD_ROOT} install
#cd ..
%suse_update_desktop_file -i tulip Graphics 3DGraphics
find ${RPM_BUILD_ROOT}%{_libdir} -name *.la | xargs rm -f
%if 0%{?suse_version} > 1020
# create symlinks for man pages and documentation
# %fdupes -s %{buildroot}/%{_mandir}/man3
%fdupes -s %{buildroot}%{_docdir}/tulip
%fdupes -s %{buildroot}%{_includedir}/tulip
%endif
rm -f %{buildroot}/%{_libdir}/*.a

%clean
# Clear up the mess
rm -rf $RPM_BUILD_ROOT
#

%post -n libtulip -p /sbin/ldconfig

%postun -n libtulip -p /sbin/ldconfig

%post -n libtulip-qt4 -p /sbin/ldconfig

%postun -n libtulip-qt4 -p /sbin/ldconfig

%post -n libtulip-ogl -p /sbin/ldconfig

%postun -n libtulip-ogl -p /sbin/ldconfig

%files
%defattr(-,root,root)
%{_bindir}/tulip
%{_bindir}/tulip_check_pl
%{_bindir}/tlprender
%{_datadir}/applications/*.desktop
%dir %{_libdir}/tlp
%if 0%{?use_cmake} == 0
%{_libdir}/libtulip-pluginsmanager.so*
%endif
%{_libdir}/libtulip-pluginsmanager-%{tulip_version}.so*
%dir %{_libdir}/tlp/bitmaps
%{_libdir}/tlp/bitmaps/*
%dir %{_datadir}/tulip
%{_datadir}/tulip/*
%doc NEWS

%files -n libtulip
%defattr(-,root,root)
%{_bindir}/tulip-config
%{_libdir}/libtulip.so
%{_libdir}/libtulip-%{tulip_version}.so*
%{_libdir}/tlp/libAdjacencyMatrixImport-%{version}.*
%{_libdir}/tlp/libArityMetric-%{version}.*
%{_libdir}/tlp/libAutoSize-%{version}.*
%{_libdir}/tlp/libBetweennessCentrality-%{version}.*
%{_libdir}/tlp/libBiconnectedComponent-%{version}.*
%{_libdir}/tlp/libBubbleTree-%{version}.*
%{_libdir}/tlp/libCircular-%{version}.*
%{_libdir}/tlp/libClusterMetric-%{version}.*
%{_libdir}/tlp/libCompleteGraph-%{version}.*
%{_libdir}/tlp/libCompleteTree-%{version}.*
%{_libdir}/tlp/libConeTreeExtended-%{version}.*
%{_libdir}/tlp/libConnectedComponent-%{version}.*
%{_libdir}/tlp/libConnectedComponentPacking-%{version}.*
%{_libdir}/tlp/libDagLevelMetric-%{version}.*
%{_libdir}/tlp/libDendrogram-%{version}.*
%{_libdir}/tlp/libDepthMetric-%{version}.*
%{_libdir}/tlp/libDotImport-%{version}.*
%{_libdir}/tlp/libEccentricity-%{version}.*
%{_libdir}/tlp/libEmbedder-%{version}.*
%{_libdir}/tlp/libEqualValueClustering-%{version}.*
%{_libdir}/tlp/libGemLayout-%{version}.*
%{_libdir}/tlp/libHierarchicalGraph-%{version}.*
%{_libdir}/tlp/libGMLExport-%{version}.*
%{_libdir}/tlp/libGMLImport-%{version}.*
%{_libdir}/tlp/libGrid-%{version}.*
%{_libdir}/tlp/libHierarchicalClustering-%{version}.*
%{_libdir}/tlp/libIdMetric-%{version}.*
%{_libdir}/tlp/libImprovedWalker-%{version}.*
%{_libdir}/tlp/libInducedSubGraphSelection-%{version}.*
%{_libdir}/tlp/libKruskal-%{version}.*
%{_libdir}/tlp/libLeafMetric-%{version}.*
%{_libdir}/tlp/libLoopSelection-%{version}.*
%{_libdir}/tlp/libMetricColorMapping-%{version}.*
%{_libdir}/tlp/libMetricSizeMapping-%{version}.*
%{_libdir}/tlp/libMixedModel-%{version}.*
%{_libdir}/tlp/libMultipleSelection-%{version}.*
%{_libdir}/tlp/libNodeMetric-%{version}.*
%{_libdir}/tlp/libPathLengthMetric-%{version}.*
%{_libdir}/tlp/libPlanarGraph-%{version}.*
%{_libdir}/tlp/libQuotientClustering-%{version}.*
%{_libdir}/tlp/libRandom-%{version}.*
%{_libdir}/tlp/libRandomGraph-%{version}.*
%{_libdir}/tlp/libRandomMetric-%{version}.*
%{_libdir}/tlp/libRandomSimpleGraph-%{version}.*
%{_libdir}/tlp/libRandomTree-%{version}.*
%{_libdir}/tlp/libRandomTreeGeneral-%{version}.*
%{_libdir}/tlp/libReachableSubGraphSelection-%{version}.*
%{_libdir}/tlp/libSmallWorldGraph-%{version}.*
%{_libdir}/tlp/libSpanningDagSelection-%{version}.*
%{_libdir}/tlp/libSpanningTreeSelection-%{version}.*
%{_libdir}/tlp/libSquarifiedTreeMap-%{version}.*
%{_libdir}/tlp/libStrahlerMetric-%{version}.*
%{_libdir}/tlp/libStrengthClustering-%{version}.*
%{_libdir}/tlp/libStrengthMetric-%{version}.*
%{_libdir}/tlp/libStrongComponent-%{version}.*
%{_libdir}/tlp/libTreeLeaf-%{version}.*
%{_libdir}/tlp/libTreeMap-%{version}.*
%{_libdir}/tlp/libTreeRadial-%{version}.*
%{_libdir}/tlp/libTreeReingoldAndTilforExtended-%{version}.*
%{_libdir}/tlp/libTutte-%{version}.*

%files -n libtulip-ogl
%defattr(-,root,root)
%{_libdir}/libtulip-ogl.so
%{_libdir}/libtulip-ogl-%{tulip_version}.so*
%dir %{_libdir}/tlp/glyphs
%{_libdir}/tlp/glyphs/lib*-%{version}.*
%{_libdir}/tlp/libFitToLabels-%{version}.*

%files -n libtulip-qt4
%defattr(-,root,root)
%{_libdir}/libtulip-qt4.so
%{_libdir}/libtulip-qt4-%{tulip_version}.so*
%{_libdir}/tlp/libConvolutionClustering-%{version}.*
%{_libdir}/tlp/libEnumColorValuesMapping-%{version}.*
%{_libdir}/tlp/libFileSystem-%{version}.*
%{_libdir}/tlp/libWebImport-%{version}.*
%dir %{_libdir}/tlp/designer
%{_libdir}/tlp/designer/lib*.*
%dir %{_libdir}/tlp/view
%{_libdir}/tlp/view/libSpreadSheet-%{version}.*

%files doc
%defattr(-,root,root)
%doc tulip-%{version}-userManual.pdf

%files devel
%defattr(-,root,root)
%{_datadir}/aclocal/tulip.m4
%dir %{_includedir}/tulip
%{_includedir}/tulip/*
%{_includedir}/*.h

%files devel-doc
%defattr(-,root,root)
%doc tulip-%{version}-devHandbook.pdf

%changelog
openSUSE Build Service is sponsored by