aboutsummaryrefslogtreecommitdiffstats
path: root/net/dgd
diff options
context:
space:
mode:
authorglewis <glewis@FreeBSD.org>2011-08-15 02:04:55 +0800
committerglewis <glewis@FreeBSD.org>2011-08-15 02:04:55 +0800
commit2b038ccad42888d3f8d1e332554d69689b73f889 (patch)
tree6d0520c1a294b2db6161d9c8ed0239eb2ce895a3 /net/dgd
parentf4936d4a687bb3c7ccc9a9d91ca630802e79134c (diff)
downloadfreebsd-ports-gnome-2b038ccad42888d3f8d1e332554d69689b73f889.tar.gz
freebsd-ports-gnome-2b038ccad42888d3f8d1e332554d69689b73f889.tar.zst
freebsd-ports-gnome-2b038ccad42888d3f8d1e332554d69689b73f889.zip
. Rely on standard mechanisms of creating/deleting groups and users for the
port rather than the port having it's own way of doing this (which admittedly pre-dated the standard mechanisms and was "standard" at the time).
Diffstat (limited to 'net/dgd')
-rw-r--r--net/dgd/Makefile8
-rw-r--r--net/dgd/pkg-deinstall15
-rw-r--r--net/dgd/pkg-install37
3 files changed, 3 insertions, 57 deletions
diff --git a/net/dgd/Makefile b/net/dgd/Makefile
index 750915d1ef5e..b76e4245d4b6 100644
--- a/net/dgd/Makefile
+++ b/net/dgd/Makefile
@@ -32,6 +32,9 @@ MAKE_ENV+= EXTRA_DEFINES="$(EXTRA_DEFINES)"
PORTDOCS= *
.endif
+USERS= mud
+GROUPS= mud
+
.include <bsd.port.pre.mk>
EXTRA_DEFINES=
@@ -76,9 +79,4 @@ do-install:
cd ${WRKDIR}/dgd/doc && ${COPYTREE_SHARE} . ${DOCSDIR}
.endif
-post-install:
- @# Run package installation script
- @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/pkg-install ${PKGNAME} \
- POST-INSTALL
-
.include <bsd.port.post.mk>
diff --git a/net/dgd/pkg-deinstall b/net/dgd/pkg-deinstall
deleted file mode 100644
index db9dbdbdfe72..000000000000
--- a/net/dgd/pkg-deinstall
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-# $FreeBSD$
-#
-
-if [ "$2" != "POST-DEINSTALL" ]; then
- exit 0
-fi
-
-USER=mud
-
-if pw usershow "${USER}" 2>/dev/null 1>&2; then
- echo "To delete MUD user permanently, use 'pw userdel \"${USER}\"'"
-fi
-
-exit 0
diff --git a/net/dgd/pkg-install b/net/dgd/pkg-install
deleted file mode 100644
index 575cbe714897..000000000000
--- a/net/dgd/pkg-install
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/sh
-# $FreeBSD$
-
-if [ "$2" = "PRE-INSTALL" ]; then
- exit 0
-fi
-
-PATH=/bin:/sbin:/usr/bin:/usr/sbin
-
-USER=mud
-GROUP=${USER}
-UID=97
-GID=${UID}
-
-if pw groupshow "${GROUP}" 2>/dev/null; then
- echo "Using existing group \"${GROUP}\"."
-else
- if pw groupadd "${GROUP}" -g ${GID}; then
- echo "Added group \"${GROUP}\"."
- else
- echo "Adding group \"${GROUP}\" failed..."
- exit 1
- fi
-fi
-
-if pw usershow "${USER}" 2>/dev/null; then
- echo "Using existing user \"${USER}\"."
-else
- if pw useradd "${USER}" -u ${UID} -g "${GROUP}" -h - \
- -s "/bin/sh" -d "/nonexistent" -c "MUD Owner"
- then
- echo "Added user \"${USER}\"."
- else
- echo "Adding user \"${USER}\" failed..."
- exit 1
- fi
-fi