i took the liberty to update the port from 3.0 to 4.0 (maintainer
timeout, but cc'd), but i made some additional changes.

- create and use the group (already in user.list)
- add/use variables for username/greylistdir
- update documentation to reflect our defaults
- added @sample ${SYSCONFIGDIR}/mail/

comments/suggestions...

thanks.

Index: Makefile
===================================================================
RCS file: /cvs/ports/mail/milter-greylist/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- Makefile    16 Sep 2007 00:17:05 -0000      1.4
+++ Makefile    7 Nov 2007 17:26:31 -0000
@@ -2,7 +2,7 @@
 
 COMMENT=       greylist milter
 
-DISTNAME=      milter-greylist-3.0
+DISTNAME=      milter-greylist-4.0
 PKGNAME=       ${DISTNAME}
 CATEGORIES=    mail
 HOMEPAGE=      http://hcpnet.free.fr/milter-greylist/
@@ -22,11 +22,21 @@
 
 BUILD_DEPENDS= ::devel/bison
 
-USERNAME=      _milter-greylist
+USERNAME=      _milter-greylist:_milter-greylist
+GREYLISTDIR=   /var/db/milter-greylist
 EXAMPLESDIR=   share/examples/milter-greylist
 
+SUBST_VARS=    GREYLISTDIR
+
 CONFIGURE_STYLE=       gnu
-CONFIGURE_ARGS+=       --with-user=${USERNAME}
+CONFIGURE_ARGS+=       --with-user=${USERNAME} \
+                       --with-dumpfile=${GREYLISTDIR}/greylist.db
+
+post-patch:
+       @perl -pi -e 's,!!USERNAME!!,${USERNAME},; \
+               s,!!GREYLISTDIR!!,${GREYLISTDIR},' ${WRKSRC}/greylist.conf
+       @perl -pi -e 's,!!GREYLISTDIR!!,${GREYLISTDIR},' \
+               ${WRKSRC}/greylist.conf.5 ${WRKSRC}/milter-greylist.8
 
 do-install:
        ${INSTALL_PROGRAM} ${WRKSRC}/milter-greylist ${PREFIX}/libexec
Index: distinfo
===================================================================
RCS file: /cvs/ports/mail/milter-greylist/distinfo,v
retrieving revision 1.3
diff -u -r1.3 distinfo
--- distinfo    5 Apr 2007 16:20:02 -0000       1.3
+++ distinfo    7 Nov 2007 17:26:31 -0000
@@ -1,5 +1,5 @@
-MD5 (milter-greylist-3.0.tgz) = /91ViMeKQFwQfUyKQMfgGg==
-RMD160 (milter-greylist-3.0.tgz) = Y5GIO+kHax95CrWCBwsVK4DiBQw=
-SHA1 (milter-greylist-3.0.tgz) = OLM0MA/hFBqDKf4Zh1TmMoaYESk=
-SHA256 (milter-greylist-3.0.tgz) = iWLCm3MOsCToPRQvjC/zb/xBtl9hEcpnB3Uhc7JcjNA=
-SIZE (milter-greylist-3.0.tgz) = 141461
+MD5 (milter-greylist-4.0.tgz) = KDSTOycpjTBjDupiHL/c9Q==
+RMD160 (milter-greylist-4.0.tgz) = 6EMpSR6gYERUmq+/Zb+K30wBlWs=
+SHA1 (milter-greylist-4.0.tgz) = 6UyMin7VzydVDrafZgx9dcYPasE=
+SHA256 (milter-greylist-4.0.tgz) = izSAYq+PRoeaIaGQBw1yYWU2Nl9uHjGO/xjD/LAkyHU=
+SIZE (milter-greylist-4.0.tgz) = 185107
Index: patches/patch-greylist_conf
===================================================================
RCS file: /cvs/ports/mail/milter-greylist/patches/patch-greylist_conf,v
retrieving revision 1.2
diff -u -r1.2 patch-greylist_conf
--- patches/patch-greylist_conf 22 Nov 2006 22:26:31 -0000      1.2
+++ patches/patch-greylist_conf 7 Nov 2007 17:26:31 -0000
@@ -1,12 +1,20 @@
 $OpenBSD: patch-greylist_conf,v 1.2 2006/11/22 22:26:31 jakob Exp $
---- greylist.conf.orig Wed Sep 27 22:03:49 2006
-+++ greylist.conf      Wed Nov 22 15:54:29 2006
-@@ -8,7 +8,7 @@
+--- greylist.conf.orig Wed Oct 24 23:20:11 2007
++++ greylist.conf      Wed Nov  7 11:35:35 2007
+@@ -6,12 +6,12 @@
+ #
+ 
  pidfile "/var/run/milter-greylist.pid"
- socket "/var/milter-greylist/milter-greylist.sock"
- dumpfile "/var/milter-greylist/greylist.db"
+-socket "/var/milter-greylist/milter-greylist.sock"
+-dumpfile "/var/milter-greylist/greylist.db"
 -user "smmsp"
-+user "_milter-greylist"
++socket "!!GREYLISTDIR!!/milter-greylist.sock"
++dumpfile "!!GREYLISTDIR!!/greylist.db"
++user "!!USERNAME!!"
  
- # Be verbose (or use -v flag)
- #verbose
+ # Log milter-greylist activity to a file
+-#stat "/var/milter-greylist/greylist.log" \
++#stat "!!GREYLISTDIR!!/greylist.log" \
+ #      "%T{%Y/%m/%d %T} %d [%i] %r -> %f %S (ACL %A) %Xc %Xe %Xm %Xh"
+ # Same, sent to syslog
+ #stat "|logger -p local7.info" \
Index: patches/patch-greylist_conf_5
===================================================================
RCS file: patches/patch-greylist_conf_5
diff -N patches/patch-greylist_conf_5
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-greylist_conf_5       7 Nov 2007 17:26:31 -0000
@@ -0,0 +1,21 @@
+$OpenBSD$
+--- greylist.conf.5.orig       Sun Oct 28 19:14:26 2007
++++ greylist.conf.5    Wed Nov  7 11:35:21 2007
+@@ -802,7 +802,7 @@ This chooses the location of the greylist dump file, l
+ command line option does. The path must be absolute and enclosed in quotes.
+ Example:
+ .IP
+-  dumpfile "/var/milter-greylist/greylist.db"
++  dumpfile "!!GREYLISTDIR!!/greylist.db"
+ .TP
+ .I subnetmatch
+ This is equivalent to the 
+@@ -831,7 +831,7 @@ to communicate with
+ It must be enclosed in quotes and can optionally be followed by a permission 
mode
+ (valid values are 666, 660 or 600, other values cause an error):
+ .IP
+-  socket "/var/milter-greylist/milter-greylist.sock" 660
++  socket "!!GREYLISTDIR!!/milter-greylist.sock" 660
+ .TP
+ .I user
+ This keyword should be followed by a quoted user login and optionally a 
Index: patches/patch-milter-greylist_8
===================================================================
RCS file: patches/patch-milter-greylist_8
diff -N patches/patch-milter-greylist_8
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-milter-greylist_8     7 Nov 2007 17:26:31 -0000
@@ -0,0 +1,21 @@
+$OpenBSD$
+--- milter-greylist.8.orig     Tue Oct 23 07:38:51 2007
++++ milter-greylist.8  Wed Nov  7 11:36:22 2007
+@@ -100,7 +100,7 @@ will start with an empty grey list. 
+ .PP
+ The default location for the grey list database and the socket for
+ communicating with sendmail is
+-.B /var/milter-greylist/\fR.
++.B !!GREYLISTDIR!!\fR.
+ That directory must be owned and writeable by the user id under
+ which 
+ .B milter-greylist
+@@ -147,7 +147,7 @@ option in the configuration file.
+ .TP
+ .B -d \fIdumpfile\fR
+ Location of the dump file. Default is 
+-.I /var/milter-greylist/greylist.db\fR.
++.I !!GREYLISTDIR!!/greylist.db\fR.
+ Equivalent to the
+ .I dumpfile
+ option in the configuration file.
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/mail/milter-greylist/pkg/PLIST,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 PLIST
--- pkg/PLIST   31 Jul 2006 12:36:43 -0000      1.1.1.1
+++ pkg/PLIST   7 Nov 2007 17:26:31 -0000
@@ -1,11 +1,14 @@
 @comment $OpenBSD: PLIST,v 1.1.1.1 2006/07/31 12:36:43 jakob Exp $
[EMAIL PROTECTED] _milter-greylist:568::daemon:milter-greylist 
Account:/nonexistent:/sbin/nologin
[EMAIL PROTECTED] _milter-greylist:568
[EMAIL PROTECTED] _milter-greylist:568:_milter-greylist:daemon:milter-greylist 
Account:/nonexistent:/sbin/nologin
 libexec/milter-greylist
 @man man/man5/greylist.conf.5
 @man man/man8/milter-greylist.8
 share/examples/milter-greylist/
[EMAIL PROTECTED] ${SYSCONFDIR}/mail/
 share/examples/milter-greylist/greylist.conf
 @sample ${SYSCONFDIR}/mail/greylist.conf
 @mode 0755
[EMAIL PROTECTED] _milter-greylist
 @owner _milter-greylist
[EMAIL PROTECTED] /var/db/milter-greylist/
[EMAIL PROTECTED] ${GREYLISTDIR}/

Reply via email to