2 %define plugin graphviz
3 Summary: Graphviz Plugin for Trac
4 Name: trac-plugin-%{plugin}
8 Group: Applications/WWW
9 Source0: http://trac-hacks.org/changeset/latest/graphvizplugin/0.11-%{version}?old_path=/&format=zip#/%{plugin}-%{version}.zip
10 # Source0-md5: 5ffbcb4743c85c0a34eff98918c814b6
11 URL: http://trac-hacks.org/wiki/GraphvizPlugin
12 BuildRequires: python-devel
13 BuildRequires: python-modules
14 BuildRequires: python-setuptools
15 BuildRequires: rpm-pythonprov
16 BuildRequires: rpmbuild(macros) >= 1.553
19 Requires: trac >= %{trac_ver}
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 The graphviz wiki processor is a plugin for Trac that allows the the
25 dynamic generation of diagrams by the various graphviz programs. The
26 text of a wiki page can contain the source text for graphviz and the
27 web browser will show the resulting image.
31 mv %{plugin}plugin/0.11-%{version}/* .
34 %{__python} setup.py build
35 %{__python} setup.py egg_info
37 ver=$(awk '$1 == "Version:" {print $2}' *.egg-info/PKG-INFO)
38 test "$ver" = %{version}
41 rm -rf $RPM_BUILD_ROOT
42 %{__python} setup.py install \
43 --single-version-externally-managed \
45 --root=$RPM_BUILD_ROOT
47 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
48 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
53 rm -rf $RPM_BUILD_ROOT
56 trac-enableplugin "graphviz.*"
59 %defattr(644,root,root,755)
60 %doc COPYING README.txt ReleaseNotes.txt
61 %{py_sitescriptdir}/%{plugin}
62 %{py_sitescriptdir}/*-*.egg-info
63 %{_examplesdir}/%{name}-%{version}