1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-05 06:27:37 +00:00

- Rewrite rc.d/jabber.sh script

- Fix rc.d installation [1]
- Remove obsolete USE_REINPLACE

Reported by:	krismail [1]
This commit is contained in:
Renato Botelho 2006-01-24 11:20:03 +00:00
parent 78ca7d964a
commit 1f0160b41c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=154336
2 changed files with 16 additions and 18 deletions

View File

@ -24,7 +24,6 @@ USE_BZIP2= yes
GNU_CONFIGURE= yes
USE_GMAKE= yes
USE_OPENSSL= yes
USE_REINPLACE= yes
CONFIGURE_ARGS+= --enable-ssl
.if defined(WITH_IPV6)
@ -42,10 +41,11 @@ post-patch:
${ECHO} "${INSTALL_PROGRAM}" > ${WRKSRC}/.install_program-freebsd
post-configure:
${REINPLACE_CMD} -e "s#-I\. -I\.\. #-I\. -I\.\. -I${LOCALBASE}/include #" -e "s#-L/usr/lib#-L/usr/lib -L${LOCALBASE}/lib#" ${WRKSRC}/platform-settings
${REINPLACE_CMD} -e "s#-I\. -I\.\. #-I\. -I\.\. -I${LOCALBASE}/include #" \
-e "s#-L/usr/lib#-L/usr/lib -L${LOCALBASE}/lib#" \
${WRKSRC}/platform-settings
post-install:
PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
${INSTALL_SCRIPT} ${WRKDIR}/jabberd.sh ${PREFIX}/etc/rc.d/
.include <bsd.port.mk>

View File

@ -1,35 +1,33 @@
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: jabber
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable rsyncd:
#
#jabber_enable="YES"
# jabber_enable="YES"
#
. %%RC_SUBR%%
name=jabber
name="jabber"
rcvar=`set_rcvar`
command=%%PREFIX%%/sbin/jabberd
load_rc_config $name
required_files=%%PREFIX%%/etc/${name}.xml
HOSTNAME=`/bin/hostname`
# set defaults
jabber_enable=${jabber_enable:-"NO"}
jabber_pidfile=${jabber_pidfile:-"/var/spool/jabber/${name}.pid"}
jabber_flags=${jabber_flags:-"-B -h ${HOSTNAME} -c ${required_files}"}
jabber_user=${jabber_user:-"jabber"}
jabber_group=${jabber_group:-"jabber"}
: ${jabber_enable="NO"}
: ${jabber_pidfile="/var/spool/jabber/${name}.pid"}
: ${jabber_flags="-B -h `/bin/hostname` -c ${required_files}"}
: ${jabber_user="jabber"}
: ${jabber_group="jabber"}
command=%%PREFIX%%/sbin/jabberd
command_args="${jabber_flags}"
pidfile=${jabber_pidfile}
load_rc_config ${name}
run_rc_command "$1"