%global amavisdir /var/spool/amavisd %define _localstatedir %{amavisdir} Name: amavisd-milter Version: 1.5.0 Release: 4%{dist} Summary: Sendmail milter for amavisd-new with support for the AM.PDP protocol Group: Applications/System License: BSD URL: http://amavisd-milter.sourceforge.net/ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz Source1: amavisd-milter.init Source2: amavisd-milter.sysconfig #BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: sendmail-devel >= 8.13 Requires: amavisd-new >= 2.4.3 Requires: initscripts %description amavisd-milter is a sendmail milter (mail filter) for amavisd-new 2.4.3 or and sendmail 8.13 and above (limited support for sendmail 8.12 is provided) which use the new AM.PDP protocol. Instead of older amavis-milter helper program, full amavisd-new functionality is available, including adding spam and virus information header fields, modifying Subject, adding address extensions and removing certain recipients from delivery while delivering the same message to the rest. %prep %setup -q -n %{name}-%{version} %build %configure --with-working-dir=%{amavisdir} make %{?_smp_mflags} %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} install -m 755 -d %{buildroot}/%{_sysconfdir}/rc.d/init.d/ install -m 755 %{SOURCE1} %{buildroot}/%{_sysconfdir}/rc.d/init.d/%{name} install -m 755 -d %{buildroot}/%{_sysconfdir}/sysconfig/ install -m 644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/sysconfig/%{name} #%clean #rm -rf %{buildroot} %post /sbin/chkconfig --add amavisd-milter %preun if [ $1 -eq 0 ] ; then /sbin/service amavisd-milter stop &>/dev/null /sbin/chkconfig --del amavisd-milter fi %postun if [ $1 -ne 0 ]; then /sbin/service amavisd-milter condrestart &>/dev/null fi %files %defattr(-,root,root,-) %doc LICENSE README TODO CHANGES %{_sysconfdir}/rc.d/init.d/%{name} %config(noreplace) %{_sysconfdir}/sysconfig/%{name} %{_sbindir}/amavisd-milter %{_mandir}/man8/amavisd-milter.8.gz %changelog * Fri May 25 2012 Andy Cobaugh 1.5.0-4 - Include LICENSE file - Use dist flag in Release * Wed Sep 15 2010 Andy Cobaugh 1.5.0-2 - Add scriptlets * Wed Sep 15 2010 Andy Cobaugh 1.5.0-1 - Initial specfile