diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2011-06-08 14:49:27 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2011-06-08 14:49:27 +0000 |
commit | d22a784cb047ddec5fed07be0620e5966d90efe5 (patch) | |
tree | 3ff107e3eb795d3884e83f1f2f73ea7135ea704f /net-mgmt/cricket | |
parent | 575fdd36d644a66578a5e4e698613aae8fa9b1ae (diff) | |
download | ports-d22a784cb047ddec5fed07be0620e5966d90efe5.tar.gz ports-d22a784cb047ddec5fed07be0620e5966d90efe5.zip |
Notes
Diffstat (limited to 'net-mgmt/cricket')
-rw-r--r-- | net-mgmt/cricket/Makefile | 14 | ||||
-rw-r--r-- | net-mgmt/cricket/files/pkg-install.in | 41 |
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 |