# Note: graphviz requires gd with gif support (and other fixes), hence use
# internal one for now.
+#-- graphviz src.rpm --------------------------------------------------------
+Name: graphviz
+Version: @VERSION@
+Release: 1
+
+License: CPL
+URL: http://www.graphviz.org/
+Source: http://www.graphviz.org/pub/graphviz/ARCHIVE/graphviz-@VERSION@.tar.gz
+
# graphviz is relocatable
Prefix: /usr
+#-- feature and package selection -------------------------------------------
+# depends on %dist which is set in .rpmmacros on each build host
+
# Define a default set incase none of the conditionals apply
%define SHARP 0
%define GUILE 0
%define RUBY 0
%define TCL 1
%define IPSEPCOLA --without-ipsepcola
-# %define MYLIBGD --without-mylibgd
%define MYLIBGD --with-mylibgd
-# Select packages according to dist (set in .rpmmacros on each build host)
-
# These are all single line conditional blocks because older versions
# of rpm can't handle multiline blocks/
%{?rh7: %{expand: %%define PERL 1}}
%{?rh7: %{expand: %%define TCL 1}}
-%{?rh7: %{expand: %%define MYLIBGD --with-mylibgd}}
%{?rh8: %{expand: %%define PERL 1}}
%{?rh8: %{expand: %%define TCL 1}}
-%{?rh8: %{expand: %%define MYLIBGD --with-mylibgd}}
%{?rh9: %{expand: %%define PERL 1}}
%{?rh9: %{expand: %%define TCL 1}}
-%{?rh9: %{expand: %%define MYLIBGD --with-mylibgd}}
%{?el2: %{expand: %%define PERL 1}}
%{?el2: %{expand: %%define TCL 1}}
-%{?el2: %{expand: %%define MYLIBGD --with-mylibgd}}
%{?el3: %{expand: %%define PERL 1}}
%{?el3: %{expand: %%define TCL 1}}
%{?el3: %{expand: %%define IPSEPCOLA --with-ipsepcola}}
-%{?el3: %{expand: %%define MYLIBGD --with-mylibgd}}
%{?el4: %{expand: %%define PERL 1}}
%{?el4: %{expand: %%define PHP 1}}
%{?el4: %{expand: %%define RUBY 1}}
%{?el4: %{expand: %%define TCL 1}}
%{?el4: %{expand: %%define IPSEPCOLA --with-ipsepcola}}
-%{?el4: %{expand: %%define MYLIBGD --with-mylibgd}}
%{?el5: %{expand: %%define PERL 1}}
%{?el5: %{expand: %%define PHP 1}}
%{?el5: %{expand: %%define RUBY 1}}
%{?el5: %{expand: %%define TCL 1}}
%{?el5: %{expand: %%define IPSEPCOLA --with-ipsepcola}}
-%{?el5: %{expand: %%define MYLIBGD --with-mylibgd}}
%{?el6: %{expand: %%define PERL 1}}
%{?el6: %{expand: %%define PHP 1}}
%{?fc1: %{expand: %%define PERL 1}}
%{?fc1: %{expand: %%define TCL 1}}
-%{?fc1: %{expand: %%define MYLIBGD --with-mylibgd}}
%{?fc2: %{expand: %%define PERL 1}}
%{?fc2: %{expand: %%define TCL 1}}
-%{?fc2: %{expand: %%define MYLIBGD --with-mylibgd}}
%{?fc3: %{expand: %%define PERL 1}}
%{?fc3: %{expand: %%define TCL 1}}
%{?fc3: %{expand: %%define IPSEPCOLA --with-ipsepcola}}
-%{?fc3: %{expand: %%define MYLIBGD --with-mylibgd}}
%{?fc4: %{expand: %%define GUILE 1}}
%{?fc4: %{expand: %%define PERL 1}}
%{?fc4: %{expand: %%define RUBY 1}}
%{?fc4: %{expand: %%define TCL 1}}
%{?fc4: %{expand: %%define IPSEPCOLA --with-ipsepcola}}
-%{?fc4: %{expand: %%define MYLIBGD --with-mylibgd}}
%{?fc5: %{expand: %%define SHARP 1}}
%{?fc5: %{expand: %%define GUILE 1}}
%{?fc6: %{expand: %%define TCL 1}}
%{?fc6: %{expand: %%define IPSEPCOLA --with-ipsepcola}}
-Summary: Graph Visualization Tools
-Name: graphviz
-Version: @VERSION@
-Release: 1
-
-Group: Applications/Multimedia
-License: CPL
-URL: http://www.graphviz.org/
-Source: http://www.graphviz.org/pub/graphviz/ARCHIVE/graphviz-@VERSION@.tar.gz
-%{?el3:Requires: urw-fonts}
-%{?el4:Requires: urw-fonts}
-%{?el5:Requires: urw-fonts}
-%{?el6:Requires: urw-fonts}
-%{?fc1:Requires: urw-fonts}
-%{?fc2:Requires: urw-fonts}
-%{?fc3:Requires: urw-fonts}
-%{?fc4:Requires: urw-fonts}
-%{?fc5:Requires: urw-fonts}
-%{?fc6:Requires: urw-fonts}
+#-- build requirements --------------------------------------------------
# SuSE uses a different mechanism to generate BuildRequires
# norootforbuild
%{?fc5:BuildRequires: fontconfig-devel libtool-ltdl libtool-ltdl-devel tcl-devel tk-devel libXaw-devel libSM-devel libICE-devel libXpm-devel libXt-devel libXmu-devel libXext-devel libX11-devel guile-devel}
%{?fc6:BuildRequires: fontconfig-devel libtool-ltdl libtool-ltdl-devel tcl-devel tk-devel libXaw-devel libSM-devel libICE-devel libXpm-devel libXt-devel libXmu-devel libXext-devel libX11-devel guile-devel gmp-devel lua-devel pango-devel cairo-devel >= 1.1.10}
+#-- graphviz rpm --------------------------------------------------
+Group: Applications/Multimedia
+Summary: Graph Visualization Tools
+
%description
A collection of tools for the manipulation and layout
of graphs (as in nodes and edges, not as in barcharts).
%dir %{_datadir}/graphviz
%{_datadir}/graphviz/lefty
%exclude %{_libdir}/graphviz/*/*
+%exclude %{_libdir}/graphviz/libgvplugin_gd.*
+
+#-- graphviz-gd rpm --------------------------------------------------
+%package gd
+Group: Applications/Multimedia
+Summary: graphviz plugin for renderers based on gd
+
+%{?el3:Requires: urw-fonts}
+%{?el4:Requires: urw-fonts}
+%{?el5:Requires: urw-fonts}
+%{?el6:Requires: urw-fonts}
+%{?fc1:Requires: urw-fonts}
+%{?fc2:Requires: urw-fonts}
+%{?fc3:Requires: urw-fonts}
+%{?fc4:Requires: urw-fonts}
+%{?fc5:Requires: urw-fonts}
+
+%description gd
+graphviz plugin for renderers based on gd
+
+%files gd
+%{_libdir}/graphviz/libgvplugin_gd.so.*
-#------------------------------------------------------------------
+#-- graphviz-sharp rpm --------------------------------------------
%if %{SHARP}
%package sharp
Group: Applications/Multimedia
Requires: graphviz = %{version}-%{release}
%description sharp
-C# extensions for graphviz.
+C# extension for graphviz.
%files sharp
%defattr(-,root,root,-)
%{_libdir}/graphviz/sharp/*
%endif
-#------------------------------------------------------------------
+#-- graphviz-guile rpm --------------------------------------------
%if %{GUILE}
%package guile
Group: Applications/Multimedia
Requires: graphviz = %{version}-%{release}
%description guile
-Guile extensions for graphviz.
+Guile extension for graphviz.
%files guile
%defattr(-,root,root,-)
%{_libdir}/graphviz/guile/*
%endif
-#------------------------------------------------------------------
+#-- graphviz-io rpm -----------------------------------------------
%if %{_IO}
%package io
Group: Applications/Multimedia
Requires: graphviz = %{version}-%{release}
%description io
-Io extensions for graphviz.
+Io extension for graphviz.
%files io
%defattr(-,root,root,-)
%{_libdir}/graphviz/io/*
%endif
-#------------------------------------------------------------------
+#-- graphviz-java rpm ---------------------------------------------
%if %{JAVA}
%package java
Group: Applications/Multimedia
Requires: graphviz = %{version}-%{release}
%description java
-Java extensions for graphviz.
+Java extension for graphviz.
%files java
%defattr(-,root,root,-)
%{_libdir}/graphviz/java/*
%endif
-#------------------------------------------------------------------
+#-- graphviz-lua rpm ----------------------------------------------------------------
%if %{LUA}
%package lua
Group: Applications/Multimedia
Requires: graphviz = %{version}-%{release}
%description lua
-Java extensions for graphviz.
+Java extension for graphviz.
%files lua
%defattr(-,root,root,-)
%{_libdir}/graphviz/lua/*
%endif
-#------------------------------------------------------------------
+#-- graphviz-ocaml rpm --------------------------------------------
%if %{OCAML}
%package ocaml
Group: Applications/Multimedia
Requires: graphviz = %{version}-%{release}
%description ocaml
-Ocaml extensions for graphviz.
+Ocaml extension for graphviz.
%files ocaml
%defattr(-,root,root,-)
%{_libdir}/graphviz/ocaml/*
%endif
-#------------------------------------------------------------------
+#-- graphviz-perl rpm ---------------------------------------------
%if %{PERL}
%package perl
Group: Applications/Multimedia
Requires: graphviz = %{version}-%{release}
%description perl
-Perl extensions for graphviz.
+Perl extension for graphviz.
%files perl
%defattr(-,root,root,-)
%{_libdir}/graphviz/perl/*
%endif
-#------------------------------------------------------------------
+#-- graphviz-php rpm ----------------------------------------------
%if %{PHP}
%package php
Group: Applications/Multimedia
Requires: graphviz = %{version}-%{release}
%description php
-PHP extensions for graphviz.
+PHP extension for graphviz.
%files php
%defattr(-,root,root,-)
%{_libdir}/graphviz/php/*
%endif
-#------------------------------------------------------------------
+#-- graphviz-python rpm -------------------------------------------
%if %{PYTHON}
%package python
Group: Applications/Multimedia
Requires: graphviz = %{version}-%{release}
%description python
-Python extensions for graphviz.
+Python extension for graphviz.
%files python
%defattr(-,root,root,-)
%{_libdir}/graphviz/python/*
%endif
-#------------------------------------------------------------------
+#-- graphviz-ruby rpm ---------------------------------------------
%if %{RUBY}
%package ruby
Group: Applications/Multimedia
Requires: graphviz = %{version}-%{release}
%description ruby
-Ruby extensions for graphviz.
+Ruby extension for graphviz.
%files ruby
%defattr(-,root,root,-)
%{_libdir}/graphviz/ruby/*
%endif
-#------------------------------------------------------------------
+#-- graphviz-tcl rpm ----------------------------------------------
%if %{TCL}
%package tcl
Group: Applications/Multimedia
%{_mandir}/mann/*.n*
%endif
-#------------------------------------------------------------------
+#-- graphviz-devel rpm --------------------------------------------
%package devel
Group: Development/Libraries
Summary: Development package for graphviz
%{_libdir}/pkgconfig/*.pc
%{_mandir}/man3/*.3*
%exclude %{_libdir}/graphviz/*/*
+%exclude %{_libdir}/graphviz/libgvplugin*
-#------------------------------------------------------------------
+#-- graphviz-graphs rpm -------------------------------------------
%package graphs
Group: Applications/Multimedia
Summary: Demo graphs for graphviz
%dir %{_datadir}/graphviz
%{_datadir}/graphviz/graphs
-#------------------------------------------------------------------
+#-- graphviz-doc rpm ----------------------------------------------
%package doc
Group: Documentation
Summary: PDF and HTML documents for graphviz
%defattr(-,root,root,-)
%doc __doc/*
-#------------------------------------------------------------------
+#-- building --------------------------------------------------
+
%prep
%setup -q
%clean
rm -rf $RPM_BUILD_ROOT
+#-- post scripts ----------------------------------------------
+
# run "dot -c" to generate plugin config in %{_libdir}/graphviz/config
%post
LD_LIBRARY_PATH=$RPM_INSTALL_PREFIX0/%{_lib}/graphviz $RPM_INSTALL_PREFIX0/bin/dot -c
%postun
if ! test -x $RPM_INSTALL_PREFIX0/bin/dot; then rm -f $RPM_INSTALL_PREFIX0/%{_lib}/graphviz/config; fi
+#-- changelog --------------------------------------------------
+
%changelog
* Tue Sep 13 2005 John Ellson <ellson@research.att.com>
- split out language bindings into their own rpms so that