From 495ccf41a64d7e134d9cd8fdd8ce67da3b61b578 Mon Sep 17 00:00:00 2001 From: Volker Stolz Date: Fri, 8 Apr 2005 11:48:38 +0000 Subject: [PATCH] Use SUB_{FILES,LIST} to make rc.subr-script PREFIX-aware (Somebody might also want to move the pid-file to /var/run in a future update) --- net-im/jabber/Makefile | 4 +++- net-im/jabber/files/{jabberd.sh => jabberd.sh.in} | 6 +++--- net/jabber/Makefile | 4 +++- net/jabber/files/{jabberd.sh => jabberd.sh.in} | 6 +++--- 4 files changed, 12 insertions(+), 8 deletions(-) rename net-im/jabber/files/{jabberd.sh => jabberd.sh.in} (84%) rename net/jabber/files/{jabberd.sh => jabberd.sh.in} (84%) diff --git a/net-im/jabber/Makefile b/net-im/jabber/Makefile index 16dfbd722d0b..65a96b3c098f 100644 --- a/net-im/jabber/Makefile +++ b/net-im/jabber/Makefile @@ -20,6 +20,8 @@ LIB_DEPENDS= pth.20:${PORTSDIR}/devel/pth \ expat.5:${PORTSDIR}/textproc/expat2 USE_RC_SUBR= yes +SUB_FILES= jabberd.sh +SUB_LIST= RC_SUBR=${RC_SUBR} USE_BZIP2= yes GNU_CONFIGURE= yes USE_GMAKE= yes @@ -46,6 +48,6 @@ post-configure: post-install: PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL - ${INSTALL_SCRIPT} ${FILESDIR}/jabberd.sh ${PREFIX}/etc/rc.d/ + ${INSTALL_SCRIPT} ${WRKDIR}/jabberd.sh ${PREFIX}/etc/rc.d/ .include diff --git a/net-im/jabber/files/jabberd.sh b/net-im/jabber/files/jabberd.sh.in similarity index 84% rename from net-im/jabber/files/jabberd.sh rename to net-im/jabber/files/jabberd.sh.in index d0facc8f5257..f606118cbdac 100644 --- a/net-im/jabber/files/jabberd.sh +++ b/net-im/jabber/files/jabberd.sh.in @@ -11,13 +11,13 @@ #jabber_enable="YES" # -. /usr/local/etc/rc.subr +. %%RC_SUBR%% name=jabber rcvar=`set_rcvar` -command=/usr/local/sbin/jabberd -required_files=/usr/local/etc/${name}.xml +command=%%PREFIX%%/sbin/jabberd +required_files=%%PREFIX%%/etc/${name}.xml HOSTNAME=`/bin/hostname` diff --git a/net/jabber/Makefile b/net/jabber/Makefile index 16dfbd722d0b..65a96b3c098f 100644 --- a/net/jabber/Makefile +++ b/net/jabber/Makefile @@ -20,6 +20,8 @@ LIB_DEPENDS= pth.20:${PORTSDIR}/devel/pth \ expat.5:${PORTSDIR}/textproc/expat2 USE_RC_SUBR= yes +SUB_FILES= jabberd.sh +SUB_LIST= RC_SUBR=${RC_SUBR} USE_BZIP2= yes GNU_CONFIGURE= yes USE_GMAKE= yes @@ -46,6 +48,6 @@ post-configure: post-install: PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL - ${INSTALL_SCRIPT} ${FILESDIR}/jabberd.sh ${PREFIX}/etc/rc.d/ + ${INSTALL_SCRIPT} ${WRKDIR}/jabberd.sh ${PREFIX}/etc/rc.d/ .include diff --git a/net/jabber/files/jabberd.sh b/net/jabber/files/jabberd.sh.in similarity index 84% rename from net/jabber/files/jabberd.sh rename to net/jabber/files/jabberd.sh.in index d0facc8f5257..f606118cbdac 100644 --- a/net/jabber/files/jabberd.sh +++ b/net/jabber/files/jabberd.sh.in @@ -11,13 +11,13 @@ #jabber_enable="YES" # -. /usr/local/etc/rc.subr +. %%RC_SUBR%% name=jabber rcvar=`set_rcvar` -command=/usr/local/sbin/jabberd -required_files=/usr/local/etc/${name}.xml +command=%%PREFIX%%/sbin/jabberd +required_files=%%PREFIX%%/etc/${name}.xml HOSTNAME=`/bin/hostname`