- switch to USERS/GROUPS macro

- bump portrevision
This commit is contained in:
Baptiste Daroussin 2011-06-08 17:08:47 +00:00
parent ebd14a8f66
commit e736e2808f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=275238
2 changed files with 6 additions and 54 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= bopm
PORTVERSION= 3.1.3
PORTREVISION= 1
CATEGORIES= irc
MASTER_SITES= http://static.blitzed.org/www.blitzed.org/bopm/files/ \
ftp://rusunix.org/pub/FreeBSD/distfiles/
@ -23,12 +24,12 @@ CONFIGURE_ARGS= --sysconfdir=${PREFIX}/etc --localstatedir=${LOGDIR}
USE_LDCONFIG= yes
USE_RC_SUBR= bopm
SUB_FILES= pkg-message pkg-install pkg-deinstall
SUB_FILES= pkg-message pkg-deinstall
PLIST_SUB= LOGDIR=${LOGDIR}
SUB_LIST= LOGDIR=${LOGDIR}
pre-su-install:
@${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
USERS= bopm
GROUPS= bopm
post-patch:
@${REINPLACE_CMD} \
@ -41,10 +42,9 @@ post-patch:
${WRKSRC}/bopm.conf.sample
post-install:
@${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${CHOWN} bopm:bopm ${LOGDIR}
@${CHOWN} ${USERS}:${GROUPS} ${LOGDIR}
@${CHMOD} 750 ${LOGDIR}
@${CHOWN} bopm:bopm ${PREFIX}/etc/bopm.conf.sample
@${CHOWN} ${USERS}:${GROUPS} ${PREFIX}/etc/bopm.conf.sample
@${CHMOD} 640 ${PREFIX}/etc/bopm.conf.sample
@${CAT} ${PKGMESSAGE}

View File

@ -1,48 +0,0 @@
#!/bin/sh
# This script is a modified copy of the pkg-install script
# from the ircd-hybrid-ru port.
PATH=/bin:/usr/bin:/usr/sbin
#-----------------------------------------------------------------------
if [ "x$2" = "xPRE-INSTALL" ]; then
#-----------------------------------------------------------------------
USER=bopm
GROUP=${USER}
UID=717
GID=${UID}
SHELL=/bin/sh
HOMEDIR=/nonexistent
GECOS="Blitzed Open Proxy Monitor"
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} -g ${GID}; 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."
else
if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
-d ${HOMEDIR} -s ${SHELL} -c "${GECOS}"
then
echo "Added user \"${USER}\"."
else
echo "Adding user \"${USER}\" failed..."
exit 1
fi
fi
#-----------------------------------------------------------------------
fi
#-----------------------------------------------------------------------
exit 0