Name: mailmgr Version: 1.2.3 Release: 5 Summary: Sendmail usage report generator Group: System Environment/Daemons License: GPL URL: http://web.onda.com.br/orso/%{name}.html Source0: http://web.onda.com.br/orso/%{name}-%{version}.tar.gz Source1: %{name}.conf Source2: sendmail-reports.conf Source3: %{name}-daily Source4: %{name}-weekly Source5: %{name}-monthly Source6: %{name}.html Patch0: http://web.onda.com.br/orso/%{name}-%{version}.patch1.gz BuildRoot: %{_tmppath}/%{name}-%{version}-root Requires: sendmail httpd %description Mailmgr generates reports of mail usage from SENDMAIL log file. The reports are generated in HTML or email. %prep %setup %patch0 -p1 -b .config %build ./configure --enable-prefix=%{_sbindir} \ --enable-config=%{_sysconfdir}/%{name} make %install [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/ mkdir -p $RPM_BUILD_ROOT%{_sbindir}/ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/www/sendmail-reports/ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/www/sendmail-reports/ONE-SHOT/ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/www/sendmail-reports/daily/ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/www/sendmail-reports/weekly/ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/www/sendmail-reports/monthly/ cp %{name} $RPM_BUILD_ROOT%{_sbindir}/. cp %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/. cp %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/. cp %{SOURCE5} $RPM_BUILD_ROOT%{_sbindir}/. cp %{SOURCE6} $RPM_BUILD_ROOT%{_localstatedir}/www/sendmail-reports/index.html %post if [ $1 = 1 ]; then /sbin/service httpd condrestart > /dev/null echo "Generating reports on first install, wait please." %{_sbindir}%{name} fi %clean [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc CONTRIBUTE ChangeLog README %config %{_sysconfdir}/%{name}/%{name}.conf %config %{_sysconfdir}/httpd/conf.d/sendmail-reports.conf %attr(0755,root,root) %{_sbindir}/%{name} %attr(0755,root,root) %{_sbindir}/%{name}-monthly %{_localstatedir}/www/sendmail-reports/ %changelog * Sun Nov 23 2003 Petr Krištof - Rebuild on FC-1 * Thu May 1 2003 Petr Krištof - Cron fixies * Sat Apr 12 2003 Petr Krištof - Build on RH-8.0 - Initial RPM package