summaryrefslogtreecommitdiff
path: root/packaging/freebsd
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2008-10-26 21:19:34 -0400
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>2008-10-26 21:19:34 -0400
commitb1244f1dc98230fc04bde76a89e88d7fa0d08053 (patch)
tree7d891cfff04797f3bc4b6a32d9971eb172db32bf /packaging/freebsd
parent12dfa2eccb5489021507bf40447c4495decd9fd0 (diff)
tracking freebsd packaging from anarcat.
Diffstat (limited to 'packaging/freebsd')
-rw-r--r--packaging/freebsd/Makefile9
-rw-r--r--packaging/freebsd/TODO21
-rwxr-xr-xpackaging/freebsd/pkg-install5
3 files changed, 9 insertions, 26 deletions
diff --git a/packaging/freebsd/Makefile b/packaging/freebsd/Makefile
index 7a24dc5..78ad0d3 100644
--- a/packaging/freebsd/Makefile
+++ b/packaging/freebsd/Makefile
@@ -12,9 +12,6 @@ MASTER_SITES= http://archive.monkeysphere.info/debian/pool/monkeysphere/m/monke
# 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
@@ -43,5 +40,11 @@ post-install:
@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>
diff --git a/packaging/freebsd/TODO b/packaging/freebsd/TODO
deleted file mode 100644
index f482457..0000000
--- a/packaging/freebsd/TODO
+++ /dev/null
@@ -1,21 +0,0 @@
-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.
diff --git a/packaging/freebsd/pkg-install b/packaging/freebsd/pkg-install
index 940b796..5e520cd 100755
--- a/packaging/freebsd/pkg-install
+++ b/packaging/freebsd/pkg-install
@@ -24,7 +24,7 @@ POST-INSTALL)
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
@@ -35,7 +35,8 @@ POST-INSTALL)
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'."