+# TODO:
+# - Add polish info mail templates
+# - Some perl master check what Patch1 did
+
%include /usr/lib/rpm/macros.perl
-Summary: A Mail Virus Scanner with SpamAssassin support - Daemon
-Summary(pl): Antywirusowy skaner poczty elektronicznej z obs³ug± SpamAssasina - Demon
+Summary: A Mail Virus Scanner with SpamAssassin support - daemon
+Summary(pl): Antywirusowy skaner poczty elektronicznej z obs³ug± SpamAssasina - demon
Name: amavisd-new
Version: 20030616
-Release: 1
+Release: 7
License: GPL
Group: Applications/Mail
-Source0: http://www.ijs.si/software/amavisd/%{name}-%{version}-p2.tar.gz
-# Source0-md5: 713a3ffc090481f72e5bb450b4a1f9ab
+Source0: http://www.ijs.si/software/amavisd/%{name}-%{version}-p7.tar.gz
+# Source0-md5: e6f35be1e14861e3869debdd9bdfbfba
Source1: %{name}.init
Patch0: %{name}-config.patch
-Patch1: %{name}-bin.patch
-Patch2: %{name}-config-mks.patch
-Patch100: http://www.ijs.si/software/amavisd/amavisd-new-20030616-p3.patch
-URL: http://www.amavis.org/
+# Patch1: %{name}-bin.patch # I don't get perl and it has rejects
+Patch3: %{name}-cpio-reads-tar.patch
+URL: http://www.ijs.si/software/amavisd/
BuildRequires: arc
BuildRequires: autoconf
BuildRequires: automake
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
Obsoletes: AMaViS
Obsoletes: amavis
+Obsoletes: amavisd
Obsoletes: amavisd-daemon
Obsoletes: amavisd-postfix
Obsoletes: amavisd-exim
%prep
%setup -q
-%patch100 -p0
%patch0 -p1
-#%patch1 -p1
-#%patch2 -p1
+#%%patch1 -p1
+%patch3 -p1
%build
%pre
if [ -n "`getgid amavis`" ]; then
- if [ "`getgid amavis`" != "116" ]; then
- echo "Error: group amavis doesn't have gid=116. Correct this before installing amavisd-new." 1>&2
- exit 1
- fi
+ if [ "`getgid amavis`" != "116" ]; then
+ echo "Error: group amavis doesn't have gid=116. Correct this before installing amavisd-new." 1>&2
+ exit 1
+ fi
else
- echo "adding group amavis GID=116."
- /usr/sbin/groupadd -g 116 -r -f amavis
+ echo "adding group amavis GID=116."
+ /usr/sbin/groupadd -g 116 -r -f amavis
fi
if [ -n "`id -u amavis 2>/dev/null`" ]; then
- if [ "`id -u amavis`" != "97" ]; then
- echo "Error: user amavis doesn't have uid=97. Correct this before installing amavis." 1>&2
- exit 1
- fi
+ if [ "`id -u amavis`" != "97" ]; then
+ echo "Error: user amavis doesn't have uid=97. Correct this before installing amavis." 1>&2
+ exit 1
+ fi
else
- /usr/sbin/useradd -u 97 -r -d %{_var}/spool/amavis -s /bin/false -c "Anti Virus Checker" -g nobody amavis 1>&2
+ /usr/sbin/useradd -u 97 -r -d %{_var}/spool/amavis -s /bin/false -c "Anti Virus Checker" -g nobody amavis 1>&2
fi
%postun
if [ "$1" = "0" ]; then
- /usr/sbin/userdel amavis
- echo "Removing group amavis."
- /usr/sbin/groupdel amavis
-
+ /usr/sbin/userdel amavis
+ echo "Removing group amavis."
+ /usr/sbin/groupdel amavis
fi
%post