summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authortron <tron>2009-03-08 15:54:26 +0000
committertron <tron>2009-03-08 15:54:26 +0000
commit5042ddbaa4384711d56ef58c555c2e6a8ad426e8 (patch)
treef4b7d52b9a327f68c9dd93e5b3a3afd8ec01874a /mail
parente615631162d9fdd3802679acad1f16245b7b4e08 (diff)
downloadpkgsrc-5042ddbaa4384711d56ef58c555c2e6a8ad426e8.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')
-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)