# @configure_input@

Name:           graphviz
Prefix:		/usr
Version:        @VERSION@
Release:        0
Group:          Applications/Graphics
Copyright:      AT&T open source (see COPYING)
URL:            http://www.graphviz.org/
Summary:        Graph Visualization Tools
Packager:       John Ellson (ellson@lucent.com)

BuildPrereq:    tcl >= 8.3
Source:         http://www.graphviz.org/pub/graphviz/graphviz-%{version}.tar.gz
BuildRoot:      /var/tmp/%{name}-root

%description
A collection of tools and tcl packages for the manipulation and layout
of graphs (as in nodes and edges, not as in barcharts).

%prep

%setup -n %{name}-%{version}

%ifarch i386
CFLAGS="$RPM_OPT_FLAGS -ffast-math" ./configure --prefix=%{prefix} --with-x --sysconfdir=/etc --infodir=%{_infodir} --mandir=%{_mandir} --sharedstatedir=/var/state/
%else
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} --with-x --with-tcl=/usr --sysconfdir=/etc --infodir=%{_infodir} --mandir=%{_mandir} --sharedstatedir=/var/state/
%endif

%build
make DESTDIR=$RPM_BUILD_ROOT docdir=$RPM_BUILD_ROOT/%{_docdir}/%{name}

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT docdir=$RPM_BUILD_ROOT/%{_docdir}/%{name}
%{?suse_check}

