summaryrefslogtreecommitdiff
path: root/mail/milter-greylist
diff options
context:
space:
mode:
authortron <tron@pkgsrc.org>2009-03-08 15:54:26 +0000
committertron <tron@pkgsrc.org>2009-03-08 15:54:26 +0000
commita35062dc713cdd9db51bb3a1e8c548dd8d718f15 (patch)
treef4b7d52b9a327f68c9dd93e5b3a3afd8ec01874a /mail/milter-greylist
parent73b0adc188ca5b414ae7b239eaa0660391b35ad5 (diff)
downloadpkgsrc-a35062dc713cdd9db51bb3a1e8c548dd8d718f15.tar.gz
Add two new options "postfix-milter" and "sendmail-milter". One of the
two must be used to determine whether this package is built for use with Sendmail (the default) or Postfix. Use an appropriate user (either "smmsp" or "postfix") in the two cases. This avoid permission problems between Postfix and milter-greylist. Bump package revision because of these changes.
Diffstat (limited to 'mail/milter-greylist')
-rw-r--r--mail/milter-greylist/Makefile24
-rw-r--r--mail/milter-greylist/files/milter-greylist.sh4
-rw-r--r--mail/milter-greylist/options.mk34
3 files changed, 46 insertions, 16 deletions
diff --git a/mail/milter-greylist/Makefile b/mail/milter-greylist/Makefile
index 5293aba1228..2f2a84ba25c 100644
--- a/mail/milter-greylist/Makefile
+++ b/mail/milter-greylist/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.39 2009/01/19 06:16:38 obache Exp $
+# $NetBSD: Makefile,v 1.40 2009/03/08 15:54:26 tron Exp $
DISTNAME= milter-greylist-4.0.1
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= mail
MASTER_SITES= ftp://ftp.espci.fr/pub/milter-greylist/
EXTRACT_SUFX= .tgz
@@ -16,22 +16,22 @@ PKG_DESTDIR_SUPPORT= user-destdir
MAKE_JOBS_SAFE= no
GNU_CONFIGURE= YES
-CONFIGURE_ARGS+= --with-user=smmsp
-
BUILD_TARGET= milter-greylist
-PKG_GROUPS= smmsp
-PKG_USERS= smmsp:smmsp
-PKG_GECOS.smmsp= Sendmail Message Submission Program
-
-RCD_SCRIPTS= milter-greylist
+RCD_SCRIPTS= milter-greylist
.include "options.mk"
+CONFIGURE_ARGS+= --with-user=${MILTER_USER}
+BUILD_DEFS+= MILTER_USER
+FILES_SUBST+= MILTER_USER=${MILTER_USER:Q}
+
+INSTALLATION_DIRS+= share/doc/milter-greylist
+INSTALLATION_DIRS+= share/examples/milter-greylist
+
post-install:
- ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/doc/milter-greylist
- ${INSTALL_DATA} ${WRKSRC}/README ${DESTDIR}${PREFIX}/share/doc/milter-greylist
- ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/examples/milter-greylist
+ ${INSTALL_DATA} ${WRKSRC}/README \
+ ${DESTDIR}${PREFIX}/share/doc/milter-greylist
${INSTALL_DATA} ${WRKSRC}/greylist.conf \
${DESTDIR}${PREFIX}/share/examples/milter-greylist
diff --git a/mail/milter-greylist/files/milter-greylist.sh b/mail/milter-greylist/files/milter-greylist.sh
index 3334cf73790..c5ed93e8065 100644
--- a/mail/milter-greylist/files/milter-greylist.sh
+++ b/mail/milter-greylist/files/milter-greylist.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: milter-greylist.sh,v 1.3 2006/02/11 23:14:15 seb Exp $
+# $NetBSD: milter-greylist.sh,v 1.4 2009/03/08 15:54:26 tron Exp $
#
# PROVIDE: milter-greylist
@@ -10,7 +10,7 @@
name="miltergreylist"
rcvar="miltergreylist"
command="@PREFIX@/bin/milter-greylist"
-command_args="-p /var/milter-greylist/milter-greylist.sock -u smmsp"
+command_args="-p /var/milter-greylist/milter-greylist.sock -u @MILTER_USER@"
if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then
. /etc/rc.subr
diff --git a/mail/milter-greylist/options.mk b/mail/milter-greylist/options.mk
index 7e181a753e6..be1935d15dd 100644
--- a/mail/milter-greylist/options.mk
+++ b/mail/milter-greylist/options.mk
@@ -1,8 +1,10 @@
-# $NetBSD: options.mk,v 1.5 2008/10/27 19:40:11 tron Exp $
+# $NetBSD: options.mk,v 1.6 2009/03/08 15:54:26 tron Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.milter-greylist
+PKG_OPTIONS_REQUIRED_GROUPS= mta
+PKG_OPTIONS_GROUP.mta= postfix-milter sendmail-milter
PKG_SUPPORTED_OPTIONS= dnsrbl drac spf
-PKG_SUGGESTED_OPTIONS= dnsrbl spf
+PKG_SUGGESTED_OPTIONS= dnsrbl sendmail-milter spf
.include "../../mk/bsd.options.mk"
@@ -25,6 +27,34 @@ CONFIGURE_ARGS+= --enable-drac --with-drac-db=${DRACD_DB}
.endif
###
+### Postfix support
+###
+.if !empty(PKG_OPTIONS:Mpostfix-milter)
+CONFIGURE_ARGS+= --enable-postfix
+
+POSTFIX_QUEUE_DIR?= ${VARBASE}/spool/postfix
+BUILD_DEFS+= VARBASE
+
+PKG_GROUPS?= postfix
+PKG_USERS?= postfix:postfix
+PKG_GECOS.postfix= Postfix User
+PKG_HOME.postfix= ${POSTFIX_QUEUE_DIR}
+
+MILTER_USER= postfix
+.endif
+
+###
+### Sendmail support
+###
+.if !empty(PKG_OPTIONS:Msendmail-milter)
+PKG_GROUPS= smmsp
+PKG_USERS= smmsp:smmsp
+PKG_GECOS.smmsp= Sendmail Message Submission Program
+
+MILTER_USER= smmsp
+.endif
+
+###
### Sender Policy Framework
###
.if empty(PKG_OPTIONS:Mspf)