aboutsummaryrefslogtreecommitdiff
path: root/irc/tr-ircd
diff options
context:
space:
mode:
authorChris Rees <crees@FreeBSD.org>2011-07-04 19:07:28 +0000
committerChris Rees <crees@FreeBSD.org>2011-07-04 19:07:28 +0000
commitafdcd94b3efe9bade237e3d43e71e5aa79109f8e (patch)
tree271bb9cec0d5022f5d7e825b4291c12c87b173ee /irc/tr-ircd
parent35d361ad6386071a84754bc4cc79a433fa915a22 (diff)
downloadports-afdcd94b3efe9bade237e3d43e71e5aa79109f8e.tar.gz
ports-afdcd94b3efe9bade237e3d43e71e5aa79109f8e.zip
Notes
Diffstat (limited to 'irc/tr-ircd')
-rw-r--r--irc/tr-ircd/Makefile15
-rw-r--r--irc/tr-ircd/files/pkg-deinstall.in11
-rw-r--r--irc/tr-ircd/files/pkg-install.in35
3 files changed, 4 insertions, 57 deletions
diff --git a/irc/tr-ircd/Makefile b/irc/tr-ircd/Makefile
index 84d72d0b5b36..a83a60f9c457 100644
--- a/irc/tr-ircd/Makefile
+++ b/irc/tr-ircd/Makefile
@@ -21,6 +21,8 @@ LICENSE_FILE= ${WRKSRC}/LICENSE
USE_GMAKE= yes
GNU_CONFIGURE= yes
+USERS= ${TRIRCD_USER}
+GROUPS= ${TRIRCD_GROUP}
TRIRCD_MAXCLIENTS?= 128
TRIRCD_USER?= trircd
@@ -45,13 +47,10 @@ CONFIGURE_ENV+= MD5SUMS="\"${MD5} -r\""
USE_RC_SUBR= trircd
-SUB_LIST+= TRIRCD_USER="${TRIRCD_USER}" TRIRCD_GROUP="${TRIRCD_GROUP}" \
- TRIRCD_RUNDIR="${TRIRCD_RUNDIR}" TRIRCD_LOGDIR="${TRIRCD_LOGDIR}" \
+SUB_LIST+= TRIRCD_RUNDIR="${TRIRCD_RUNDIR}" TRIRCD_LOGDIR="${TRIRCD_LOGDIR}" \
TRIRCD_CONFDIR="${TRIRCD_CONFDIR}"
-SUB_FILES+= pkg-install pkg-deinstall pkg-message
-PKGINSTALL= ${WRKDIR}/pkg-install
-PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
+SUB_FILES+= pkg-deinstall pkg-message
PKGMESSAGE= ${WRKDIR}/pkg-message
.if !defined(NO_INSTALL_MANPAGES)
@@ -68,9 +67,6 @@ CONFIGURE_ARGS+=--enable-openssl=${OPENSSLBASE}
.include <bsd.port.pre.mk>
-PW?= /usr/sbin/pw
-SUB_LIST+= MKDIR="${MKDIR}" PW="${PW}" CHMOD="${CHMOD}" CHOWN="${CHOWN}"
-
.if ${ARCH} == "amd64" || ${ARCH} == "ia64"
CFLAGS+= -fPIC
.endif
@@ -90,9 +86,6 @@ post-patch:
post-configure:
@${REINPLACE_CMD} -e "s,/var/log/tr-ircd,${TRIRCD_LOGDIR}," ${WRKSRC}/include/ircpath.h
-pre-install:
- @${SH} ${PKGINSTALL}
-
post-install:
@${MKDIR} ${TRIRCD_CONFDIR}
@${INSTALL_DATA} ${WRKSRC}/doc/configuration/example.conf ${TRIRCD_CONFDIR}/ircd.conf.sample
diff --git a/irc/tr-ircd/files/pkg-deinstall.in b/irc/tr-ircd/files/pkg-deinstall.in
index e78a33e049fe..4da1c1433c38 100644
--- a/irc/tr-ircd/files/pkg-deinstall.in
+++ b/irc/tr-ircd/files/pkg-deinstall.in
@@ -4,19 +4,8 @@ if [ "$2" != "POST-DEINSTALL" ]; then
exit 0
fi
-TRIRCD_USER="%%TRIRCD_USER%%"
-TRIRCD_GROUP="%%TRIRCD_GROUP%%"
TRIRCD_RUNDIR="%%TRIRCD_RUNDIR%%"
TRIRCD_LOGDIR="%%TRIRCD_LOGDIR%%"
-PW="%%PW%%"
-if pw usershow "${TRIRCD_USER}" 2>/dev/null 1>&2; then
- echo "This port may have created the user: ${TRIRCD_USER}"
- echo "To delete this user, use '${PW} userdel \"${TRIRCD_USER}\"'"
-fi
-if pw usershow "${TRIRCD_GROUP}" 2>/dev/null 1>&2; then
- echo "This port may have created the group: ${TRIRCD_GROUP}"
- echo "To delete this group, use '${PW} groupdel \"${TRIRCD_GROUP}\"'"
-fi
echo "You may need to remove ${TRIRCD_RUNDIR} and ${TRIRCD_LOGDIR} manually."
exit 0
diff --git a/irc/tr-ircd/files/pkg-install.in b/irc/tr-ircd/files/pkg-install.in
deleted file mode 100644
index 47c0593fd172..000000000000
--- a/irc/tr-ircd/files/pkg-install.in
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh
-
-TRIRCD_USER="%%TRIRCD_USER%%"
-TRIRCD_GROUP="%%TRIRCD_GROUP%%"
-TRIRCD_RUNDIR="%%TRIRCD_RUNDIR%%"
-TRIRCD_LOGDIR="%%TRIRCD_LOGDIR%%"
-TRIRCD_CONFDIR="%%TRIRCD_CONFDIR%%"
-
-MKDIR="%%MKDIR%%"
-PW="%%PW%%"
-
-if ! ${PW} groupshow "${TRIRCD_GROUP}" 2>/dev/null 1>&2; then
- if pw groupadd ${TRIRCD_GROUP}; then
- echo "Added group \"${TRIRCD_GROUP}\"."
- else
- echo "Adding group \"${TRIRCD_GROUP}\" failed..."
- exit 1
- fi
-else
- echo "You already have a group \"${TRIRCD_GROUP}\"."
-fi
-
-if ! ${PW} usershow "${TRIRCD_USER}" 2>/dev/null 1>&2; then
- if pw useradd ${TRIRCD_USER} -g ${TRIRCD_GROUP} -h - \
- -s "/usr/sbin/nologin" -d "%%TRIRCD_CONFDIR%%" \
- -c "TR-IRCD pseudo-user"; \
- then
- echo "Added user \"${TRIRCD_USER}\"."
- else
- echo "Adding user \"${TRIRCD_USER}\" failed..."
- exit 1
- fi
-else
- echo "You already have a user \"${TRIRCD_USER}\"."
-fi