aboutsummaryrefslogtreecommitdiffstats
path: root/mail/postgrey
diff options
context:
space:
mode:
authorcrees <crees@FreeBSD.org>2011-10-20 01:51:15 +0800
committercrees <crees@FreeBSD.org>2011-10-20 01:51:15 +0800
commite685f9f8b9877199aad010eee91da8a33d0bdee8 (patch)
tree44320daac53f4c71d5bc00c1516a2c91f05463d0 /mail/postgrey
parent62e2a0ad5f64c3a702fcd84828432641d7a57789 (diff)
downloadfreebsd-ports-gnome-e685f9f8b9877199aad010eee91da8a33d0bdee8.tar.gz
freebsd-ports-gnome-e685f9f8b9877199aad010eee91da8a33d0bdee8.tar.zst
freebsd-ports-gnome-e685f9f8b9877199aad010eee91da8a33d0bdee8.zip
Use USERS and GROUPS
PR: ports/161311 Submitted by: me Approved by: maintainer timeout (14 days)
Diffstat (limited to 'mail/postgrey')
-rw-r--r--mail/postgrey/Makefile7
-rw-r--r--mail/postgrey/files/pkg-install.in19
2 files changed, 5 insertions, 21 deletions
diff --git a/mail/postgrey/Makefile b/mail/postgrey/Makefile
index f6a7cf8c1714..ad2488c804be 100644
--- a/mail/postgrey/Makefile
+++ b/mail/postgrey/Makefile
@@ -35,6 +35,9 @@ PGY_USERID?= 225
PGY_GROUPNAME?= ${PGY_USERNAME}
PGY_GROUPID?= ${PGY_USERID}
PGY_DIR?= /var/db/postgrey
+
+USERS= ${PGY_USERNAME}
+GROUPS= ${PGY_GROUPNAME}
MAN1= ${PORTNAME}.1 policy-test.1 postgreyreport.1
post-patch:
@@ -42,10 +45,8 @@ post-patch:
@${REINPLACE_CMD} -e 's#/etc/postfix#${PREFIX}&#' ${WRKSRC}/postgrey ${WRKSRC}/postgrey_whitelist_*
@${REINPLACE_CMD} -e 's#/var/spool/postfix/postgrey#${PGY_DIR}#' ${WRKSRC}/postgrey ${WRKSRC}/contrib/postgreyreport
-pre-su-install:
- @${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
-
do-install:
+ @${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
@${POD2MAN} ${WRKSRC}/${PORTNAME} ${WRKSRC}/${PORTNAME}.1
@${POD2MAN} ${WRKSRC}/policy-test ${WRKSRC}/policy-test.1
@${POD2MAN} ${WRKSRC}/contrib/postgreyreport ${WRKSRC}/postgreyreport.1
diff --git a/mail/postgrey/files/pkg-install.in b/mail/postgrey/files/pkg-install.in
index f13c20d305a1..fd0d1ea409e7 100644
--- a/mail/postgrey/files/pkg-install.in
+++ b/mail/postgrey/files/pkg-install.in
@@ -1,6 +1,6 @@
#! /bin/sh
#
-# $FreeBSD: /tmp/pcvs/ports/mail/postgrey/files/pkg-install.in,v 1.1 2007-06-27 21:13:24 beech Exp $
+# $FreeBSD: /tmp/pcvs/ports/mail/postgrey/files/pkg-install.in,v 1.2 2011-10-19 17:51:15 crees Exp $
PATH=/bin:/usr/bin:/usr/sbin
@@ -16,23 +16,6 @@ PRE-INSTALL)
exit 1
fi
- # Create group if required
- if pw group show "%%GROUP%%" >/dev/null 2>&1; then
- echo "---> Using existing group \"%%GROUP%%\""
- else
- echo "---> Adding group \"%%GROUP%%\" (%%GID%%)"
- /usr/sbin/pw groupadd %%GROUP%% -g %%GID%% || exit 1
- fi
-
- # Create user if required
- if pw user show "%%USER%%" >/dev/null 2>&1; then
- echo "---> Using existing user \"%%USER%%\""
- else
- echo "---> Adding user \"%%USER%%\" (%%UID%%)"
- pw useradd "%%USER%%" -u "%%UID%%" -g "%%GROUP%%" -h - \
- -d "%%POSTGREYDIR%%" -s "/sbin/nologin" -c "Postgrey Owner" || exit 1
- fi
-
# Create home directory if required
if [ -d "%%POSTGREYDIR%%" ]; then
echo "---> Using existing Postgrey database directory (%%POSTGREYDIR%%)"