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