]> git.pld-linux.org Git - packages/amavis-ng.git/commitdiff
- updated to 0.4.1.orig RA-1_0 STABLE amavis-ng-0_1_4_1_orig-0
authorradzio <radzio@pld-linux.org>
Thu, 29 Aug 2002 18:20:05 +0000 (18:20 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- add Patch0 (amavis-ng.patch)
- add %pre and %postun scripts, which create/delete amavis group and user acount
  ([GU]ID=97)
- STBR, test
- TODO: Requires, /usr/bin/suidperl is needed by /usr/sbin/qmail-queue.amavis

Changed files:
    amavis-ng.spec -> 1.3

amavis-ng.spec

index a1bc9695a040b24d2ed1c13ab39a86245e0db11f..35036571c4b4b02fd0e13664cf88c24f1dd7a2ae 100644 (file)
@@ -1,11 +1,12 @@
 Summary:       New generation amavis
 Summary(pl):   Amavis nowej generacji
 Name:          amavis-ng
-Version:       0.1.3.1
+Version:       0.1.4.1.orig
 Release:       0
 License:       GPL
 Group:         Applications/Mail
-Source0:       http://prdownloads.sourceforge.net/amavis/%{name}-%{version}.tar.gz
+Source0:       http://prdownloads.sourceforge.net/amavis/%{name}_%{version}.tar.gz
+Patch0:                amavis-ng.patch
 URL:           http://amavis.sourceforge.net/
 BuildRequires: perl
 BuildRequires: perl-devel
@@ -22,10 +23,11 @@ blah blah
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 perl Makefile.PL
-
+%{__make}
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT
@@ -35,8 +37,40 @@ install -d $RPM_BUILD_ROOT
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%pre
+if [ -n "`getgid amavis`" ]; then
+   if [ "`getgid amavis`" != "97" ]; then
+       echo "Warning: group amavis doesn't have gid=97. Correct this before installing clamav" 1>&2
+       exit 1
+   fi
+else
+  echo "adding group amavis GID=97"
+  /usr/sbin/groupadd -g 97 -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
+else
+   echo "adding user amavis UID=97"
+   /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
+   echo "Removing user amavis"
+   /usr/sbin/userdel amavis
+   echo "Removing group clamav"
+   /usr/sbin/groupdel amavis
+fi
+                                                               
+
 %files
 %defattr(644,root,root,755)
-%doc README ChangeLog
+%doc README TODO
 %attr(755,root,root) %{_bindir}/*
-%{_datadir}/%{name}
+%attr(755,root,root) %{_sbindir}/*
+%{_datadir}/amavis
+%attr(750,amavis,amavis) /var/spool/amavis
This page took 0.087146 seconds and 4 git commands to generate.