summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2007-07-04 20:54:31 +0000
committerjlam <jlam@pkgsrc.org>2007-07-04 20:54:31 +0000
commit4390d56940778d6ab856866401c0690f1c28c724 (patch)
tree651c1d29a5b557efafa04d2bb6f2cb512a979f64 /mail
parenta6f8cbe795a03d65965cf24d3c410970c17f620e (diff)
downloadpkgsrc-4390d56940778d6ab856866401c0690f1c28c724.tar.gz
Make it easier to build and install packages "unprivileged", where
the owner of all installed files is a non-root user. This change affects most packages that require special users or groups by making them use the specified unprivileged user and group instead. (1) Add two new variables PKG_GROUPS_VARS and PKG_USERS_VARS to unprivileged.mk. These two variables are lists of other bmake variables that define package-specific users and groups. Packages that have user-settable variables for users and groups, e.g. apache and APACHE_{USER,GROUP}, courier-mta and COURIER_{USER,GROUP}, etc., should list these variables in PKG_USERS_VARS and PKG_GROUPS_VARS so that unprivileged.mk can know to set them to ${UNPRIVILEGED_USER} and ${UNPRIVILEGED_GROUP}. (2) Modify packages to use PKG_GROUPS_VARS and PKG_USERS_VARS.
Diffstat (limited to 'mail')
-rw-r--r--mail/clamav/Makefile7
-rw-r--r--mail/clamsmtp/Makefile4
-rw-r--r--mail/courier-mta/Makefile.common5
-rw-r--r--mail/courier-mta/options.mk4
-rw-r--r--mail/cyrus-imapd/Makefile5
-rw-r--r--mail/cyrus-imapd21/Makefile5
-rw-r--r--mail/dovecot/Makefile4
-rw-r--r--mail/dspam/Makefile9
-rw-r--r--mail/exim/Makefile7
-rw-r--r--mail/exim3/Makefile7
-rw-r--r--mail/freepops/Makefile4
-rw-r--r--mail/gld/Makefile5
-rw-r--r--mail/imp/Makefile5
-rw-r--r--mail/ingo/Makefile4
-rw-r--r--mail/mailman/Makefile9
-rw-r--r--mail/majordomo/Makefile7
-rw-r--r--mail/mimedefang/Makefile8
-rw-r--r--mail/nullmailer/Makefile4
-rw-r--r--mail/popa3d/Makefile5
-rw-r--r--mail/postgrey/Makefile6
-rw-r--r--mail/prayer/Makefile6
-rw-r--r--mail/qpopper/Makefile5
-rw-r--r--mail/roundcube/Makefile7
-rw-r--r--mail/squirrelmail/Makefile7
-rw-r--r--mail/sympa/Makefile8
-rw-r--r--mail/turba/Makefile4
26 files changed, 99 insertions, 52 deletions
diff --git a/mail/clamav/Makefile b/mail/clamav/Makefile
index 3c4547025fb..7648fddaf0b 100644
--- a/mail/clamav/Makefile
+++ b/mail/clamav/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.75 2007/06/17 22:06:33 wiz Exp $
+# $NetBSD: Makefile,v 1.76 2007/07/04 20:54:40 jlam Exp $
DISTNAME= clamav-${CLAMAV_VERSION}
PKGNAME= clamav-${CLAMAV_VERSION:S/-/./}
@@ -33,7 +33,7 @@ CONFIGURE_ARGS+= --disable-readdir-r
CONFIGURE_ARGS+= --enable-readdir_r
.endif
-BUILD_DEFS+= CLAMAV_USER CLAMAV_GROUP CLAMAV_DBDIR
+BUILD_DEFS+= CLAMAV_DBDIR
FILES_SUBST+= CLAMAV_USER=${CLAMAV_USER:Q}
MESSAGE_SUBST+= CLAMAV_USER=${CLAMAV_USER}
@@ -41,6 +41,9 @@ RCD_SCRIPTS= clamd freshclamd
PKG_GROUPS+= ${CLAMAV_GROUP}
PKG_USERS+= ${CLAMAV_USER}:${CLAMAV_GROUP}
+PKG_GROUPS_VARS+= CLAMAV_GROUP
+PKG_USERS_VARS+= CLAMAV_USER
+
EGDIR= ${PREFIX}/share/examples/clamav
FILES_SUBST+= CLAMAV_DBDIR=${CLAMAV_DBDIR:Q}
diff --git a/mail/clamsmtp/Makefile b/mail/clamsmtp/Makefile
index 7a5c5221b1c..8afc0d73874 100644
--- a/mail/clamsmtp/Makefile
+++ b/mail/clamsmtp/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.32 2007/06/15 09:47:06 martti Exp $
+# $NetBSD: Makefile,v 1.33 2007/07/04 20:54:40 jlam Exp $
DISTNAME= clamsmtp-1.8
PKGREVISION= 3
@@ -26,7 +26,7 @@ CONF_FILES= ${EGDIR}/clamsmtpd.conf \
INSTALLATION_DIRS= share/examples/${PKGBASE}
-BUILD_DEFS+= CLAMAV_USER
+PKG_USERS_VARS+= CLAMAV_USER
post-install:
${INSTALL_DATA} ${WRKSRC}/doc/clamsmtpd.conf ${EGDIR}
diff --git a/mail/courier-mta/Makefile.common b/mail/courier-mta/Makefile.common
index acc3a8dedf3..0ed0675b47d 100644
--- a/mail/courier-mta/Makefile.common
+++ b/mail/courier-mta/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.3 2007/06/07 07:50:57 schmonz Exp $
+# $NetBSD: Makefile.common,v 1.4 2007/07/04 20:54:41 jlam Exp $
#
# Package Makefiles should include this file after setting PKGNAME and
# PKG_SUPPORTED_OPTIONS.
@@ -23,6 +23,9 @@ COURIER_FILE_PERMS= ${COURIER_USER} ${COURIER_GROUP} 0644
COURIER_DIR_PERMS= ${COURIER_USER} ${COURIER_GROUP} 0755
COURIER_SCRIPT_PERMS= ${COURIER_USER} ${COURIER_GROUP} 0755
+PKG_GROUPS_VARS+= COURIER_GROUP
+PKG_USERS_VARS+= COURIER_USER
+
FILES_SUBST+= COURIER_STATEDIR=${COURIER_STATEDIR:Q}
.include "../../security/courier-authlib/Makefile.common"
diff --git a/mail/courier-mta/options.mk b/mail/courier-mta/options.mk
index 116e2f12894..0e271ec1c3a 100644
--- a/mail/courier-mta/options.mk
+++ b/mail/courier-mta/options.mk
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.4 2007/06/19 21:29:10 jlam Exp $
+# $NetBSD: options.mk,v 1.5 2007/07/04 20:54:41 jlam Exp $
# Global and legacy options
@@ -99,6 +99,8 @@ CONF_FILES_PERMS+= ${EGDIR}/module.local \
COURIER_TRANSPORTS+= uucp
PKG_GROUPS+= ${UUCP_GROUP}
PKG_USERS+= ${UUCP_USER}:${UUCP_GROUP}
+PKG_GROUPS_VARS+= UUCP_GROUP
+PKG_USERS_VARS+= UUCP_USER
PLIST_SRC+= ${PKGDIR}/PLIST.uucp
CONF_FILES_PERMS+= ${EGDIR}/module.uucp \
diff --git a/mail/cyrus-imapd/Makefile b/mail/cyrus-imapd/Makefile
index 5a69753de28..ec4fc57657b 100644
--- a/mail/cyrus-imapd/Makefile
+++ b/mail/cyrus-imapd/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.71 2007/06/08 13:11:55 wiz Exp $
+# $NetBSD: Makefile,v 1.72 2007/07/04 20:54:41 jlam Exp $
DISTNAME= cyrus-imapd-2.2.13
PKGREVISION= 4
@@ -23,7 +23,8 @@ BDB_ACCEPTED= db4 db3
CYRUS_USER?= cyrus
CYRUS_GROUP?= mail
-BUILD_DEFS+= CYRUS_USER CYRUS_GROUP
+PKG_GROUPS_VARS+= CYRUS_GROUP
+PKG_USERS_VARS+= CYRUS_USER
FILES_SUBST+= CYRUS_USER=${CYRUS_USER:Q}
FILES_SUBST+= CYRUS_GROUP=${CYRUS_GROUP:Q}
diff --git a/mail/cyrus-imapd21/Makefile b/mail/cyrus-imapd21/Makefile
index 79375eb2fd9..56db2952bfc 100644
--- a/mail/cyrus-imapd21/Makefile
+++ b/mail/cyrus-imapd21/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.42 2006/10/04 21:47:16 wiz Exp $
+# $NetBSD: Makefile,v 1.43 2007/07/04 20:54:41 jlam Exp $
DISTNAME= cyrus-imapd-2.1.18
PKGREVISION= 3
@@ -25,7 +25,8 @@ USE_TOOLS+= autoconf213
CYRUS_USER?= cyrus
CYRUS_GROUP?= mail
-BUILD_DEFS+= CYRUS_USER CYRUS_GROUP
+PKG_GROUPS_VARS+= CYRUS_GROUP
+PKG_USERS_VARS+= CYRUS_USER
FILES_SUBST+= CYRUS_USER=${CYRUS_USER:Q}
FILES_SUBST+= CYRUS_GROUP=${CYRUS_GROUP:Q}
diff --git a/mail/dovecot/Makefile b/mail/dovecot/Makefile
index 5b5509dd907..88646012f2d 100644
--- a/mail/dovecot/Makefile
+++ b/mail/dovecot/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.97 2007/06/16 15:01:17 ghen Exp $
+# $NetBSD: Makefile,v 1.98 2007/07/04 20:54:41 jlam Exp $
DISTNAME= dovecot-1.0.1
CATEGORIES= mail
@@ -28,6 +28,8 @@ DOVECOT_USER?= dovecot
DOVECOT_GROUP?= dovecot
PKG_GROUPS= ${DOVECOT_GROUP}
PKG_USERS= ${DOVECOT_USER}:${DOVECOT_GROUP}
+PKG_GROUPS_VARS+= DOVECOT_GROUP
+PKG_USERS_VARS+= DOVECOT_USER
PKG_GECOS.${DOVECOT_USER}= Dovecot IMAP/POP3 user
diff --git a/mail/dspam/Makefile b/mail/dspam/Makefile
index 2a17faa6ec5..63a544d2a9a 100644
--- a/mail/dspam/Makefile
+++ b/mail/dspam/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.56 2007/05/07 09:29:54 adrianp Exp $
+# $NetBSD: Makefile,v 1.57 2007/07/04 20:54:42 jlam Exp $
DISTNAME= dspam-3.8.0
CATEGORIES= mail
@@ -32,16 +32,14 @@ SUBST_SED.cgi+= -e "s|\"\\/\";|\"${DSPAM_WWWHOME}\";|"
SUBST_SED.cgi+= -e "s|\$$FILE = \"./default.prefs\";|\$$FILE = \"${PKG_SYSCONFDIR}/cgi-default.prefs\";|"
SUBST_MESSAGE.cgi= Fixing paths and default options.
-BUILD_DEFS+= DSPAM_HOME VARBASE APACHE_USER APACHE_GROUP
+BUILD_DEFS+= DSPAM_HOME VARBASE
BUILD_DEFS+= DSPAM_SIGNATURE_LIFE
-BUILD_DEFS+= DSPAM_USER DSPAM_GROUP
BUILD_DEFS+= DSPAM_BINMODE
BUILD_DEFS+= DSPAM_LOGDIR
BUILD_DEFS+= DSPAM_LOGFILE
BUILD_DEFS+= DSPAM_DOMAIN
BUILD_DEFS+= DSPAM_WWWHOME
BUILD_DEFS+= DSPAM_PIDDIR
-BUILD_DEFS+= DSPAM_WWWUSER DSPAM_WWWGROUP
.include "../../mk/bsd.prefs.mk"
@@ -59,6 +57,9 @@ DSPAM_PIDDIR?= ${VARBASE}/run/dspam
DSPAM_WWWUSER?= ${APACHE_USER}
DSPAM_WWWGROUP?= ${APACHE_GROUP}
+PKG_GROUPS_VARS+= DSPAM_GROUP DSPAM_WWWGROUP
+PKG_USERS_VARS+= DSPAM_USER DSPAM_WWWUSER
+
CONFIGURE_ARGS+= --with-signature-life=${DSPAM_SIGNATURE_LIFE:Q}
CONFIGURE_ARGS+= --with-dspam-home=${DSPAM_HOME:Q} \
--with-dspam-home-owner=${DSPAM_USER:Q} \
diff --git a/mail/exim/Makefile b/mail/exim/Makefile
index 7142bcf112a..691cf55bdf0 100644
--- a/mail/exim/Makefile
+++ b/mail/exim/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.84 2007/06/24 10:55:40 abs Exp $
+# $NetBSD: Makefile,v 1.85 2007/07/04 20:54:42 jlam Exp $
DISTNAME= exim-4.67
CATEGORIES= mail net
@@ -22,11 +22,14 @@ MAKE_FLAGS+= FULLECHO=''
.include "../../mk/bsd.prefs.mk"
-BUILD_DEFS+= EXIM_USER EXIM_GROUP EXIM_DB EXIM_MAX_INCLUDE_SIZE
+BUILD_DEFS+= EXIM_DB EXIM_MAX_INCLUDE_SIZE
PKG_GROUPS= ${EXIM_GROUP}
PKG_USERS= ${EXIM_USER}:${EXIM_GROUP}
+PKG_GROUPS_VARS+= EXIM_GROUP
+PKG_USERS_VARS+= EXIM_USER
+
PKG_GECOS.${EXIM_USER}= Exim mail server user
PKG_HOME.${EXIM_USER}= ${VARBASE}/mail
PKG_SHELL.${EXIM_USER}= ${NOLOGIN}
diff --git a/mail/exim3/Makefile b/mail/exim3/Makefile
index f05425048c9..d1819bd3ebd 100644
--- a/mail/exim3/Makefile
+++ b/mail/exim3/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.34 2007/03/24 19:21:26 joerg Exp $
+# $NetBSD: Makefile,v 1.35 2007/07/04 20:54:43 jlam Exp $
DISTNAME= exim-3.36
PKGREVISION= 7
@@ -13,8 +13,6 @@ COMMENT= The Exim mail transfer agent, a replacement for sendmail
CONFLICTS+= exim-exiscan-[0-9]*
-
-BUILD_DEFS+= EXIM_USER EXIM_GROUP
BUILD_DEFS+= EXIM_DB.mysql EXIM_DB.pgsql
PKG_SYSCONFSUBDIR?= exim
@@ -31,6 +29,9 @@ OWN_DIRS_PERMS+= /var/spool/exim ${EXIM_USER} ${EXIM_GROUP} 0750
PKG_GROUPS= ${EXIM_GROUP}
PKG_USERS= ${EXIM_USER}:${EXIM_GROUP}
+PKG_GROUPS_VARS+= EXIM_GROUP
+PKG_USERS_VARS+= EXIM_USER
+
PKG_UID.${EXIM_USER}?= 8
PKG_GECOS.${EXIM_USER}= Exim mail server user
PKG_HOME.${EXIM_USER}= ${VARBASE}/mail
diff --git a/mail/freepops/Makefile b/mail/freepops/Makefile
index 3c59a7510b5..bd55f7a8580 100644
--- a/mail/freepops/Makefile
+++ b/mail/freepops/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2007/06/28 18:50:06 schmonz Exp $
+# $NetBSD: Makefile,v 1.6 2007/07/04 20:54:43 jlam Exp $
#
DISTNAME= freepops-0.2.5
@@ -47,6 +47,8 @@ PKG_USERS= ${FREEPOPSD_USER}:${FREEPOPSD_GROUP}
PKG_GECOS.${FREEPOPSD_USER}= freepopsd POP3 user
FILES_SUBST+= FREEPOPSD_USER=${FREEPOPSD_USER:Q}
FILES_SUBST+= FREEPOPSD_GROUP=${FREEPOPSD_GROUP:Q}
+PKG_GROUPS_VARS+= FREEPOPSD_GROUP
+PKG_USERS_VARS+= FREEPOPSD_USER
.include "../../security/openssl/buildlink3.mk"
.include "../../textproc/expat/buildlink3.mk"
diff --git a/mail/gld/Makefile b/mail/gld/Makefile
index 508c69a3f06..04e14e40030 100644
--- a/mail/gld/Makefile
+++ b/mail/gld/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.22 2007/04/18 17:06:16 ghen Exp $
+# $NetBSD: Makefile,v 1.23 2007/07/04 20:54:43 jlam Exp $
#
DISTNAME= gld-1.7
@@ -24,7 +24,8 @@ GLD_GROUP?= gld
PKG_GROUPS= ${GLD_GROUP}
PKG_USERS= ${GLD_USER}:${GLD_GROUP}
PKG_GECOS.${GLD_USER}= Greylisting Daemon user
-BUILD_DEFS+= GLD_USER GLD_GROUP
+PKG_GROUPS_VARS+= GLD_GROUP
+PKG_USERS_VARS+= GLD_USER
SUBST_CLASSES+= gld users
SUBST_STAGE.gld= post-patch
diff --git a/mail/imp/Makefile b/mail/imp/Makefile
index b1c7f5ccd71..d31454a5772 100644
--- a/mail/imp/Makefile
+++ b/mail/imp/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.41 2007/03/18 12:15:48 adrianp Exp $
+# $NetBSD: Makefile,v 1.42 2007/07/04 20:54:44 jlam Exp $
DISTNAME= imp-h3-${IMPVER}
PKGNAME= imp-${IMPVER}
@@ -24,7 +24,8 @@ HORDEDIR= ${PREFIX}/share/horde
IMPDIR= ${HORDEDIR}/imp
IMPVER= 4.1.4
PAXDIRS= lib locale po scripts templates themes
-BUILD_DEFS+= APACHE_USER
+
+PKG_USERS_VARS+= APACHE_USER
MESSAGE_SUBST+= IMPDIR=${IMPDIR:Q}
MESSAGE_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR:Q}
diff --git a/mail/ingo/Makefile b/mail/ingo/Makefile
index 2b642183b65..ff92fae3f1d 100644
--- a/mail/ingo/Makefile
+++ b/mail/ingo/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2007/03/18 12:09:33 adrianp Exp $
+# $NetBSD: Makefile,v 1.9 2007/07/04 20:54:44 jlam Exp $
DISTNAME= ingo-h3-${INGOVER}
PKGNAME= ingo-${INGOVER}
@@ -33,6 +33,8 @@ SUBST_FILES.files= ingo.conf.dist
SUBST_SED.files= -e "s|@INGODIR@|${INGODIR}|g"
SUBST_MESSAGE.files= Fixing configuration files.
+PKG_USERS_VARS+= APACHE_USER
+
CONF_FILES= ${EGDIR}/ingo.conf ${PKG_SYSCONFDIR}/ingo.conf
CONF_FILES_PERMS+= ${INGODIR}/config/conf.xml.dist \
${INGODIR}/config/conf.xml \
diff --git a/mail/mailman/Makefile b/mail/mailman/Makefile
index af910f41f93..405be6de389 100644
--- a/mail/mailman/Makefile
+++ b/mail/mailman/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.47 2007/03/28 20:55:58 bouyer Exp $
+# $NetBSD: Makefile,v 1.48 2007/07/04 20:54:44 jlam Exp $
DISTNAME= mailman-2.1.9
CATEGORIES= mail www
@@ -35,6 +35,9 @@ MESSAGE_SUBST+= MAILMAN_USER=${MAILMAN_USER}
PLIST_SUBST+= PYVERSSUFFIX=${PYVERSSUFFIX:Q}
PLIST_SUBST+= MAILMAN_CGIEXT=${MAILMAN_CGIEXT:S/none//}
+PKG_GROUPS_VARS+= MAILMAN_GROUP MAILMAN_CGIGROUP MAILMAN_MAILGROUP
+PKG_USERS_VARS+= MAILMAN_USER
+
PKG_GROUPS= ${MAILMAN_GROUP}
PKG_USERS= ${MAILMAN_USER}:${MAILMAN_GROUP}
@@ -85,10 +88,6 @@ CONFIGURE_ARGS+= --with-mailhost=localhost
CONFIGURE_ARGS+= --with-urlhost=localhost
BUILD_DEFS+= MAILMAN_DATADIR
-BUILD_DEFS+= MAILMAN_USER
-BUILD_DEFS+= MAILMAN_GROUP
-BUILD_DEFS+= MAILMAN_CGIGROUP
-BUILD_DEFS+= MAILMAN_MAILGROUP
BUILD_DEFS+= MAILMAN_CGIEXT
SUBST_CLASSES+= paths
diff --git a/mail/majordomo/Makefile b/mail/majordomo/Makefile
index 0039bf86394..fc6b6cdae13 100644
--- a/mail/majordomo/Makefile
+++ b/mail/majordomo/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.28 2007/02/22 19:26:41 wiz Exp $
+# $NetBSD: Makefile,v 1.29 2007/07/04 20:54:44 jlam Exp $
DISTNAME= majordomo-1.94.5
PKGREVISION= 2
@@ -26,6 +26,9 @@ MAJORDOMO_HOMEDIR?= /home
MAJORDOMO_USER?= majordom
MAJORDOMO_GROUP?= majordom
+PKG_GROUPS_VARS+= MAJORDOMO_GROUP
+PKG_USERS_VARS+= MAJORDOMO_USER
+
MESSAGE_SUBST+= HOME=${MAJORDOMO_HOMEDIR} \
MAJORDOMO_USER=${MAJORDOMO_USER} \
MAJORDOMO_GROUP=${MAJORDOMO_GROUP}
@@ -41,7 +44,7 @@ EXDIRS= archives archives/example-l digests \
EXFILES= example-l.passwd example-l.info
EXLISTS= example-l example-l-digest
-BUILD_DEFS+= MAJORDOMO_USER MAJORDOMO_GROUP MAJORDOMO_TMPDIR
+BUILD_DEFS+= MAJORDOMO_TMPDIR
USERGROUP_PHASE= configure
PKG_GROUPS= ${MAJORDOMO_GROUP}
diff --git a/mail/mimedefang/Makefile b/mail/mimedefang/Makefile
index b4af5f3f627..3f39a22c71c 100644
--- a/mail/mimedefang/Makefile
+++ b/mail/mimedefang/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.36 2007/03/14 11:21:33 markd Exp $
+# $NetBSD: Makefile,v 1.37 2007/07/04 20:54:45 jlam Exp $
DISTNAME= mimedefang-2.61
CATEGORIES= mail
@@ -30,8 +30,10 @@ DEFANG_GROUP?= defang
PKG_GROUPS= ${DEFANG_GROUP}
PKG_USERS= ${DEFANG_USER}:${DEFANG_GROUP}
-BUILD_DEFS+= PKG_SYSCONFSUBDIR DEFANG_SPOOLDIR
-BUILD_DEFS+= DEFANG_USER DEFANG_GROUP VARBASE
+PKG_GROUPS_VARS+= DEFANG_GROUP
+PKG_USERS_VARS+= DEFANG_USER
+
+BUILD_DEFS+= PKG_SYSCONFSUBDIR DEFANG_SPOOLDIR VARBASE
EGDIR= ${PREFIX}/share/examples/mimedefang
SHAREDIR= ${PREFIX}/share/mimedefang
diff --git a/mail/nullmailer/Makefile b/mail/nullmailer/Makefile
index e46785148ba..f95b53273bd 100644
--- a/mail/nullmailer/Makefile
+++ b/mail/nullmailer/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.27 2007/03/24 06:49:02 schmonz Exp $
+# $NetBSD: Makefile,v 1.28 2007/07/04 20:54:45 jlam Exp $
DISTNAME= nullmailer-1.03
CATEGORIES= mail
@@ -23,6 +23,8 @@ NULLMAILER_GROUP?= nullmail
NULLMAILER_USER?= nullmail
PKG_GROUPS= ${NULLMAILER_GROUP}
PKG_USERS= ${NULLMAILER_USER}:${NULLMAILER_GROUP}
+PKG_GROUPS_VARS+= NULLMAILER_GROUP
+PKG_USERS_VARS+= NULLMAILER_USER
MAKE_ENV+= NULLMAILER_GROUP=${NULLMAILER_GROUP:Q}
MAKE_ENV+= NULLMAILER_USER=${NULLMAILER_USER:Q}
diff --git a/mail/popa3d/Makefile b/mail/popa3d/Makefile
index f0686ca8908..e6919b1858e 100644
--- a/mail/popa3d/Makefile
+++ b/mail/popa3d/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.47 2007/01/07 09:13:59 rillig Exp $
+# $NetBSD: Makefile,v 1.48 2007/07/04 20:54:45 jlam Exp $
#
DISTNAME= popa3d-1.0.2
@@ -18,6 +18,9 @@ POPA3D_GROUP?= popa3d
PKG_GROUPS= ${POPA3D_GROUP}
PKG_USERS= ${POPA3D_USER}:${POPA3D_GROUP}
+PKG_GROUPS_VARS+= POPA3D_GROUP
+PKG_USERS_VARS+= POPA3D_USER
+
RCD_SCRIPTS= popa3d
FILES_SUBST+= POPA3D_USER=${POPA3D_USER:Q}
diff --git a/mail/postgrey/Makefile b/mail/postgrey/Makefile
index 56453c53217..c76cdf88fe3 100644
--- a/mail/postgrey/Makefile
+++ b/mail/postgrey/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2007/06/08 12:25:04 wiz Exp $
+# $NetBSD: Makefile,v 1.20 2007/07/04 20:54:45 jlam Exp $
#
DISTNAME= postgrey-1.27
@@ -32,10 +32,12 @@ EGDIR= share/examples/${PKGBASE}
RCD_SCRIPTS= postgrey
PKG_GROUPS= ${POSTGREY_GROUP}
PKG_USERS= ${POSTGREY_USER}:${POSTGREY_GROUP}
+PKG_GROUPS_VARS+= POSTGREY_GROUP
+PKG_USERS_VARS+= POSTGREY_USER
PKG_GECOS.${POSTGREY_USER}= Postgrey Daemon User
-BUILD_DEFS+= POSTGREY_USER POSTGREY_GROUP POSTGREY_DBDIR VARBASE
+BUILD_DEFS+= POSTGREY_DBDIR VARBASE
.for i in postgrey_whitelist_clients postgrey_whitelist_recipients
CONF_FILES+= ${PREFIX}/${EGDIR}/${i} \
diff --git a/mail/prayer/Makefile b/mail/prayer/Makefile
index 648f91fead9..74da93512dc 100644
--- a/mail/prayer/Makefile
+++ b/mail/prayer/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.31 2007/06/15 23:28:16 wiz Exp $
+# $NetBSD: Makefile,v 1.32 2007/07/04 20:54:46 jlam Exp $
#
DISTNAME= prayer-1.0.18
@@ -15,7 +15,9 @@ PRAYER_GROUP= prayer
PKG_GROUPS= ${PRAYER_GROUP}
PKG_USERS= ${PRAYER_USER}:${PRAYER_GROUP}
-BUILD_DEFS+= PRAYER_USER PRAYER_GROUP VARBASE
+PKG_GROUPS_VARS+= PRAYER_GROUP
+PKG_USERS_VARS+= PRAYER_USER
+BUILD_DEFS+= VARBASE
MAKE_ENV+= EGDIR=${EGDIR:Q}
MAKE_ENV+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR:Q}
diff --git a/mail/qpopper/Makefile b/mail/qpopper/Makefile
index 52750e96e92..78f9df9bcff 100644
--- a/mail/qpopper/Makefile
+++ b/mail/qpopper/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.58 2007/03/24 19:21:27 joerg Exp $
+# $NetBSD: Makefile,v 1.59 2007/07/04 20:54:46 jlam Exp $
#
DISTNAME= qpopper${VERSION}
@@ -26,8 +26,9 @@ QPOPPER_USER?= pop
QPOPPER_GROUP?= mail
QPOPPER_APOP_AUTH?= ${PKG_SYSCONFDIR}/apop.auth
-BUILD_DEFS+= QPOPPER_USER QPOPPER_GROUP
BUILD_DEFS+= QPOPPER_APOP_AUTH
+PKG_GROUPS_VARS+= QPOPPER_GROUP
+PKG_USERS_VARS+= QPOPPER_USER
.if defined(QPOPPER_SPOOL_DIR)
CONFIGURE_ARGS+= --enable-spool-dir=${QPOPPER_SPOOL_DIR:Q}
diff --git a/mail/roundcube/Makefile b/mail/roundcube/Makefile
index e69b3ef61fa..58062ad1adc 100644
--- a/mail/roundcube/Makefile
+++ b/mail/roundcube/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2007/06/05 20:25:26 adrianp Exp $
+# $NetBSD: Makefile,v 1.5 2007/07/04 20:54:47 jlam Exp $
#
DISTNAME= roundcube-0.1-20070528
@@ -19,7 +19,10 @@ WRKSRC= ${WRKDIR}/roundcubemail
PKG_SYSCONFSUBDIR?= httpd
-BUILD_DEFS+= APACHE_USER APACHE_GROUP VARBASE
+PKG_GROUPS_VARS+= APACHE_GROUP
+PKG_USERS_VARS+= APACHE_USER
+BUILD_DEFS+= VARBASE
+
RCDIR= ${PREFIX}/share/roundcube
EGDIR= ${PREFIX}/share/examples/roundcube
DOCDIR= ${PREFIX}/share/doc/roundcube
diff --git a/mail/squirrelmail/Makefile b/mail/squirrelmail/Makefile
index 3f235d423c2..54f702aa31f 100644
--- a/mail/squirrelmail/Makefile
+++ b/mail/squirrelmail/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.88 2007/05/22 11:13:27 taca Exp $
+# $NetBSD: Makefile,v 1.89 2007/07/04 20:54:47 jlam Exp $
DISTNAME= squirrelmail-1.4.10a
PKGREVISION= 2
@@ -21,7 +21,10 @@ USE_LANGUAGES= # empty
NO_BUILD= yes
USE_TOOLS+= perl:run
REPLACE_PERL+= config/conf.pl
-BUILD_DEFS+= APACHE_GROUP APACHE_USER VARBASE
+
+PKG_GROUPS_VARS+= APACHE_GROUP
+PKG_USERS_VARS+= APACHE_USER
+BUILD_DEFS+= VARBASE
.include "options.mk"
diff --git a/mail/sympa/Makefile b/mail/sympa/Makefile
index 61b1374a19f..41f5548d5cf 100644
--- a/mail/sympa/Makefile
+++ b/mail/sympa/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.28 2007/06/15 18:15:19 jlam Exp $
+# $NetBSD: Makefile,v 1.29 2007/07/04 20:54:47 jlam Exp $
#
DISTNAME= sympa-5.2.4
@@ -83,8 +83,6 @@ SYMPA_USER?= sympa
SYMPA_GROUP?= sympa
SYMPA_VARBASE?= ${HOMEBASE}/sympa
-BUILD_DEFS+= SYMPA_USER SYMPA_GROUP SYMPA_VARBASE
-
SYMPA_PREFIX= ${PREFIX}/sympa
SYMPA_SPOOL= ${SYMPA_VARBASE}/spool
SYMPA_BIN= ${SYMPA_PREFIX}/bin
@@ -94,6 +92,10 @@ PKG_USERS= ${SYMPA_USER}:${SYMPA_GROUP}
PKG_HOME.${SYMPA_USER}= ${SYMPA_VARBASE}
+PKG_GROUPS_VARS+= SYMPA_GROUP
+PKG_USERS_VARS+= SYMPA_USER
+BUILD_DEFS+= SYMPA_VARBASE
+
.for d in sympa sympa/create_list_templates sympa/general_task_models \
sympa/scenari sympa/task_models sympa/templates sympa/wws_templates
OWN_DIRS_PERMS+= ${PKG_SYSCONFDIR}/${d} ${SYMPA_USER} ${SYMPA_GROUP} 755
diff --git a/mail/turba/Makefile b/mail/turba/Makefile
index 79ef7715dbc..c85f07efac6 100644
--- a/mail/turba/Makefile
+++ b/mail/turba/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.20 2007/03/18 12:14:05 adrianp Exp $
+# $NetBSD: Makefile,v 1.21 2007/07/04 20:54:47 jlam Exp $
DISTNAME= turba-h3-${TURBAVER}
PKGNAME= turba-${TURBAVER}
@@ -28,6 +28,8 @@ REPLACE_PERL+= ${WRKSRC}/scripts/ldap/addou.pl
PKG_SYSCONFSUBDIR?= httpd
+PKG_USERS_VARS+= APACHE_USER
+
SUBST_CLASSES+= files
SUBST_STAGE.files= post-build
SUBST_FILES.files= turba.conf.dist