Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > cd1177ef5cf4da032096487b7152cf0c > files > 5

mailgraph-1.14-3mdv2009.0.src.rpm

Summary:	Mailgraph - a RRDtool frontend for Mail statistics
Name:		mailgraph
Version:	1.14
Release:	%mkrel 3
License:	GPL
Group:		System/Servers
URL:		http://mailgraph.schweikert.ch/
Source0:	http://mailgraph.schweikert.ch/pub/%{name}-%{version}.tar.gz
Patch0:		mailgraph-1.12-mdv_config.diff
Source1:	mailgraph.init
Source2:	mailgraph.sysconfig
Source3:	mailgraph.logrotate
Requires(post): rpm-helper
Requires(preun): rpm-helper
Requires(pre):	webserver
Requires:	rrdtool
BuildArch:	noarch
BuildRoot:	%{_tmppath}/%{name}-buildroot

%description
Mailgraph is a very simple mail statistics RRDtool frontend for Postfix and
Sendmail that produces daily, weekly, monthly and yearly graphs of
received/sent and bounced/rejected mail.

%prep

%setup -q -n %{name}-%{version}
%patch0 -p1

cp %{SOURCE1} %{name}.init
cp %{SOURCE2} %{name}.sysconfig
cp %{SOURCE3} %{name}.logrotate

%build

%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

# don't fiddle with the initscript!
export DONT_GPRINTIFY=1

install -d %{buildroot}%{_initrddir}
install -d %{buildroot}%{_sysconfdir}/sysconfig
install -d %{buildroot}%{_sysconfdir}/logrotate.d
install -d %{buildroot}%{_sbindir}
install -d %{buildroot}%{_localstatedir}/lib/%{name}
install -d %{buildroot}/var/run/%{name}
install -d %{buildroot}/var/log/%{name}
install -d %{buildroot}/var/cache/%{name}
install -d %{buildroot}/var/www/cgi-bin

install -m0755 %{name}.pl %{buildroot}%{_sbindir}/%{name}
install -m0755 %{name}.cgi %{buildroot}/var/www/cgi-bin/
install -m0755 %{name}.init %{buildroot}%{_initrddir}/%{name}
install -m0644 %{name}.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/%{name}
install -m0644 %{name}.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/%{name}

%post
%_post_service %{name}

%preun
%_preun_service %{name}

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%files 
%defattr(-,root,root)
%doc README CHANGES COPYING
%attr(0755,root,root) %{_initrddir}/%{name}
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/%{name}
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%attr(0755,root,root) %{_sbindir}/%{name}
%attr(0755,root,root) /var/www/cgi-bin/%{name}.cgi
%dir %attr(0755,root,root) /var/run/%{name}
%dir %attr(0755,root,root) /var/log/%{name}
%dir %attr(0755,root,root) /var/cache/%{name}
%dir %attr(0755,root,root) %{_localstatedir}/lib/%{name}


%changelog
* Mon Jul 28 2008 Thierry Vignaud <tvignaud@mandriva.com> 1.14-3mdv2009.0
+ Revision: 251745
- rebuild

  + Pixel <pixel@mandriva.com>
    - adapt to %%_localstatedir now being /var instead of /var/lib (#22312)

* Thu Jan 03 2008 Olivier Blin <oblin@mandriva.com> 1.14-1mdv2008.1
+ Revision: 140935
- restore BuildRoot

  + Thierry Vignaud <tvignaud@mandriva.com>
    - kill re-definition of %%buildroot on Pixel's request

* Thu Sep 06 2007 Oden Eriksson <oeriksson@mandriva.com> 1.14-1mdv2008.0
+ Revision: 81099
- 1.14

* Wed May 09 2007 Oden Eriksson <oeriksson@mandriva.com> 1.12-1mdv2008.0
+ Revision: 25439
- Import mailgraph



* Fri Apr 28 2006 Oden Eriksson <oeriksson@mandriva.com> 1.12-1mdk
- initial Mandriva package (spec file fragments by Zeck, also 
  from the bindgraph spec file)