]> git.pld-linux.org Git - packages/amavis-stats.git/blame - amavis-stats.spec
- updated to 0.1.22, not tested
[packages/amavis-stats.git] / amavis-stats.spec
CommitLineData
3124cc75 1%include /usr/lib/rpm/macros.perl
2Summary: Simple amavisd-new statistics generator
1407ceed 3Summary(pl.UTF-8): Prosty generator statystyk dla amavisd-new
3124cc75 4Name: amavis-stats
87db9fdf 5Version: 0.1.22
6Release: 0.1
3124cc75 7License: GPL
8Group: Applications/System
87db9fdf 9Source0: http://downloads.topicdesk.com/amavis_stats/%{name}-%{version}.tar.gz
10# Source0-md5: 5bea6811c00a4fda4b96b6a318a04a92
3124cc75 11Source1: %{name}.cron
be1e3db8 12Patch0: %{name}-gzip.patch
87db9fdf 13Patch1: %{name}-Makefile.patch
ad6e3250 14URL: http://osx.topicdesk.com/content/view/42/59/
d93b6dd2 15BuildRequires: rpmbuild(macros) >= 1.268
97b10506 16Provides: %{name}-%{version}-%{release}
87db9fdf 17#BuildArch: noarch
3124cc75 18BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
d93b6dd2 20%define _pkglibdir /var/lib/%{name}
87db9fdf 21%define _pkgcachedir /var/cache/%{name}
d93b6dd2
ER
22%define _webapps /etc/webapps
23%define _webapp %{name}
24%define _webappdir %{_webapps}/%{_webapp}
25%define _appdir %{_datadir}/%{_webapp}
3124cc75 26
27%description
28amavis-stats is a simple amavis statistics generator based on rrdtool.
29It produces graphs from amavisd-new log entries of infections broken
30down by virus.
31
646d6f3c 32%description -l pl.UTF-8
3124cc75 33amavis-stats jest prostym generatorem statystyk opartym na rrdtool.
646d6f3c
JR
34Tworzy wykresy zainfekowanych wiadomości, w rozbiciu na poszczególne
35wirusy, na podstawie logów amavisd-new.
3124cc75 36
be22c352
JR
37%package php
38Summary: PHP interface for amavis-stats
1407ceed 39Summary(pl.UTF-8): Interfejs PHP dla amavis-stats
be22c352 40Group: Applications/System
e79c41f0 41Requires: %{name}-%{version}-%{release}
66cef83b 42Requires: php(pcre)
d93b6dd2 43Requires: webapps
66cef83b 44Requires: webserver(php)
be22c352
JR
45
46%description php
47PHP interface for amavis-stats.
48
646d6f3c 49%description php -l pl.UTF-8
be22c352
JR
50Interfejs PHP dla amavis-stats.
51
3124cc75 52%prep
87db9fdf 53%setup -q
2f883aca 54%patch0 -p1
87db9fdf 55%patch1 -p1
ccab77fc 56
a6334884 57%build
87db9fdf 58%{__libtoolize}
59%{__aclocal}
60%{__autoconf}
61%{__autoheader}
62%{__automake}
63%configure \
64 --with-user=http \
65 --with-group=http \
66 --with-log-file=/var/log/maillog
ccab77fc 67%{__make}
3124cc75 68
69%install
70rm -rf $RPM_BUILD_ROOT
97b10506 71install -d $RPM_BUILD_ROOT/etc/cron.d
3124cc75 72
ccab77fc 73%{__make} install \
87db9fdf 74 DESTDIR=$RPM_BUILD_ROOT
94448566 75
3124cc75 76install %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.d/amavis-stats
d93b6dd2 77install -d $RPM_BUILD_ROOT%{_webapps}/%{_webapp}
87db9fdf 78mv $RPM_BUILD_ROOT{%{_datadir}/amavis-stats/amavis-stats.alias.conf,%{_webapps}/%{_webapp}/httpd.conf}
79mv $RPM_BUILD_ROOT{%{_datadir}/amavis-stats/amavis-stats.php.conf,%{_webapps}/%{_webapp}}
80ln -s %{_webapps}/%{_webapp}/amavis-stats.php.conf $RPM_BUILD_ROOT%{_datadir}/%{name}/amavis-stats.php.conf
d93b6dd2 81cp $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/{httpd,apache}.conf
df32a844 82
3124cc75 83%clean
84rm -rf $RPM_BUILD_ROOT
85
c9eeb26b 86%triggerin php -- apache1 < 1.3.37-3, apache1-base
d93b6dd2
ER
87%webapp_register apache %{_webapp}
88
c9eeb26b 89%triggerun php -- apache1 < 1.3.37-3, apache1-base
d93b6dd2
ER
90%webapp_unregister apache %{_webapp}
91
92%triggerin php -- apache < 2.2.0, apache-base
93%webapp_register httpd %{_webapp}
94
95%triggerun php -- apache < 2.2.0, apache-base
96%webapp_unregister httpd %{_webapp}
97
98%triggerpostun php -- %{name}-php < 0.1.13-0.rc6.4.1
99if [ -f /etc/httpd/httpd.conf ]; then
100 sed -i -e "/^Include.*%{name}\/apache.conf/d" /etc/httpd/httpd.conf
97b10506
PG
101fi
102
d93b6dd2
ER
103if [ -f /etc/%{name}/apache.conf.rpmsave ]; then
104 cp -f %{_webapps}/%{_webapp}/httpd.conf{,.rpmnew}
105 mv -f /etc/%{name}/apache.conf.rpmsave %{_webapps}/%{_webapp}/httpd.conf
97b10506
PG
106fi
107
d93b6dd2
ER
108rm -f /etc/httpd/httpd.conf/99_%{name}.conf
109/usr/sbin/webapp register httpd %{_webapp}
110%service -q httpd reload
111
3124cc75 112%files
113%defattr(644,root,root,755)
87db9fdf 114%doc README ChangeLog
97b10506 115%attr(755,root,root) %{_sbindir}/amavis-stats
3124cc75 116%dir %{_pkglibdir}
f6f55789 117%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/amavis-stats
87db9fdf 118%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/amavis-stats.conf
3124cc75 119%{_mandir}/man1/*
be22c352
JR
120
121%files php
122%defattr(644,root,root,755)
d93b6dd2
ER
123%dir %attr(750,root,http) %{_webapps}/%{_webapp}
124%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/apache.conf
125%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/httpd.conf
87db9fdf 126%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/amavis-stats.php.conf
d93b6dd2 127%dir %{_appdir}
87db9fdf 128%{_appdir}/amavis-stats.php.conf
d93b6dd2 129%{_appdir}/img
87db9fdf 130%{_appdir}/includes
d93b6dd2 131%{_appdir}/index.php
87db9fdf 132%{_appdir}/templates
133%{_appdir}/%{name}.php
134%{_appdir}/%{name}.html
135%{_appdir}/*.png
136%{_appdir}/*.ttf
137%attr(775,root,http) %dir %{_pkgcachedir}
This page took 0.080754 seconds and 4 git commands to generate.