%include /usr/lib/rpm/macros.perl
+%define sub_ver pre2
Summary: A Mail Virus Scanner
Summary(pl): Antywirusowy skaner poczty elektronicznej
Name: amavis
-Version: 11
-Release: 2
+Version: 0.3.13%{sub_ver}
+Release: 0.1
URL: http://www.amavis.org/
-Source0: http://www.amavis.org/dist/perl/%{name}-perl-%{version}.tar.gz
-Patch0: %{name}-perl-mks32.patch
-Patch1: %{name}-nomilter.patch
+Source0: http://www.amavis.org/dist/perl/%{name}-%{version}.tar.gz
+# Source0-md5: 2b90dba30a5ea2b73c2b348e26967f30
License: GPL
Group: Applications/Mail
Obsoletes: AMaViS
BuildRequires: autoconf >= 2.52
BuildRequires: automake
-BuildRequires: perl
BuildRequires: perl-modules
BuildRequires: perl-Convert-UUlib
BuildRequires: perl-Convert-TNEF
BuildRequires: ncompress
BuildRequires: unrar
BuildRequires: zoo
+Requires(pre): /bin/id
+Requires(pre): /usr/sbin/useradd
+Requires(postun): /usr/sbin/userdel
Requires: file
Requires: sh-utils
Requires: arc
Requires: ncompress
Requires: unrar
Requires: zoo
-Requires: %{_sbindir}/sendmail
+Requires: /usr/sbin/sendmail
+Obsoletes: amavisd
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
a jednym lub wiêcej programów antywirusowych.
%prep
-%setup -q -n %{name}-perl-%{version}
-%patch0 -p1
-%patch1 -p1
+%setup -q
%build
-aclocal
-automake -a -c
-autoconf
+%{__aclocal}
+%{__automake}
+%{__autoconf}
%configure \
--enable-all \
--with-sendmail-wrapper=%{_sbindir}/sendmail \
--with-runtime-dir=/var/spool/amavis/runtime \
--with-virusdir=/var/spool/amavis/virusmails \
--with-mailto="postmaster" \
- --with-amavisuser=amavis
+ --with-amavisuser=amavis \
+ --with-perl=%{__perl}
%{__make}
%{__make} install \
amavisuser=$(id -u) \
DESTDIR=$RPM_BUILD_ROOT
-gzip -9nf README* AUTHORS BUGS ChangeLog FAQ HINTS TODO doc/amavis.html
-
%clean
rm -rf $RPM_BUILD_ROOT
%pre
if [ -n "`id -u amavis 2>/dev/null`" ]; then
if [ "`id -u amavis`" != "97" ]; then
- echo "Warning: user amavis haven't uid=97. Correct this before installing amavis" 1>&2
+ echo "Error: user amavis doesn't have uid=97. Correct this before installing amavis." 1>&2
exit 1
fi
else
%files
%defattr(644,root,root,755)
%attr(755,root,root) %{_sbindir}/*
-%doc *.gz doc/*.gz doc/amavis.png
+%doc README* AUTHORS BUGS ChangeLog FAQ HINTS TODO doc/amavis.html doc/amavis.png
%attr(750,amavis,root) /var/spool/amavis