aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt/cricket
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2011-06-08 22:49:27 +0800
committerbapt <bapt@FreeBSD.org>2011-06-08 22:49:27 +0800
commit25466abd8a97b23351640b5d18b967de72425e18 (patch)
tree39997571cfd9cb4dd37dc54fa62889c9e8a245e3 /net-mgmt/cricket
parent4bfd4ea49fb690d152cc501513ca4b876eed18f8 (diff)
downloadfreebsd-ports-gnome-25466abd8a97b23351640b5d18b967de72425e18.tar.gz
freebsd-ports-gnome-25466abd8a97b23351640b5d18b967de72425e18.tar.zst
freebsd-ports-gnome-25466abd8a97b23351640b5d18b967de72425e18.zip
- switch to USERS/GROUPS
- bump port revision
Diffstat (limited to 'net-mgmt/cricket')
-rw-r--r--net-mgmt/cricket/Makefile14
-rw-r--r--net-mgmt/cricket/files/pkg-install.in41
2 files changed, 5 insertions, 50 deletions
diff --git a/net-mgmt/cricket/Makefile b/net-mgmt/cricket/Makefile
index d1ca7d7f6ee7..6e234bb3beeb 100644
--- a/net-mgmt/cricket/Makefile
+++ b/net-mgmt/cricket/Makefile
@@ -7,7 +7,7 @@
PORTNAME= cricket
PORTVERSION= 1.0.5
-PORTREVISION= 7
+PORTREVISION= 8
CATEGORIES= net-mgmt
MASTER_SITES= SF
@@ -23,14 +23,11 @@ USE_PERL5= yes
HAS_CONFIGURE= yes
NO_BUILD= yes
PLIST_SUB+= VERSION=${PORTVERSION}
-SUB_FILES= pkg-message pkg-install
-SUB_LIST= USER="${CRICKET_USER}" GROUP="${CRICKET_GROUP}" UID="${CRICKET_UID}" GID="${CRICKET_GID}"
+SUB_FILES= pkg-message
# UID and username comes from ports/UIDs.
-CRICKET_USER= cricket
-CRICKET_UID= 141
-CRICKET_GROUP= www
-CRICKET_GID= 80
+USERS= cricket
+GROUPS= www
.include <bsd.port.pre.mk>
@@ -46,12 +43,11 @@ post-patch:
${WRKSRC}/sample-config/news-server/Defaults
do-install:
- @PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL
@${MKDIR} -m 755 ${PREFIX}/cricket/cricket-${PORTVERSION}
@${CP} -R ${WRKSRC}/* ${PREFIX}/cricket/cricket-${PORTVERSION}
@${FIND} ${PREFIX}/cricket/cricket-${PORTVERSION} -name \*.orig -or \
-name \*.bak | ${XARGS} ${RM} -f
- ${CHOWN} -R ${CRICKET_USER}:${CRICKET_GROUP} ${PREFIX}/cricket
+ ${CHOWN} -R ${USERS}:${GROUPS} ${PREFIX}/cricket
@if [ -L ${PREFIX}/cricket/cricket ]; then \
${ECHO_MSG} "Updating ${PREFIX}/cricket/cricket symbolic link"; \
${RM} ${PREFIX}/cricket/cricket; \
diff --git a/net-mgmt/cricket/files/pkg-install.in b/net-mgmt/cricket/files/pkg-install.in
deleted file mode 100644
index 80b2da52daa1..000000000000
--- a/net-mgmt/cricket/files/pkg-install.in
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/sh
-# $FreeBSD: /tmp/pcvs/ports/net-mgmt/cricket/files/Attic/pkg-install.in,v 1.2 2008-03-09 21:32:01 koitsu Exp $
-#
-
-GROUP=%%GROUP%%
-USER=%%USER%%
-UID=%%UID%%
-GID=%%GID%%
-
-if [ "$2" != "PRE-INSTALL" ]; then
- exit 0
-fi
-
-if /usr/sbin/pw groupshow "${GROUP}" 2>/dev/null; then
- echo "You already have a group \"${GROUP}\", so I will use it."
-else
- if /usr/sbin/pw groupadd ${GROUP} -g ${GID}
- then
- echo "Added group \"${GROUP}\"."
- else
- echo "Adding group \"${GROUP}\" failed..."
- echo "Please create it, and try again."
- exit 1
- fi
-fi
-
-if /usr/sbin/pw user show "${USER}" 2>/dev/null; then
- echo "You already have a user \"${USER}\", so I will use it."
-else
- if /usr/sbin/pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
- -d /usr/local/cricket -s /usr/sbin/nologin -c "Cricket Monitoring User"
- then
- echo "Added user \"${USER}\"."
- else
- echo "Adding user \"${USER}\" failed..."
- echo "Please create it, and try again."
- exit 1
- fi
-fi
-
-exit 0