aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/flowd
diff options
context:
space:
mode:
authorWesley Shields <wxs@FreeBSD.org>2009-10-15 21:26:58 +0000
committerWesley Shields <wxs@FreeBSD.org>2009-10-15 21:26:58 +0000
commit6f0142ba6acfe0c625f3eb19b42fbfb958431a0e (patch)
treed193c5baa04648527f4ee92f4e5d775d6d5c6abe /net-mgmt/flowd
parentabd3dc246ad8e4bde7c1bd2ad21ca55dad5db18a (diff)
downloadports-6f0142ba6acfe0c625f3eb19b42fbfb958431a0e.tar.gz
ports-6f0142ba6acfe0c625f3eb19b42fbfb958431a0e.zip
Notes
Diffstat (limited to 'net-mgmt/flowd')
-rw-r--r--net-mgmt/flowd/Makefile17
-rw-r--r--net-mgmt/flowd/pkg-install10
2 files changed, 18 insertions, 9 deletions
diff --git a/net-mgmt/flowd/Makefile b/net-mgmt/flowd/Makefile
index 08e83ea0d92a..ba77b4eb8af0 100644
--- a/net-mgmt/flowd/Makefile
+++ b/net-mgmt/flowd/Makefile
@@ -22,13 +22,15 @@ MAN8= flowd.8 flowd-reader.8
MAN5= flowd.conf.5
PORTDOCS= README INSTALL
FLOWD_USER?= _flowd
+SCRIPTS_ENV+= FLOWD_USER="${FLOWD_USER}"
+.if defined(FLOWD_UID)
+SCRIPTS_ENV+= FLOWD_UID="${FLOWD_UID}"
+.endif
.if defined(WITH_PERL)
USE_PERL5= yes
PLIST_SUB+= WITH_PERL=""
-#MAN3PREFIX= ${PREFIX}/lib/perl5/${PERL_VERSION}
-#MAN3= Flowd.3
-BROKEN= Incomplete pkg-plist
+MAN3= Flowd.3
.else
PLIST_SUB+= WITH_PERL="@comment "
.endif
@@ -36,7 +38,7 @@ PLIST_SUB+= WITH_PERL="@comment "
.if defined(WITH_PYTHON)
USE_PYTHON= yes
PLIST_SUB+= WITH_PYTHON=""
-BROKEN= Incomplete pkg-plist
+INSTALLS_EGGINFO= yes
.else
PLIST_SUB+= WITH_PYTHON="@comment "
.endif
@@ -67,9 +69,10 @@ post-install:
.if defined(WITH_PERL)
cd ${WRKSRC}/Flowd-perl && \
- ${PERL} Makefile.PL && \
+ ${PERL} Makefile.PL INSTALLSITEMAN3DIR=${MAN3PREFIX}/man/man3 && \
${GMAKE} && \
- ${GMAKE} install
+ ${GMAKE} install;
+ -@${RM} -f ${SITE_PERL}/${PERL_ARCH}/perllocal.pod
.endif
.if defined(WITH_PYTHON)
@@ -78,6 +81,6 @@ post-install:
${PYTHON_CMD} setup.py install
.endif
- FLOWD_USER=${FLOWD_USER} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+ @${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.include <bsd.port.mk>
diff --git a/net-mgmt/flowd/pkg-install b/net-mgmt/flowd/pkg-install
index 6fa963d14634..729842125713 100644
--- a/net-mgmt/flowd/pkg-install
+++ b/net-mgmt/flowd/pkg-install
@@ -20,9 +20,15 @@ create_user() {
shell=/nonexistent
fi
uhome="/var/empty"
+ if [ -z "${FLOWD_UID}" ]; then
+ uid=`${PW} usernext`;
+ uid=${uid%%:*}
+ else
+ uid=${FLOWD_UID}
+ fi
if ! ${PW} show user ${USER} -q >/dev/null; then
- if ! ${PW} add user ${USER} -g ${GROUP} -d "${uhome}" \
+ if ! ${PW} add user ${USER} -u ${uid} -g ${GROUP} -d "${uhome}" \
-c "flowd privilege separation user" -s "${shell}" -p "*" \
; then
e=$?
@@ -31,7 +37,7 @@ create_user() {
fi
echo "*** Added user \`${USER}' (id ${uid})"
else
- echo "*** You already have user \`${USER}'."
+ echo "*** You already have user \`${USER} (id `id -u ${USER}`)'."
fi
}