# hack for debian orig tarballs
DISTFILES= ${PORTNAME}_${DISTVERSION}.orig.tar.gz
-# comment this out to test the port
-IGNORE= this port is not finished yet
-
MAINTAINER= dkg@fifthhorseman.net
COMMENT= use the OpenPGP web of trust to verify ssh connections
@if [ ! -f ${PREFIX}/etc/monkeysphere/monkeysphere-server.conf ]; then \
${CP} -p ${PREFIX}/etc/monkeysphere/monkeysphere-server.conf.sample ${PREFIX}/etc/monkeysphere/monkeysphere-server.conf ; \
fi
+.if !defined(PACKAGE_BUILDING)
+ @${SETENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+.endif
+
+post-deinstall:
+ @${SETENV} ${SH} ${PKGDEINSTALL} ${PKGNAME} POST-DEINSTALL
.include <bsd.port.mk>
+++ /dev/null
-This port is not ready yet.
-
-We also need to create the monkeysphere user in the pkg-install and
-remove it in pkg-deinstall. To do this, this page has useful tips:
-
-http://www.freebsd.org/doc/en/books/porters-handbook/dads-uid-and-gids.html
-
-and we'll have to copy scripts from existing ports that are suggested
-above, see:
-
-http://www.freebsd.org/cgi/cvsweb.cgi/ports/japanese/Wnn6/pkg-install
-http://www.freebsd.org/cgi/cvsweb.cgi/ports/net/cvsup-mirror/pkg-install
-
-or just look around the ports tree for pkg-install files, they are
-usually for adding users.
-
-Finally the pkg-plist needs to be checked. The package hasn't been
-installed at all once yet, it only patches and builds.
-
-The port is therefore marked as IGNORE, which makes it unusable, comment
-out the IGNORE line in the Makefile to test.
GID=${UID}
SHELL=/usr/local/bin/bash
- if pw group show "${GROUP}" 2>/dev/null; then
+ if pw group show "${GROUP}" >/dev/null 2>&1; then
echo "You already have a group \"${GROUP}\", so I will use it."
else
if pw groupadd ${GROUP} -g ${GID}; then
fi
fi
- if oldshell=`pw user show "${USER}" 2>/dev/null`; then
+ if pw user show "${USER}" >/dev/null 2>&1; then
+ oldshell=`pw user show "${USER}" 2>/dev/null | cut -f10 -d:`
if [ x"$oldshell" != x"$SHELL" ]; then
echo "You already have a \"${USER}\" user, but its shell is '$oldshell'."
echo "This package requires that \"${USER}\"'s shell be '$SHELL'."