aboutsummaryrefslogtreecommitdiffstats
path: root/net-im
diff options
context:
space:
mode:
authorvs <vs@FreeBSD.org>2004-07-15 18:46:00 +0800
committervs <vs@FreeBSD.org>2004-07-15 18:46:00 +0800
commitffd7de606c8c56cad26ceac49e218bddd4257044 (patch)
tree423be9ea8468d83bc3459ad97f52425ea60785ca /net-im
parente4df56bd15685bbba1b84e316f6db8d947b7d992 (diff)
downloadfreebsd-ports-gnome-ffd7de606c8c56cad26ceac49e218bddd4257044.tar.gz
freebsd-ports-gnome-ffd7de606c8c56cad26ceac49e218bddd4257044.tar.zst
freebsd-ports-gnome-ffd7de606c8c56cad26ceac49e218bddd4257044.zip
Fix hardcoded paths.
PR: ports/69082 Submitted by: Kirk Strauser (maintainer)
Diffstat (limited to 'net-im')
-rw-r--r--net-im/jabberd/Makefile8
-rw-r--r--net-im/jabberd/files/jabberd.sh11
2 files changed, 12 insertions, 7 deletions
diff --git a/net-im/jabberd/Makefile b/net-im/jabberd/Makefile
index 711cd9fb15f1..352e6ff810e1 100644
--- a/net-im/jabberd/Makefile
+++ b/net-im/jabberd/Makefile
@@ -28,6 +28,8 @@ CONFIGURE_ARGS= --localstatedir=/var \
CONFIGURE_ARGS+=--enable-fs
+RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
+
.if !defined(WITHOUT_DEBUG)
CONFIGURE_ARGS+=--enable-debug
.endif
@@ -82,12 +84,16 @@ pre-everything::
@${ECHO} "WITH_PAM use PAM for authentication"
@${ECHO}
+post-patch:
+ @${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
+ ${FILESDIR}/jabberd.sh > ${WRKDIR}/jabberd.sh
+
pre-install:
PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
post-install:
${ECHO} "Installing ${PREFIX}/etc/rc.d/jabberd.sh startup file."
- ${INSTALL_SCRIPT} ${FILESDIR}/jabberd.sh ${PREFIX}/etc/rc.d/jabberd.sh
+ ${INSTALL_SCRIPT} -m 751 ${WRKDIR}/jabberd.sh ${PREFIX}/etc/rc.d/jabberd.sh
@${CHOWN} -R jabber:jabber ${PREFIX}/etc/jabberd
@${FIND} ${PREFIX}/etc/jabberd -type d | ${XARGS} ${CHMOD} 750
@${FIND} ${PREFIX}/etc/jabberd -type f | ${XARGS} ${CHMOD} 660
diff --git a/net-im/jabberd/files/jabberd.sh b/net-im/jabberd/files/jabberd.sh
index ba4d7d177121..33067553c64a 100644
--- a/net-im/jabberd/files/jabberd.sh
+++ b/net-im/jabberd/files/jabberd.sh
@@ -1,19 +1,18 @@
#!/bin/sh
# Start or stop jabberd
-# $FreeBSD: /tmp/pcvs/ports/net-im/jabberd/files/Attic/jabberd.sh,v 1.3 2004-07-13 02:38:15 edwin Exp $
+# $FreeBSD: /tmp/pcvs/ports/net-im/jabberd/files/Attic/jabberd.sh,v 1.4 2004-07-15 10:46:00 vs Exp $
# PROVIDE: jabberd
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: FreeBSD shutdown
#
-prefix=/usr/local
+prefix=%%PREFIX%%
# Define these jabberd_* variables in one of these files:
# /etc/rc.conf
# /etc/rc.conf.local
-# /etc/rc.conf.d/gkrellmd
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
#
@@ -22,13 +21,13 @@ jabberd_enable="NO"
jabberd_flags=""
jabberd_user="jabber"
-. /etc/rc.subr
+. %%RC_SUBR%%
name="jabberd"
rcvar=`set_rcvar`
-command="/usr/local/bin/jabberd"
+command="${prefix}/bin/jabberd"
command_args="&"
-procname="/usr/local/bin/router"
+procname="${prefix}/bin/router"
load_rc_config $name