From: Daniel Kahn Gillmor Date: Mon, 27 Oct 2008 01:19:34 +0000 (-0400) Subject: tracking freebsd packaging from anarcat. X-Git-Tag: monkeysphere_0.17-1~6^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b1244f1dc98230fc04bde76a89e88d7fa0d08053;p=monkeysphere.git tracking freebsd packaging from anarcat. --- 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 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'."