1 %include /usr/lib/rpm/macros.perl
3 Summary: Simple amavisd-new statistics generator
4 Summary(pl): Prosty generator statystyk dla amavisd-new
9 Group: Applications/System
10 Source0: http://rekudos.net/download/%{name}-%{version}-%{_rc}.tar.gz
11 # Source0-md5: 39156ca0eba50405d836aaf9d97743bf
13 Patch0: %{name}-gzip.patch
14 Patch1: %{name}-more_ac.patch
15 URL: http://rekudos.net/amavis-stats/
17 Provides: %{name}-%{version}-%{release}
18 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20 %define _pkglibdir /var/lib/%{name}
21 %define _phpdir /usr/share/%{name}
24 amavis-stats is a simple amavis statistics generator based on rrdtool.
25 It produces graphs from amavisd-new log entries of infections broken
29 amavis-stats jest prostym generatorem statystyk opartym na rrdtool.
30 Tworzy wykresy zainfekowanych wiadomo¶ci, w rozbiciu na poszczególne
31 wirusy, na podstawie logów amavisd-new.
34 Summary: PHP interface for amavis-stats
35 Summary(pl): Interfejs PHP dla amavis-stats
36 Group: Applications/System
37 Requires: %{name}-%{version}-%{release}
41 PHP interface for amavis-stats.
43 %description php -l pl
44 Interfejs PHP dla amavis-stats.
47 %setup -q -n %{name}-%{version}-%{_rc}
56 rm -rf $RPM_BUILD_ROOT
57 install -d $RPM_BUILD_ROOT/etc/cron.d
62 install_prefix=$RPM_BUILD_ROOT \
68 install %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.d/amavis-stats
70 cd $RPM_BUILD_ROOT%{_datadir}/%{name}/
71 ln -s amavis-stats.php index.php
75 rm -rf $RPM_BUILD_ROOT
78 if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*/etc/%{name}/apache.conf" /etc/httpd/httpd.conf; then
79 echo "Include /etc/%{name}/apache.conf" >> /etc/httpd/httpd.conf
81 if [ -f /var/lock/subsys/httpd ]; then
82 /usr/sbin/apachectl restart 1>&2
86 if [ "$1" = "0" ]; then
88 grep -v "^Include.*/etc/%{name}/apache.conf" /etc/httpd/httpd.conf > \
89 etc/httpd/httpd.conf.tmp
90 mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
91 if [ -f /var/lock/subsys/httpd ]; then
92 /usr/sbin/apachectl restart 1>&2
97 %defattr(644,root,root,755)
98 %doc README debian/changelog
99 %attr(755,root,root) %{_sbindir}/amavis-stats
101 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/cron.d/amavis-stats
105 %defattr(644,root,root,755)
107 %attr(640,root,root) %config(noreplace) /etc/%{name}/apache.conf
109 %dir %attr(755,http,root) %{_phpdir}/img
110 %{_phpdir}/%{name}.php
112 %attr(755,http,http) %dir %{_pkglibdir}/img