%files
%doc FAQ.txt AUTHORS COPYING MINTERMS.txt README NEWS
%doc doc/dotguide.pdf doc/dottyguide.pdf doc/leftyguide.pdf doc/neatoguide.pdf doc/Dot.ref
%doc doc/gd.html doc/tcldot.html
%attr(755,root,root) %{prefix}/bin/dot
%attr(755,root,root) %{prefix}/bin/neato
%attr(755,root,root) %{prefix}/bin/dotty
%attr(755,root,root) %{prefix}/bin/lefty
%attr(755,root,root) %{prefix}/bin/lneato
%attr(755,root,root) %{prefix}/bin/acyclic
%attr(755,root,root) %{prefix}/bin/ccomps
%attr(755,root,root) %{prefix}/bin/colorize
%attr(755,root,root) %{prefix}/bin/gc
%attr(755,root,root) %{prefix}/bin/nop
%attr(755,root,root) %{prefix}/bin/sccmap
%attr(755,root,root) %{prefix}/bin/unflatten
%attr(755,root,root) %{prefix}/bin/tred
%attr(755,root,root) %{prefix}/bin/gpr
%attr(755,root,root) %{prefix}/lib/graphviz/demo/dge
%attr(644,root,root) %{prefix}/lib/graphviz/demo/dge.README
%attr(644,root,root) %{prefix}/lib/graphviz/demo/dge.example1.dot
%attr(644,root,root) %{prefix}/lib/graphviz/demo/dge.example2.dot
%attr(755,root,root) %{prefix}/lib/graphviz/demo/doted
%attr(644,root,root) %{prefix}/lib/graphviz/demo/doted.README
%attr(755,root,root) %{prefix}/lib/graphviz/demo/entities
%attr(644,root,root) %{prefix}/lib/graphviz/demo/entities.README
%attr(644,root,root) %{prefix}/lib/graphviz/demo/entities.html
%attr(755,root,root) %{prefix}/lib/graphviz/demo/ihi
%attr(644,root,root) %{prefix}/lib/graphviz/demo/ihi.README
%attr(644,root,root) %{prefix}/lib/graphviz/demo/ihi.testdata
%attr(755,root,root) %{prefix}/lib/graphviz/demo/pathplan
%attr(644,root,root) %{prefix}/lib/graphviz/demo/pathplan.README
%attr(644,root,root) %{prefix}/lib/graphviz/demo/pathplan_data/boxes.dat
%attr(644,root,root) %{prefix}/lib/graphviz/demo/pathplan_data/funny.dat
%attr(644,root,root) %{prefix}/lib/graphviz/demo/pathplan_data/nested.dat
%attr(644,root,root) %{prefix}/lib/graphviz/demo/pathplan_data/obs.dat
%attr(644,root,root) %{prefix}/lib/graphviz/demo/pathplan_data/paths.dat
%attr(644,root,root) %{prefix}/lib/graphviz/demo/pathplan_data/u.dat
%attr(644,root,root) %{prefix}/lib/graphviz/demo/pathplan_data/dpd.dat
%attr(644,root,root) %{prefix}/lib/graphviz/demo/pathplan_data/maze.dat
%attr(644,root,root) %{prefix}/lib/graphviz/demo/pathplan_data/northo.dat
%attr(644,root,root) %{prefix}/lib/graphviz/demo/pathplan_data/other.dat
%attr(644,root,root) %{prefix}/lib/graphviz/demo/pathplan_data/rotor.dat
%attr(644,root,root) %{prefix}/lib/graphviz/demo/pathplan_data/unknown.dat
%attr(755,root,root) %{prefix}/lib/graphviz/demo/spline
%attr(644,root,root) %{prefix}/lib/graphviz/demo/spline.README
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/KW91.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/NaN.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/abstract.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/alf.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/awilliams.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/clust.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/clust1.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/clust2.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/clust3.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/clust4.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/clust5.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/crazy.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/ctext.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/dfa.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/fig6.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/fsm.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/grammar.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/hashtable.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/jcctree.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/jsort.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/ldbxtried.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/mike.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/newarrows.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/nhg.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/pgram.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/pm2way.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/pmpipe.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/polypoly.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/proc3d.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/records.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/rowe.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/shells.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/states.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/structs.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/train11.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/trapeziumlr.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/tree.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/triedds.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/try.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/unix.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/unix2.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/viewfile.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/directed/world.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/undirected/ER.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/undirected/ngk10_4.dot
%attr(644,root,root) %{prefix}/lib/graphviz/graphs/undirected/process.dot
%attr(644,root,root) %{prefix}/lib/graphviz/lefty/box.lefty
%attr(644,root,root) %{prefix}/lib/graphviz/lefty/def.lefty
%attr(644,root,root) %{prefix}/lib/graphviz/lefty/dotty.lefty
%attr(644,root,root) %{prefix}/lib/graphviz/lefty/dotty_draw.lefty
%attr(644,root,root) %{prefix}/lib/graphviz/lefty/dotty_edit.lefty
%attr(644,root,root) %{prefix}/lib/graphviz/lefty/dotty_layout.lefty
%attr(644,root,root) %{prefix}/lib/graphviz/lefty/dotty_ui.lefty
%attr(644,root,root) %{prefix}/lib/graphviz/lefty/fractal.lefty
%attr(644,root,root) %{prefix}/lib/graphviz/lefty/fractal2.lefty
%attr(644,root,root) %{prefix}/lib/graphviz/lefty/lefty.psp
%attr(644,root,root) %{prefix}/lib/graphviz/lefty/slides.lefty
%attr(644,root,root) %{prefix}/lib/graphviz/lefty/tree.lefty
%attr(644,root,root) %{prefix}/lib/graphviz/libgdtclft.la
%attr(644,root,root) %{prefix}/lib/graphviz/libgdtclft.so
%attr(644,root,root) %{prefix}/lib/graphviz/libgdtclft.so.0
%attr(644,root,root) %{prefix}/lib/graphviz/libgdtclft.so.0.0.0
%attr(644,root,root) %{prefix}/lib/graphviz/libtcldgl.la
%attr(644,root,root) %{prefix}/lib/graphviz/libtcldgl.so
%attr(644,root,root) %{prefix}/lib/graphviz/libtcldgl.so.0
%attr(644,root,root) %{prefix}/lib/graphviz/libtcldgl.so.0.0.0
%attr(644,root,root) %{prefix}/lib/graphviz/libtcldgr.la
%attr(644,root,root) %{prefix}/lib/graphviz/libtcldgr.so
%attr(644,root,root) %{prefix}/lib/graphviz/libtcldgr.so.0
%attr(644,root,root) %{prefix}/lib/graphviz/libtcldgr.so.0.0.0
%attr(644,root,root) %{prefix}/lib/graphviz/libtcldot.la
%attr(644,root,root) %{prefix}/lib/graphviz/libtcldot.so
%attr(644,root,root) %{prefix}/lib/graphviz/libtcldot.so.0
%attr(644,root,root) %{prefix}/lib/graphviz/libtcldot.so.0.0.0
%attr(644,root,root) %{prefix}/lib/graphviz/libtclplan.la
%attr(644,root,root) %{prefix}/lib/graphviz/libtclplan.so
%attr(644,root,root) %{prefix}/lib/graphviz/libtclplan.so.0
%attr(644,root,root) %{prefix}/lib/graphviz/libtclplan.so.0.0.0
%attr(644,root,root) %{prefix}/lib/graphviz/libtkspline.la
%attr(644,root,root) %{prefix}/lib/graphviz/libtkspline.so
%attr(644,root,root) %{prefix}/lib/graphviz/libtkspline.so.0
%attr(644,root,root) %{prefix}/lib/graphviz/libtkspline.so.0.0.0
%attr(644,root,root) %{prefix}/lib/graphviz/pkgIndex.tcl
%doc %attr(644,root,root) %{_mandir}/man1/dot.1.gz
%doc %attr(644,root,root) %{_mandir}/man1/dotty.1.gz
%doc %attr(644,root,root) %{_mandir}/man1/lefty.1.gz
%doc %attr(644,root,root) %{_mandir}/man1/neato.1.gz
%doc %attr(644,root,root) %{_mandir}/man1/acyclic.1.gz
%doc %attr(644,root,root) %{_mandir}/man1/ccomps.1.gz
%doc %attr(644,root,root) %{_mandir}/man1/colorize.1.gz
%doc %attr(644,root,root) %{_mandir}/man1/gc.1.gz
%doc %attr(644,root,root) %{_mandir}/man1/gpr.1.gz
%doc %attr(644,root,root) %{_mandir}/man1/nop.1.gz
%doc %attr(644,root,root) %{_mandir}/man1/sccmap.1.gz
%doc %attr(644,root,root) %{_mandir}/man1/tred.1.gz
%doc %attr(644,root,root) %{_mandir}/man1/unflatten.1.gz
%doc %attr(644,root,root) %{_mandir}/man3/expr.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/agraph.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/cdt.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/graph.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/pathplan.3.gz
%doc %attr(644,root,root) %{_mandir}/mann/gdtclft.n.gz
%doc %attr(644,root,root) %{_mandir}/mann/tcldgl.n.gz
%doc %attr(644,root,root) %{_mandir}/mann/tcldgr.n.gz
%doc %attr(644,root,root) %{_mandir}/mann/tcldot.n.gz
%doc %attr(644,root,root) %{_mandir}/mann/tkspline.n.gz

%clean
rm -rf $RPM_BUILD_ROOT

%post
cat %{_docdir}/graphviz-%{version}/COPYING
# cat > /var/adm/notify/messages/graphviz_license < %{_docdir}/graphviz-%{version}/COPYING
exit 0
