diff options
author | Martin Matuska <mm@FreeBSD.org> | 2008-06-20 11:57:30 +0000 |
---|---|---|
committer | Martin Matuska <mm@FreeBSD.org> | 2008-06-20 11:57:30 +0000 |
commit | 1eaa34df4cc2a2230f1492246d5768beb4b7d1ed (patch) | |
tree | a8bc2c8cca5f2122f116b25d08eb11768c370d54 | |
parent | c5c0d23ab22ef020aa4ec342ad6d20e26b507e25 (diff) | |
download | ports-1eaa34df4cc2a2230f1492246d5768beb4b7d1ed.tar.gz ports-1eaa34df4cc2a2230f1492246d5768beb4b7d1ed.zip |
Notes
-rw-r--r-- | net-im/jabberd/Makefile | 8 | ||||
-rw-r--r-- | net-im/jabberd/files/jabberd.in | 22 | ||||
-rw-r--r-- | net-im/jabberd/files/patch-tools-jabberd.in | 21 |
3 files changed, 35 insertions, 16 deletions
diff --git a/net-im/jabberd/Makefile b/net-im/jabberd/Makefile index b7894b4b3621..50a50f411350 100644 --- a/net-im/jabberd/Makefile +++ b/net-im/jabberd/Makefile @@ -7,7 +7,7 @@ PORTNAME= jabberd PORTVERSION= 2.2.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net-im MASTER_SITES= http://ftp.xiaoka.com/jabberd2/releases/ DIST_SUBDIR= jabber @@ -33,6 +33,7 @@ OPTIONS= MYSQL "Support MySQL (storage/auth/reg)" on \ REQUIRES "Add backend requires to startup script" off GNU_CONFIGURE= yes +USE_PERL5_RUN= yes USE_OPENSSL= yes USE_ICONV= yes USE_RC_SUBR= jabberd @@ -53,7 +54,8 @@ JABBER_RUNDIR= "/var/jabberd" SUB_LIST+= JABBER_USER=${JABBER_USER} JABBER_UID=${JABBER_UID} \ JABBER_GROUP=${JABBER_GROUP} JABBER_GID=${JABBER_GID} \ JABBER_ETCDIR="${JABBER_ETCDIR}" \ - JABBER_RUNDIR="${JABBER_RUNDIR}" + JABBER_RUNDIR="${JABBER_RUNDIR}" \ + PERL="${PERL}" SUB_FILES+= pkg-install pkg-deinstall @@ -168,6 +170,8 @@ MAN8= c2s.8 jabberd.8 router.8 s2s.8 sm.8 post-patch: @${REINPLACE_CMD} -e 's|"-lsqlite3|"-lsqlite3 ${PTHREAD_LIBS}|g' \ ${WRKSRC}/configure + @${REINPLACE_CMD} -e 's|%%PERL%%|${PERL}|g' \ + ${WRKSRC}/tools/jabberd.in post-install: @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL diff --git a/net-im/jabberd/files/jabberd.in b/net-im/jabberd/files/jabberd.in index ee69c736dc78..6526adc8c992 100644 --- a/net-im/jabberd/files/jabberd.in +++ b/net-im/jabberd/files/jabberd.in @@ -22,21 +22,25 @@ jabberd_user=${jabberd_user-"%%JABBER_USER%%"} name="jabberd" rcvar=`set_rcvar` +command_interpreter="%%PERL%%" command="${prefix}/bin/jabberd" -command_args="&" -procname="${prefix}/bin/router" +command_args="-b" +stop_postcmd=jabberd_post_stopcmd load_rc_config $name -pidfile="${jabberd_chdir}/router.pid" +jabberd_post_stopcmd() +{ + for file in c2s resolver router s2s sm; do + rm -f ${jabberd_chdir}/$file.pid + done +} case "$1" in - stop|faststop|onestop) - echo "Stopping Jabber2" - killall -u ${jabberd_user} jabberd c2s resolver router s2s sm - for file in c2s resolver router s2s sm; do - rm -f ${jabberd_chdir}/$file.pid - done + forcestop) + echo "Stopping jabberd." + killall -u ${jabberd_user} c2s resolver router s2s sm + jabberd_post_stopcmd ;; *) run_rc_command "$1" diff --git a/net-im/jabberd/files/patch-tools-jabberd.in b/net-im/jabberd/files/patch-tools-jabberd.in index 00c37af3de79..ae11dd7d64db 100644 --- a/net-im/jabberd/files/patch-tools-jabberd.in +++ b/net-im/jabberd/files/patch-tools-jabberd.in @@ -1,6 +1,17 @@ ---- tools/jabberd.in.orig Wed Jun 22 22:32:05 2005 -+++ tools/jabberd.in Sat Oct 7 16:27:19 2006 -@@ -28,8 +28,7 @@ +--- tools/jabberd.in.orig 2008-05-22 17:36:30.000000000 +0200 ++++ tools/jabberd.in 2008-06-20 13:24:34.000000000 +0200 +@@ -1,9 +1,4 @@ +-#!/bin/sh +-#-*-Perl-*- +- +-exec perl -w -x $0 "$@" +- +-#!perl ++#!%%PERL%% + + ############################################################################## + # +@@ -27,8 +22,7 @@ my $Bin = "@bindir@"; my $VERSION = "@VERSION@"; my $config_dir = "@sysconfdir@"; @@ -10,7 +21,7 @@ my $debug = 0; my $daemon = 0; my $select = IO::Select->new(); -@@ -43,13 +42,20 @@ +@@ -42,13 +36,20 @@ # Process the command line arguments #----------------------------------------------------------------------------- my %opts; @@ -32,7 +43,7 @@ $debug = 1 if exists($opts{D}); $daemon = 1 if exists($opts{b}); -@@ -123,6 +129,7 @@ +@@ -113,6 +114,7 @@ &debug("jabberd","stdout","debug on\n"); &debug("jabberd","stdout","version($VERSION)\n"); &debug("jabberd","stdout","config_dir($config_dir)\n"); |