X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=amavis-stats.spec;h=ee5cd1a708eba94f13a66c25876270eeff4e1997;hb=HEAD;hp=3eb2c2abe026429ba363c007bd26e2828c8ad749;hpb=21830a2074e4a7bbdd15a5bd066f14f8edde9982;p=packages%2Famavis-stats.git diff --git a/amavis-stats.spec b/amavis-stats.spec index 3eb2c2a..305feb8 100644 --- a/amavis-stats.spec +++ b/amavis-stats.spec @@ -1,18 +1,24 @@ -%include /usr/lib/rpm/macros.perl +# +# TODO: +# - add trigger to update apache configuration when upgrading from +# older versions (not sure if this is required) +# Summary: Simple amavisd-new statistics generator Summary(pl.UTF-8): Prosty generator statystyk dla amavisd-new Name: amavis-stats Version: 0.1.22 -Release: 0.1 +Release: 1 License: GPL Group: Applications/System Source0: http://downloads.topicdesk.com/amavis_stats/%{name}-%{version}.tar.gz # Source0-md5: 5bea6811c00a4fda4b96b6a318a04a92 -Source1: %{name}.cron +Source1: %{name}.init Patch0: %{name}-gzip.patch Patch1: %{name}-Makefile.patch +Patch2: %{name}-pid.patch URL: http://osx.topicdesk.com/content/view/42/59/ BuildRequires: rpmbuild(macros) >= 1.268 +BuildRequires: sed >= 4.0 Provides: %{name}-%{version}-%{release} BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -53,6 +59,7 @@ Interfejs PHP dla amavis-stats. %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 %build %{__libtoolize} @@ -60,25 +67,25 @@ Interfejs PHP dla amavis-stats. %{__autoconf} %{__autoheader} %{__automake} +sed -i -e '/basic_machine=powerpc-apple/s/$/\n\t\t;;\n\tnoarch-*)\n\t\tbasic_machine=noarch/;' config.sub %configure \ - --with-user=http \ + --with-user=root \ --with-group=http \ --with-log-file=/var/log/maillog %{__make} %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT/etc/cron.d %{__make} install \ DESTDIR=$RPM_BUILD_ROOT -install %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.d/amavis-stats -install -d $RPM_BUILD_ROOT%{_webapps}/%{_webapp} +install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_webapps}/%{_webapp}} mv $RPM_BUILD_ROOT{%{_datadir}/amavis-stats/amavis-stats.alias.conf,%{_webapps}/%{_webapp}/httpd.conf} mv $RPM_BUILD_ROOT{%{_datadir}/amavis-stats/amavis-stats.php.conf,%{_webapps}/%{_webapp}} ln -s %{_webapps}/%{_webapp}/amavis-stats.php.conf $RPM_BUILD_ROOT%{_datadir}/%{name}/amavis-stats.php.conf cp $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/{httpd,apache}.conf +install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/amavis-stats %clean rm -rf $RPM_BUILD_ROOT @@ -112,9 +119,9 @@ rm -f /etc/httpd/httpd.conf/99_%{name}.conf %files %defattr(644,root,root,755) %doc README ChangeLog +%attr(754,root,root) /etc/rc.d/init.d/amavis-stats %attr(755,root,root) %{_sbindir}/amavis-stats %dir %{_pkglibdir} -%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/amavis-stats %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/amavis-stats.conf %{_mandir}/man1/* @@ -123,7 +130,7 @@ rm -f /etc/httpd/httpd.conf/99_%{name}.conf %dir %attr(750,root,http) %{_webapps}/%{_webapp} %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/apache.conf %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/httpd.conf -%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/amavis-stats.php.conf +%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/amavis-stats.php.conf %dir %{_appdir} %{_appdir}/amavis-stats.php.conf %{_appdir}/img