5795c69
# $Id: graphviz.spec.in,v 1.96 2006/10/24 13:46:11 ellson Exp $ $Revision: 1.96 $
1814a23
# graphviz.spec.  Generated from graphviz.spec.in by configure.
1814a23
1814a23
# Note: graphviz requires gd with gif support (and other fixes), hence use
1814a23
# internal one for now.
1814a23
5795c69
#-- graphviz src.rpm --------------------------------------------------------
1814a23
Name:		graphviz
5795c69
Version:	2.12
aecd490
Release:	4%{?dist}
5795c69
1814a23
License:	CPL
1814a23
URL:		http://www.graphviz.org/
5795c69
Source:		http://www.graphviz.org/pub/graphviz/ARCHIVE/graphviz-2.12.tar.gz
5795c69
Patch0:		%{name}-php5.patch
5795c69
5795c69
# graphviz is relocatable
0f930ef
Prefix: /usr
5795c69
5795c69
#-- feature and package selection -------------------------------------------
ca36bf0
#	depends on %dist and %fedora (or %rhl or %rhel) which are set
ca36bf0
#	in .rpmmacros on each build host
5795c69
5795c69
# Define a default set of features incase none of the conditionals apply
ca36bf0
%define SHARP	0
ca36bf0
%define GUILE	0
ca36bf0
%define _IO	0
ca36bf0
%define JAVA	0
ca36bf0
%define LUA	0
ca36bf0
%define OCAML	0
ca36bf0
%define PERL	0
ca36bf0
%define PHP	0
ca36bf0
%define PYTHON	0
ca36bf0
%define RUBY	0
ca36bf0
%define TCL	1
ca36bf0
%define IPSEPCOLA	--without-ipsepcola
ca36bf0
%define MYLIBGD		--with-mylibgd
ca36bf0
%define MING		--without-ming
5795c69
5795c69
# SuSE uses a different mechanism to generate BuildRequires
5795c69
# norootforbuild
5795c69
# neededforbuild  expat freetype2 freetype2-devel gcc libjpeg libpng-devel-packages tcl tcl-devel tk tk-devel x-devel-packages
1814a23
1814a23
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
1814a23
5795c69
BuildRequires:	zlib-devel libpng-devel libjpeg-devel expat-devel freetype-devel >= 2
5795c69
BuildRequires:	/bin/ksh bison m4 flex tk tcl >= 8.3 swig
5795c69
5795c69
# This just indicates the requirement for tcl.h, tk.h, but doesn't identify
5795c69
# where to get them from. In RH9 and earlier they were in the tcl, tk,
5795c69
# base packages which are always BR'd anyway (above).
5795c69
BuildRequires:	/usr/include/tcl.h /usr/include/tk.h
5795c69
5795c69
%if 0%{?rhl}
ca36bf0
%define PERL	1
ca36bf0
%define TCL	1
5795c69
BuildRequires: XFree86-devel perl
5795c69
%endif
5795c69
5795c69
%if 0%{?rhel}
ca36bf0
%define PERL	1
ca36bf0
%define TCL	1
5795c69
BuildRequires: perl
5795c69
%if "%rhel" < "4"
5795c69
BuildRequires: XFree86-devel
5795c69
%endif
5795c69
%if "%rhel" >= "3"
5795c69
%define IPSEPCOLA --with-ipsepcola
5795c69
BuildRequires: fontconfig-devel tcl-devel tk-devel
5795c69
%endif
5795c69
%if "%rhel" >= "4"
ca36bf0
%define PHP	1
ca36bf0
%define RUBY	1
ca36bf0
BuildRequires: xorg-x11-devel php-devel ruby ruby-devel
5795c69
%endif
5795c69
%if "%rhel" >= "5"
5795c69
BuildRequires: libtool-ltdl libtool-ltdl-devel libXaw-devel libSM-devel libICE-devel libXpm-devel libXt-devel libXmu-devel libXext-devel libX11-devel
5795c69
%endif
5795c69
%endif
5795c69
5795c69
%if 0%{?fedora}
ca36bf0
%define PERL	1
ca36bf0
%define TCL	1
5795c69
BuildRequires: fontconfig-devel tcl-devel tk-devel 
5795c69
%if "%fedora" < "3"
5795c69
BuildRequires: XFree86-devel
5795c69
%endif
5795c69
%if "%fedora" == "3"
5795c69
BuildRequires: xorg-x11-devel
5795c69
%endif
5795c69
%if "%fedora" == "4"
5795c69
BuildRequires: xorg-x11-devel
5795c69
%endif
5795c69
%if "%fedora" >= "3"
5795c69
%define IPSEPCOLA --with-ipsepcola
5795c69
%endif
5795c69
%if "%fedora" >= "4"
ca36bf0
%define PHP	1
ca36bf0
%define RUBY	1
ca36bf0
%define GUILE	1
ca36bf0
BuildRequires: libtool-ltdl libtool-ltdl-devel php-devel ruby ruby-devel guile-devel
5795c69
%endif
5795c69
%if "%fedora" >= "5"
ca36bf0
%define SHARP	1
ca36bf0
%define JAVA	1
ca36bf0
%define OCAML	1
ca36bf0
%define PYTHON	1
5795c69
BuildRequires: libXaw-devel libSM-devel libICE-devel libXpm-devel libXt-devel libXmu-devel libXext-devel libX11-devel libgcj-devel mono-core ocaml python-devel java-devel
5795c69
%endif
5795c69
%if "%fedora" >= "6"
ca36bf0
%define LUA	1
5795c69
BuildRequires: cairo-devel >= 1.1.10 pango-devel gmp-devel lua-devel
5795c69
%endif
5795c69
%endif
5795c69
5795c69
#-- graphviz rpm --------------------------------------------------
5795c69
Group:		Applications/Multimedia
5795c69
Summary:	Graph Visualization Tools
5795c69
Requires:	urw-fonts
ca36bf0
Requires(post):	/sbin/ldconfig
ca36bf0
Requires(postun):	/sbin/ldconfig
587d39c
1814a23
%description
1814a23
A collection of tools for the manipulation and layout
1814a23
of graphs (as in nodes and edges, not as in barcharts).
c020f9b
1814a23
%files
1814a23
%defattr(-,root,root,-)
1814a23
%doc AUTHORS COPYING ChangeLog NEWS README
1814a23
%{_bindir}/*
5795c69
%dir %{_libdir}/graphviz
5795c69
%{_libdir}/*.so.*
5795c69
%{_libdir}/graphviz/*.so.*
1814a23
%{_mandir}/man1/*.1*
5795c69
%dir %{_datadir}/graphviz
5795c69
%{_datadir}/graphviz/lefty
5795c69
%exclude %{_libdir}/graphviz/*/*
5795c69
%exclude %{_libdir}/graphviz/libgvplugin_gd.*
5795c69
5795c69
# run "dot -c" to generate plugin config in %{_libdir}/graphviz/config
5795c69
%post
5795c69
LD_LIBRARY_PATH=$RPM_INSTALL_PREFIX0/%{_lib} $RPM_INSTALL_PREFIX0/bin/dot -c
ca36bf0
/sbin/ldconfig
5795c69
5795c69
# if there is no dot after everything else is done, the remove config
5795c69
%postun
5795c69
if ! test -x $RPM_INSTALL_PREFIX0/bin/dot; then rm -f $RPM_INSTALL_PREFIX0/%{_lib}/graphviz/config; fi
ca36bf0
/sbin/ldconfig
5795c69
5795c69
#-- graphviz-gd rpm --------------------------------------------------
5795c69
%package gd
5795c69
Group:		Applications/Multimedia
ca36bf0
Summary:	Graphviz plugin for renderers based on gd
5795c69
Requires:	graphviz = %{version}-%{release}
5795c69
5795c69
%description gd
5795c69
graphviz plugin for renderers based on gd
5795c69
5795c69
%files gd
5795c69
%{_libdir}/graphviz/libgvplugin_gd.so.*
cf619ee
5795c69
# run "dot -c" to generate plugin config in %{_libdir}/graphviz/config
5795c69
%post gd
5795c69
LD_LIBRARY_PATH=$RPM_INSTALL_PREFIX0/%{_lib} $RPM_INSTALL_PREFIX0/bin/dot -c
5795c69
5795c69
# if there is not dot after everything else is done, the remove config
5795c69
%postun gd
5795c69
if ! test -x $RPM_INSTALL_PREFIX0/bin/dot; then rm -f $RPM_INSTALL_PREFIX0/%{_lib}/graphviz/config; fi
5795c69
5795c69
#-- graphviz-sharp rpm --------------------------------------------
5795c69
%if %{SHARP}
1814a23
%package sharp
5795c69
Group:		Applications/Multimedia
5795c69
Summary:	C# extension for graphviz
5795c69
Requires:	graphviz = %{version}-%{release} mono-core
cf619ee
1814a23
%description sharp
5795c69
C# extension for graphviz.
cf619ee
1814a23
%files sharp
1814a23
%defattr(-,root,root,-)
5795c69
%dir %{_libdir}/graphviz/sharp
5795c69
%{_libdir}/graphviz/sharp/*
5795c69
%endif
cf619ee
5795c69
#-- graphviz-guile rpm --------------------------------------------
5795c69
%if %{GUILE}
1814a23
%package guile
1814a23
Group:		Applications/Multimedia
5795c69
Summary:	Guile extension for graphviz
5795c69
Requires:	graphviz = %{version}-%{release} guile
cf619ee
1814a23
%description guile
5795c69
Guile extension for graphviz.
cf619ee
1814a23
%files guile
1814a23
%defattr(-,root,root,-)
5795c69
%dir %{_libdir}/graphviz/guile
5795c69
%{_libdir}/graphviz/guile/*
5795c69
%endif
cf619ee
5795c69
#-- graphviz-io rpm -----------------------------------------------
1814a23
%if %{_IO}
1814a23
%package io
1814a23
Group:		Applications/Multimedia
5795c69
Summary:	Io extension for graphviz
5795c69
Requires:	graphviz = %{version}-%{release} io
cf619ee
1814a23
%description io
5795c69
Io extension for graphviz.
cvsextras dcb44de
1814a23
%files io
1814a23
%defattr(-,root,root,-)
5795c69
%dir %{_libdir}/graphviz/io
5795c69
%{_libdir}/graphviz/io/*
1814a23
%endif
cvsextras dcb44de
5795c69
#-- graphviz-java rpm ---------------------------------------------
5795c69
%if %{JAVA}
1814a23
%package java
1814a23
Group:		Applications/Multimedia
5795c69
Summary:	Java extension for graphviz
ca36bf0
Requires:	graphviz = %{version}-%{release} java
c020f9b
1814a23
%description java
5795c69
Java extension for graphviz.
c020f9b
1814a23
%files java
1814a23
%defattr(-,root,root,-)
5795c69
%dir %{_libdir}/graphviz/java
5795c69
%{_libdir}/graphviz/java/*
5795c69
%endif
c020f9b
5795c69
#-- graphviz-lua rpm ----------------------------------------------
5795c69
%if %{LUA}
1814a23
%package lua
1814a23
Group:		Applications/Multimedia
5795c69
Summary:	Lua extension for graphviz
5795c69
Requires:	graphviz = %{version}-%{release} lua
cvsextras dcb44de
1814a23
%description lua
5795c69
Lua extension for graphviz.
cvsextras dcb44de
1814a23
%files lua
1814a23
%defattr(-,root,root,-)
5795c69
%dir %{_libdir}/graphviz/lua
5795c69
%{_libdir}/graphviz/lua/*
5795c69
%endif
cf619ee
5795c69
#-- graphviz-ocaml rpm --------------------------------------------
5795c69
%if %{OCAML}
1814a23
%package ocaml
1814a23
Group:		Applications/Multimedia
5795c69
Summary:	Ocaml extension for graphviz
5795c69
Requires:	graphviz = %{version}-%{release} ocaml
cvsextras dcb44de
1814a23
%description ocaml
5795c69
Ocaml extension for graphviz.
cf619ee
1814a23
%files ocaml
1814a23
%defattr(-,root,root,-)
5795c69
%dir %{_libdir}/graphviz/ocaml
5795c69
%{_libdir}/graphviz/ocaml/*
5795c69
%endif
cf619ee
5795c69
#-- graphviz-perl rpm ---------------------------------------------
5795c69
%if %{PERL}
1814a23
%package perl
1814a23
Group:		Applications/Multimedia
5795c69
Summary:	Perl extension for graphviz
5795c69
Requires:	graphviz = %{version}-%{release} perl
cvsextras dcb44de
1814a23
%description perl
5795c69
Perl extension for graphviz.
cvsextras dcb44de
1814a23
%files perl
c020f9b
%defattr(-,root,root,-)
5795c69
%dir %{_libdir}/graphviz/perl
5795c69
%{_libdir}/graphviz/perl/*
5795c69
%endif
1814a23
5795c69
#-- graphviz-php rpm ----------------------------------------------
5795c69
%if %{PHP}
1814a23
%package php
1814a23
Group:		Applications/Multimedia
5795c69
Summary:	PHP extension for graphviz
5795c69
Requires:	graphviz = %{version}-%{release} php
1814a23
1814a23
%description php
5795c69
PHP extension for graphviz.
1814a23
1814a23
%files php
1814a23
%defattr(-,root,root,-)
5795c69
%dir %{_libdir}/graphviz/php
5795c69
%{_libdir}/graphviz/php/*
5795c69
%endif
1814a23
5795c69
#-- graphviz-python rpm -------------------------------------------
5795c69
%if %{PYTHON}
1814a23
%package python
1814a23
Group:		Applications/Multimedia
5795c69
Summary:	Python extension for graphviz
5795c69
Requires:	graphviz = %{version}-%{release} python
1814a23
1814a23
%description python
5795c69
Python extension for graphviz.
1814a23
1814a23
%files python
1814a23
%defattr(-,root,root,-)
5795c69
%dir %{_libdir}/graphviz/python
5795c69
%{_libdir}/graphviz/python/*
5795c69
%endif
1814a23
5795c69
#-- graphviz-ruby rpm ---------------------------------------------
5795c69
%if %{RUBY}
1814a23
%package ruby
1814a23
Group:		Applications/Multimedia
5795c69
Summary:	Ruby extension for graphviz
5795c69
Requires:	graphviz = %{version}-%{release} ruby
1814a23
1814a23
%description ruby
5795c69
Ruby extension for graphviz.
1814a23
1814a23
%files ruby
1814a23
%defattr(-,root,root,-)
5795c69
%dir %{_libdir}/graphviz/ruby
5795c69
%{_libdir}/graphviz/ruby/*
5795c69
%endif
1814a23
5795c69
#-- graphviz-tcl rpm ----------------------------------------------
5795c69
%if %{TCL}
1814a23
%package tcl
1814a23
Group:		Applications/Multimedia
5795c69
Summary:	Tcl extension & tools for graphviz
5795c69
Requires:	graphviz = %{version}-%{release} tcl >= 8.3 tk
1814a23
1814a23
%description tcl
5795c69
Various tcl packages (extensions) for the graphviz tools.
c020f9b
c020f9b
%files tcl
c020f9b
%defattr(-,root,root,-)
5795c69
%dir %{_libdir}/graphviz/tcl
5795c69
%{_libdir}/graphviz/tcl/*
5795c69
%{_libdir}/graphviz/pkgIndex.tcl
5795c69
%{_datadir}/graphviz/demo
cvsextras dcb44de
%{_mandir}/mann/*.n*
5795c69
%endif
1814a23
5795c69
#-- graphviz-devel rpm --------------------------------------------
1814a23
%package devel
1814a23
Group:		Development/Libraries
5795c69
Summary:	Development package for graphviz
5795c69
Requires:	graphviz = %{version}-%{release} pkgconfig
1814a23
1814a23
%description devel
1814a23
A collection of tools for the manipulation and layout
1814a23
of graphs (as in nodes and edges, not as in barcharts).
5795c69
This package contains development files for graphviz.
cvsextras dcb44de
cvsextras dcb44de
%files devel
cvsextras dcb44de
%defattr(-,root,root,-)
5795c69
%{_includedir}/graphviz
5795c69
%{_libdir}/*.so
c020f9b
%{_libdir}/pkgconfig/*.pc
cvsextras dcb44de
%{_mandir}/man3/*.3*
5795c69
%exclude %{_libdir}/graphviz/*/*
5795c69
%exclude %{_libdir}/graphviz/libgvplugin*
5795c69
%exclude %{_libdir}/graphviz/*.so
1814a23
5795c69
#-- graphviz-graphs rpm -------------------------------------------
1814a23
%package graphs
1814a23
Group:		Applications/Multimedia
5795c69
Summary:	Demo graphs for graphviz
1814a23
1814a23
%description graphs
5795c69
Some demo graphs for graphviz.
c020f9b
c020f9b
%files graphs
c020f9b
%defattr(-,root,root,-)
5795c69
%dir %{_datadir}/graphviz
5795c69
%{_datadir}/graphviz/graphs
c020f9b
5795c69
#-- graphviz-doc rpm ----------------------------------------------
1814a23
%package doc
1814a23
Group:		Documentation
5795c69
Summary:	PDF and HTML documents for graphviz
1814a23
1814a23
%description doc
5795c69
Provides some additional PDF and HTML documentation for graphviz.
1814a23
c020f9b
%files doc
c020f9b
%defattr(-,root,root,-)
c020f9b
%doc __doc/*
cvsextras dcb44de
5795c69
#-- building --------------------------------------------------
5795c69
1814a23
%prep
1814a23
%setup -q
5795c69
%patch0 -p1
1814a23
1814a23
%build
5795c69
# XXX ix86 only used to have -ffast-math, let's use everywhere
5795c69
%{expand: %%define optflags %{optflags} -ffast-math}
5795c69
# %%configure is broken in RH7.3 rpmbuild
5795c69
CFLAGS="$RPM_OPT_FLAGS" \
5795c69
./configure \
ca36bf0
	--prefix=%{_prefix} \
ca36bf0
	--bindir=%{_bindir} \
ca36bf0
	--libdir=%{_libdir} \
ca36bf0
	--includedir=%{_includedir} \
ca36bf0
	--datadir=%{_datadir} \
ca36bf0
	--mandir=%{_mandir} \
ca36bf0
	--with-x \
ca36bf0
	--disable-static \
ca36bf0
	--disable-dependency-tracking %{MYLIBGD} %{IPSEPCOLA} %{MING}
1814a23
%__make %{?_smp_mflags}
1814a23
1814a23
%install
1814a23
rm -rf $RPM_BUILD_ROOT __doc
1814a23
%{__make} \
ca36bf0
	DESTDIR=$RPM_BUILD_ROOT \
ca36bf0
	docdir=$RPM_BUILD_ROOT%{_docdir}/%{name} \
ca36bf0
	pkgconfigdir=%{_libdir}/pkgconfig \
ca36bf0
	install
1814a23
find ${RPM_BUILD_ROOT} -type f -name "*.la" -exec rm -f {} ';'
1814a23
chmod -x $RPM_BUILD_ROOT%{_datadir}/%{name}/lefty/*
1814a23
cp -a $RPM_BUILD_ROOT%{_datadir}/%{name}/doc __doc
1814a23
rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/doc
1814a23
1814a23
%clean
1814a23
rm -rf $RPM_BUILD_ROOT
1814a23
5795c69
#-- changelog --------------------------------------------------
cvsextras dcb44de
cvsextras dcb44de
%changelog
aecd490
* Thu Feb 01 2007 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.12-4
aecd490
- Bump-n-build due to tk upgrade
aecd490
ca36bf0
* Wed Jan 24 2007 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.12-3
ca36bf0
- Added running of /sbin/ldconfig in post/postun (and Reqs)
ca36bf0
- Minor edit to -gd summary
ca36bf0
- Removed explicit dependency on libgcj in -java
ca36bf0
- Added BR for ruby (not pulled in by ruby-devel!)
ca36bf0
- Cleanup of spaces/tabs to minimize rpmlint warnings
ca36bf0
0f930ef
* Wed Dec 13 2006 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.12-2
0f930ef
- Use of RPM_INSTALL_PREFIX0 in %%post requires Prefix: to be set
0f930ef
5795c69
* Mon Dec 11 2006 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.12-1
5795c69
- Fixed dist tag
5795c69
- Fixed minor typo in -lua description (BZ#218191)
5795c69
- Added upstream-supplied "php5" patch (due to newer swig)
5795c69
- Added BR: java-devel & R: java
5795c69
5795c69
* Tue Sep 13 2005 John Ellson <ellson@research.att.com>
5795c69
- split out language bindings into their own rpms so that 
ca36bf0
  main rpm doesn't depend on (e.g.) ocaml
5795c69
5795c69
* Sat Aug 13 2005 John Ellson <ellson@research.att.com>
5795c69
- imported various fixes from the Fedora-Extras .spec by Oliver Falk <oliver@linux-kernel.at>
cvsextras dcb44de
5795c69
* Wed Jul 20 2005 John Ellson <ellson@research.att.com>
5795c69
- release 2.4