From ffd7de606c8c56cad26ceac49e218bddd4257044 Mon Sep 17 00:00:00 2001 From: vs Date: Thu, 15 Jul 2004 10:46:00 +0000 Subject: Fix hardcoded paths. PR: ports/69082 Submitted by: Kirk Strauser (maintainer) --- net-im/jabberd/Makefile | 8 +++++++- net-im/jabberd/files/jabberd.sh | 11 +++++------ 2 files changed, 12 insertions(+), 7 deletions(-) (limited to 'net-im') 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 -- cgit