aboutsummaryrefslogtreecommitdiff
path: root/net/spread4
diff options
context:
space:
mode:
authorOlli Hauer <ohauer@FreeBSD.org>2012-07-20 20:32:20 +0000
committerOlli Hauer <ohauer@FreeBSD.org>2012-07-20 20:32:20 +0000
commit8983a88800ffde4ec1dfa38e8bf845f3395e1f6c (patch)
tree63b7966915f99a902308719b47aecdd07dca2742 /net/spread4
parent79769610e4f258be980dbe6765c361d072a6615b (diff)
downloadports-8983a88800ffde4ec1dfa38e8bf845f3395e1f6c.tar.gz
ports-8983a88800ffde4ec1dfa38e8bf845f3395e1f6c.zip
- use reserverd UID/GID
- use ports-framework to create user/group - remove pkg-(de)install - rename patchfiles - rename rc file ( s/.in// ) - bump PORTREVISION with hat apache@ PR: 169953 Submitted by: Marcello Coutinho <marcellocoutinho@gmail.com>
Notes
Notes: svn path=/head/; revision=301241
Diffstat (limited to 'net/spread4')
-rw-r--r--net/spread4/Makefile15
-rw-r--r--net/spread4/files/patch-docs__sample.spread.conf (renamed from net/spread4/files/patch-docs-sample.spread.conf)0
-rw-r--r--net/spread4/files/patch-docs__spmonitor.1 (renamed from net/spread4/files/patch-docs::spmonitor.1)0
-rw-r--r--net/spread4/files/patch-docs__spread.1 (renamed from net/spread4/files/patch-docs::spread.1)0
-rw-r--r--net/spread4/files/spread.in (renamed from net/spread4/files/spread.sh.in)0
-rw-r--r--net/spread4/pkg-deinstall29
-rw-r--r--net/spread4/pkg-install51
-rw-r--r--net/spread4/pkg-plist2
8 files changed, 11 insertions, 86 deletions
diff --git a/net/spread4/Makefile b/net/spread4/Makefile
index d85059635854..cc696e14c17e 100644
--- a/net/spread4/Makefile
+++ b/net/spread4/Makefile
@@ -7,6 +7,7 @@
PORTNAME= spread4
PORTVERSION= 4.1.0
+PORTREVISION= 1
CATEGORIES= net perl5
MASTER_SITES= LOCAL/wen
DISTNAME= spread-src-${PORTVERSION}
@@ -16,10 +17,16 @@ COMMENT= The Spread Group Communication System, a network toolkit
GNU_CONFIGURE= yes
USE_GMAKE= yes
-USE_RC_SUBR= spread.sh
+USE_RC_SUBR= spread
USE_LDCONFIG= yes
ALL_TARGET= all
+USERS= spread
+GROUPS= spread
+RUNDIR= /var/run/spread
+
+PLIST_SUB+= USERS=${USERS} GROUPS=${GROUPS} RUNDIR=${RUNDIR}
+
WRKSRC= ${WRKDIR}/spread-src-${PORTVERSION}
PKGMESSAGE= ${WRKSRC}/license.txt
@@ -43,9 +50,6 @@ post-extract:
@${REINPLACE_CMD} -e 's|INSTALLSUBDIRS=daemon docs|INSTALLSUBDIRS=daemon|' \
${WRKSRC}/Makefile.in
-pre-install:
- ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
-
post-install:
${INSTALL_DATA} ${WRKSRC}/docs/sample.spread.conf \
${PREFIX}/etc/spread.conf.sample
@@ -76,8 +80,7 @@ post-install:
.for f in ${MAN3}
${INSTALL_MAN} ${WRKSRC}/docs/${f} ${LOCALBASE}/man/man3/
.endfor
-
+ @${INSTALL} -m 750 -o ${USERS} -g ${GROUPS} -d ${RUNDIR}
@${CAT} ${PKGMESSAGE}
- ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.include <bsd.port.post.mk>
diff --git a/net/spread4/files/patch-docs-sample.spread.conf b/net/spread4/files/patch-docs__sample.spread.conf
index 523958f95941..523958f95941 100644
--- a/net/spread4/files/patch-docs-sample.spread.conf
+++ b/net/spread4/files/patch-docs__sample.spread.conf
diff --git a/net/spread4/files/patch-docs::spmonitor.1 b/net/spread4/files/patch-docs__spmonitor.1
index 982d5bb32913..982d5bb32913 100644
--- a/net/spread4/files/patch-docs::spmonitor.1
+++ b/net/spread4/files/patch-docs__spmonitor.1
diff --git a/net/spread4/files/patch-docs::spread.1 b/net/spread4/files/patch-docs__spread.1
index 6dca20e2b73d..6dca20e2b73d 100644
--- a/net/spread4/files/patch-docs::spread.1
+++ b/net/spread4/files/patch-docs__spread.1
diff --git a/net/spread4/files/spread.sh.in b/net/spread4/files/spread.in
index 6e5b76fc4fac..6e5b76fc4fac 100644
--- a/net/spread4/files/spread.sh.in
+++ b/net/spread4/files/spread.in
diff --git a/net/spread4/pkg-deinstall b/net/spread4/pkg-deinstall
deleted file mode 100644
index 1bc2206605ca..000000000000
--- a/net/spread4/pkg-deinstall
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD$
-
-if [ "$2" != "POST-DEINSTALL" ]; then
- exit 0
-fi
-
-USER=spread
-GROUP=spread
-
-echo "===> deinstall note:"
-echo " Please note that user ${USER} and group ${GROUP} was not removed"
-echo " from this system:"
-echo ""
-
-if pw usershow "${USER}" 2>/dev/null 1>&2; then
- echo " To delete spread user permanently"
- echo " $ pw userdel ${USER}"
- echo ""
-fi
-
-if pw groupshow "${GROUP}" 2>/dev/null 1>&2; then
- echo " To delete spread group permanently"
- echo " $ pw groupdel ${GROUP}"
- echo ""
-fi
-
-exit 0
diff --git a/net/spread4/pkg-install b/net/spread4/pkg-install
deleted file mode 100644
index fbbf68fd7932..000000000000
--- a/net/spread4/pkg-install
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/bin/sh
-
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
-USER=spread
-USER_HOMEDIR=/nonexistent
-GROUP=spread
-RUNDIR=/var/run/spread
-NOLOGIN=/sbin/nologin
-
-case $2 in
-PRE-INSTALL)
- if pw group show "${GROUP}" 2>/dev/null; then
- echo "You already have a group \"${GROUP}\", so I will use it."
- else
- if pw groupadd ${GROUP}; then
- echo "Added group \"${GROUP}\"."
- else
- echo "Adding group \"${GROUP}\" failed..."
- exit 1
- fi
- fi
-
- if pw user show "${USER}" 2>/dev/null; then
- echo "You already have a user \"${USER}\", so I will use it."
- if pw usermod ${USER} -d ${USER_HOMEDIR}
- then
- echo "Changed home directory of \"${USER}\" to \"${USER_HOMEDIR}\"."
- else
- echo "Changing home directory of \"${USER}\" to \"${USER_HOMEDIR}\" failed."
- exit 1
- fi
- else
- if pw useradd ${USER} -g ${GROUP} -h - \
- -d ${USER_HOMEDIR} -s ${NOLOGIN} -c "Spread User"
- then
- echo "Added user \"${USER}\"."
- else
- echo "Adding user \"${USER}\" failed..."
- exit 1
- fi
- fi
- ;;
-POST-INSTALL)
- if [ ! -d ${RUNDIR} ]; then
- install -d -o ${USER} -g ${GROUP} -m 0750 ${RUNDIR}
- fi
- ;;
-*)
- echo 'unexpect argument to pkg-install'
- ;;
-esac
diff --git a/net/spread4/pkg-plist b/net/spread4/pkg-plist
index fb102fcf6f78..2324bb6df796 100644
--- a/net/spread4/pkg-plist
+++ b/net/spread4/pkg-plist
@@ -33,3 +33,5 @@ sbin/spread
%%PORTDOCS%%%%DOCSDIR%%/TODO
%%PORTDOCS%%%%DOCSDIR%%/PORTING
%%PORTDOCS%%@dirrm %%DOCSDIR%%
+@exec install -m 750 -o %%USERS%% -g %%GROUPS%% -d %%RUNDIR%%
+@dirrmtry %%RUNDIR%%