1 Summary: New generation amavis
2 Summary(pl): Amavis nowej generacji
7 Group: Applications/Mail
8 Source0: http://prdownloads.sourceforge.net/amavis/%{name}_%{version}.tar.gz
9 Patch0: amavis-ng.patch
10 URL: http://amavis.sourceforge.net/
12 BuildRequires: perl-devel
16 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 rm -rf $RPM_BUILD_ROOT
33 install -d $RPM_BUILD_ROOT
35 %{__make} install DESTDIR=$RPM_BUILD_ROOT
38 rm -rf $RPM_BUILD_ROOT
41 if [ -n "`getgid amavis`" ]; then
42 if [ "`getgid amavis`" != "97" ]; then
43 echo "Warning: group amavis doesn't have gid=97. Correct this before installing clamav" 1>&2
47 echo "adding group amavis GID=97"
48 /usr/sbin/groupadd -g 97 -r -f amavis
51 if [ -n "`id -u amavis 2>/dev/null`" ]; then
52 if [ "`id -u amavis`" != "97" ]; then
53 echo "Error: user amavis doesn't have uid=97. Correct this before installing amavis." 1>&2
57 echo "adding user amavis UID=97"
58 /usr/sbin/useradd -u 97 -r -d /var/spool/amavis -s /bin/false -c "Anti Virus Checker" -g nobody amavis 1>&2
62 if [ "$1" = "0" ]; then
63 echo "Removing user amavis"
64 /usr/sbin/userdel amavis
65 echo "Removing group clamav"
66 /usr/sbin/groupdel amavis
71 %defattr(644,root,root,755)
73 %attr(755,root,root) %{_bindir}/*
74 %attr(755,root,root) %{_sbindir}/*
76 %attr(750,amavis,amavis) /var/spool/amavis