1 %include /usr/lib/rpm/macros.perl
2 Summary: Simple amavisd-new statistics generator
3 Summary(pl): Prosty generator statystyk dla amavisd-new
8 Group: Applications/System
9 # http://rekudos.net/download/amavis-stats.tar.gz
10 Source0: ftp://distfiles.pld-linux.org/src/%{name}-%{version}.tar.gz
11 # Source0-md5: 12288bbf8cf9da0fec64c9660712892a
13 Patch0: %{name}-gzip.patch
14 URL: http://rekudos.net/amavis-stats/
16 Provides: %{name}-%{version}-%{release}
17 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19 %define _pkglibdir /var/lib/%{name}
20 %define _phpdir /usr/share/%{name}
23 amavis-stats is a simple amavis statistics generator based on rrdtool.
24 It produces graphs from amavisd-new log entries of infections broken
28 amavis-stats jest prostym generatorem statystyk opartym na rrdtool.
29 Tworzy wykresy zainfekowanych wiadomo¶ci, w rozbiciu na poszczególne
30 wirusy, na podstawie logów amavisd-new.
33 Summary: PHP interface for amavis-stats
34 Summary(pl): Interfejs PHP dla amavis-stats
35 Group: Applications/System
36 Requires: %{name}-%{version}-%{release}
39 PHP interface for amavis-stats.
41 %description php -l pl
42 Interfejs PHP dla amavis-stats.
49 rm -rf $RPM_BUILD_ROOT
50 install -d $RPM_BUILD_ROOT/etc/cron.d
52 %{__make} install installman \
53 DESTDIR=$RPM_BUILD_ROOT \
55 install %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.d/amavis-stats
58 rm -rf $RPM_BUILD_ROOT
61 if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*/etc/%{name}/apache.conf" /etc/httpd/httpd.conf; then
62 echo "Include /etc/%{name}/apache.conf" >> /etc/httpd/httpd.conf
64 if [ -f /var/lock/subsys/httpd ]; then
65 /usr/sbin/apachectl restart 1>&2
69 if [ "$1" = "0" ]; then
71 grep -v "^Include.*/etc/%{name}/apache.conf" /etc/httpd/httpd.conf > \
72 etc/httpd/httpd.conf.tmp
73 mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
74 if [ -f /var/lock/subsys/httpd ]; then
75 /usr/sbin/apachectl restart 1>&2
80 %defattr(644,root,root,755)
82 %attr(755,root,root) %{_sbindir}/amavis-stats
84 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/cron.d/amavis-stats
88 %defattr(644,root,root,755)
90 %attr(640,root,root) %config(noreplace) /etc/%{name}/apache.conf
92 %dir %attr(755,http,root) %{_phpdir}/img
93 %{_phpdir}/%{name}.php
95 %attr(755,http,http) %dir %{_pkglibdir}/img