Name: queuegraph
Version: 1.1
Release: 1%{?dist}%{?repotag:.%{repotag}}
Summary: A RRDtool frontend for Mail statistics
Group: System Environment/Daemons
License: GPL
URL: http://www.arschkrebs.de/postfix/queuegraph/
Source0: http://www.arschkrebs.de/postfix/queuegraph/queuegraph.tar.gz
Source1: queuegraph.conf
Source2: queuegraph.cron
Patch0: queuegraph-paths.patch
Patch1: queuegraph-average.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: rrdtool, httpd, vixie-cron
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
BuildArch: noarch
%description
Queuegraph is a very simple mail statistics RRDtool frontend for Postfix that
produces daily, weekly, monthly and yearly graphs of Postfix's active,
deferred, incoming and bounce queues.
%prep
%setup -q -c queuegraph
%patch0 -p1 -b .paths
%patch1 -p1 -b .average
%build
%install
rm -rf $RPM_BUILD_ROOT
%{__install} -d -m 0755 $RPM_BUILD_ROOT/%{_sbindir}
%{__install} -d -m 0755 $RPM_BUILD_ROOT/%{_sysconfdir}/httpd/conf.d
%{__install} -d -m 0755 $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d
%{__install} -d -m 0755 $RPM_BUILD_ROOT/%{_datadir}/queuegraph
%{__install} -d -m 0755 $RPM_BUILD_ROOT/%{_localstatedir}/lib/queuegraph
%{__install} -d -m 0775 $RPM_BUILD_ROOT/%{_localstatedir}/cache/queuegraph
%{__install} -p -m 0755 queuegraph.cgi $RPM_BUILD_ROOT/%{_datadir}/queuegraph/queuegraph.cgi
%{__install} -p -m 0755 queuegraph/queuegraph-rrd.sh $RPM_BUILD_ROOT/%{_sbindir}/
%{__install} -p -m 0644 %SOURCE1 $RPM_BUILD_ROOT/%{_sysconfdir}/httpd/conf.d/
%{__install} -p -m 0644 %SOURCE2 $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d/queuegraph
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc queuegraph/README
%dir %{_localstatedir}/lib/queuegraph
%dir %attr(0775,root,apache) %{_localstatedir}/cache/queuegraph
%config(noreplace) %{_sysconfdir}/httpd/conf.d/queuegraph.conf
%config(noreplace) %{_sysconfdir}/cron.d/queuegraph
%{_sbindir}/*
%{_datadir}/queuegraph
%changelog
* Sun Mar 25 2007 Bernard Johnson <bjohnson@symetrix.com> - 1.1-1
- initial release