Browse Source

fix paths in manpages; add 'postgrey_flags' variable to %config section of rc.postgrey in order to allow one to specify arbitrary flags in rc.conf, e.g. '--exim' to make postgrey work with the Exim MTA

Christoph Schug 18 years ago
parent
commit
210772de31
2 changed files with 13 additions and 4 deletions
  1. 11 3
      postgrey/postgrey.spec
  2. 2 1
      postgrey/rc.postgrey

+ 11 - 3
postgrey/postgrey.spec

@@ -33,7 +33,7 @@ Class:        BASE
 Group:        Mail
 Group:        Mail
 License:      GPL
 License:      GPL
 Version:      1.31
 Version:      1.31
-Release:      20071003
+Release:      20071108
 
 
 #   list of sources
 #   list of sources
 Source0:      http://postgrey.schweikert.ch/pub/postgrey-%{version}.tar.gz
 Source0:      http://postgrey.schweikert.ch/pub/postgrey-%{version}.tar.gz
@@ -74,8 +74,16 @@ AutoReqProv:  no
 
 
 %build
 %build
     #   build manual page
     #   build manual page
-    pod2man postgrey >postgrey.8
-    pod2man contrib/postgreyreport >contrib/postgreyreport.8
+    for i in postgrey contrib/postgreyreport; do
+        pod2man $i >$i.8
+        %{l_shtool} subst \
+            -e 's;/etc/postfix/postgrey_\([a-z_.]\{1,\}\);%{l_prefix}/etc/postgrey/\1;g' \
+            -e 's;/etc/postfix;%{l_prefix}/etc/postfix;g' \
+            -e 's;/etc/main.cf;%{l_prefix}/etc/postfix/main.cf;g' \
+            -e 's;/var/log/maillog;%{l_prefix}/var/postfix/log/postfix.log;g' \
+            -e 's;/var/spool/postfix/postgrey;%{l_prefix}/var/postgrey;g' \
+            $i.8
+    done
 
 
 %install
 %install
     #   create installation hierarchy
     #   create installation hierarchy

+ 2 - 1
postgrey/rc.postgrey

@@ -5,6 +5,7 @@
 
 
 %config
 %config
     postgrey_enable="$openpkg_rc_def"
     postgrey_enable="$openpkg_rc_def"
+    postgrey_flags=""
     postgrey_delay="300"
     postgrey_delay="300"
     postgrey_maxage="28"
     postgrey_maxage="28"
     postgrey_autowhitelist="5"
     postgrey_autowhitelist="5"
@@ -40,7 +41,7 @@
 %start -u @l_rusr@
 %start -u @l_rusr@
     rcService postgrey enable yes || exit 0
     rcService postgrey enable yes || exit 0
     rcService postgrey active yes && exit 0
     rcService postgrey active yes && exit 0
-    @l_prefix@/sbin/postgrey \
+    @l_prefix@/sbin/postgrey ${postgrey_flags} \
         --daemonize \
         --daemonize \
         --user="@l_rusr@" \
         --user="@l_rusr@" \
         --group="@l_rgrp@" \
         --group="@l_rgrp@" \