diff options
author | mm <mm@FreeBSD.org> | 2007-07-26 19:31:26 +0800 |
---|---|---|
committer | mm <mm@FreeBSD.org> | 2007-07-26 19:31:26 +0800 |
commit | b06ff055d9b5a4cf6fd95243790878ae45f6894a (patch) | |
tree | 718d99b42072bff85344739c15e6b4c318ee23b9 /net-im | |
parent | 37174b8b4eb164361ef35535db4b8481c06ee779 (diff) | |
download | freebsd-ports-graphics-b06ff055d9b5a4cf6fd95243790878ae45f6894a.tar.gz freebsd-ports-graphics-b06ff055d9b5a4cf6fd95243790878ae45f6894a.tar.zst freebsd-ports-graphics-b06ff055d9b5a4cf6fd95243790878ae45f6894a.zip |
- Update to 0.7
- Added installation help and pre-configuration for use with jabber daemons
- Updated startup file (variables, pidfile) and configfile
- Reorganized port documentation
- Added MySQL support
- Honours CFLAGS
- Maintainer changed to mm@FreeBSD.org
PR: ports/114901
Submitted by: mm
Approved by: maintainer, garga (mentor)
Diffstat (limited to 'net-im')
-rw-r--r-- | net-im/mu-conference/Makefile | 124 | ||||
-rw-r--r-- | net-im/mu-conference/distinfo | 9 | ||||
-rw-r--r-- | net-im/mu-conference/files/README.FreeBSD.external.in | 14 | ||||
-rw-r--r-- | net-im/mu-conference/files/README.FreeBSD.jabberd14.in | 38 | ||||
-rw-r--r-- | net-im/mu-conference/files/README.FreeBSD.jabberd2.in | 11 | ||||
-rw-r--r-- | net-im/mu-conference/files/mu-conference.in (renamed from net-im/mu-conference/files/mu-conference.sh.in) | 15 | ||||
-rw-r--r-- | net-im/mu-conference/files/patch-src-jcomp.mk | 11 | ||||
-rw-r--r-- | net-im/mu-conference/files/pkg-message.in | 21 | ||||
-rw-r--r-- | net-im/mu-conference/pkg-descr | 6 | ||||
-rw-r--r-- | net-im/mu-conference/pkg-plist | 10 |
10 files changed, 202 insertions, 57 deletions
diff --git a/net-im/mu-conference/Makefile b/net-im/mu-conference/Makefile index 5ec5dc30bd6..374160aa85b 100644 --- a/net-im/mu-conference/Makefile +++ b/net-im/mu-conference/Makefile @@ -5,41 +5,117 @@ # $FreeBSD$ PORTNAME= mu-conference -PORTVERSION= 0.6.0 -PORTREVISION= 3 +PORTVERSION= 0.7 CATEGORIES= net-im -MASTER_SITES= ${MASTER_SITE_GENTOO} \ - http://jabber.terrapin.com/JCR/:jcr -MASTER_SITE_SUBDIR= distfiles -DISTFILES= ${DISTNAME}${EXTRACT_SUFX} jcr-${JCR_VER}.tar.gz:jcr +MASTER_SITES= http://download.gna.org/mu-conference/ +DISTNAME= ${PORTNAME}_${PORTVERSION} -MAINTAINER= dsh@vlink.ru +MAINTAINER= mm@FreeBSD.org COMMENT= Multi-User Conferencing component for Jabber -USE_GNOME= glib20 -USE_RC_SUBR= ${PORTNAME}.sh +LIB_DEPENDS= expat.6:${PORTSDIR}/textproc/expat2 \ + idn.16:${PORTSDIR}/dns/libidn -WRKSRC= ${WRKDIR}/jcr-${JCR_VER} +USE_GNOME= glib20 pkgconfig +USE_RC_SUBR= ${PORTNAME} -JCR_VER?= 0.2.4 +OPTIONS= MYSQL "Enable MySQL support" off \ + JABBER "Use with jabberd14 (net-im/jabber)" off \ + JABBERD "Use with jabberd 2.x (net-im/jabberd)" off \ + EJABBERD "Use with ejabberd (net-im/ejabberd)" off -post-extract: - ${MV} ${WRKDIR}/${DISTNAME} ${WRKSRC} +SUB_FILES+= pkg-message README.FreeBSD.jabberd14 \ + README.FreeBSD.jabberd2 README.FreeBSD.external -post-build: -.for i in jcomp.mk main.c - ${CP} ${WRKSRC}/src/${i} ${WRKSRC}/${DISTNAME}/src/ -.endfor - (cd ${WRKSRC}/${DISTNAME}/src; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} jcomp.mk) +CFLAGS+= -I${LOCALBASE}/include + +DOCFILES= AUTHORS COPYING ChangeLog FAQ LICENSE README TODO \ + XEP0045_SUPPORT muc-default.xml style.css + +PORTDOCS= * + +.include <bsd.port.pre.mk> + +.if defined(WITH_MYSQL) +USE_MYSQL= yes +CFLAGS+= -DHAVE_MYSQL +DOCFILES+= README.sql mu-conference.sql +.endif + +MUC_LOGDIR?= /var/log/mu-conference + +.if defined(WITH_JABBER) +JABBER_REQUIRE?= jabber +JABBER_USER?= jabber +JABBER_PIDDIR?= /var/run/jabberd +JABBER_SPOOLDIR?= /var/spool/jabberd +RUN_DEPENDS+= jabberd14:${PORTSDIR}/net-im/jabber +.elif defined(WITH_JABBERD) +JABBER_REQUIRE?= jabberd +JABBER_USER?= jabber +JABBER_PIDDIR?= /var/jabberd/pid +JABBER_SPOOLDIR?= /var/spool/jabber +RUN_DEPENDS+= jabberd:${PORTSDIR}/net-im/jabberd +.elif defined(WITH_EJABBERD) +JABBER_REQUIRE?= ejabberd +JABBER_USER?= ejabberd +JABBER_PIDDIR?= /var/jabberd/pid +JABBER_SPOOLDIR?= /var/spool/jabber +RUN_DEPENDS+= ejabberd:${PORTSDIR}/net-im/ejabberd +.else +JABBER_REQUIRE?= DAEMON +JABBER_USER?= nobody +JABBER_PIDDIR?= /var/run/mu-conference +JABBER_SPOOLDIR?= /var/spool/mu-conference +.endif + +SUB_LIST+= JABBER_REQUIRE="${JABBER_REQUIRE}" \ + JABBER_PIDDIR="${JABBER_PIDDIR}" \ + JABBER_SPOOLDIR="${JABBER_SPOOLDIR}" \ + JABBER_USER=${JABBER_USER} \ + MUC_LOGDIR=${MUC_LOGDIR} + +post-patch: + @${REINPLACE_CMD} -e 's#=$$(CFLAGS)#=#g' \ + -e 's#CFLAGS[:]*=#CFLAGS+=#g' \ + -e 's#`pkg-config#`${LOCALBASE}/bin/pkg-config#g' \ + ${WRKSRC}/Makefile ${WRKSRC}/*/Makefile \ + ${WRKSRC}/*/*/Makefile + @${REINPLACE_CMD} -e 's#<spool>\./spool/chat.localhost#<spool>${JABBER_SPOOLDIR}/conference.localhost#g' \ + -e 's#<logdir>\./syslogs#<logdir>${LOGDIR}#g' \ + -e 's#<logdir>\./logs#<logdir>${JABBER_SPOOLDIR}/conference.localhost/logs#g' \ + -e 's#<pidfile>\.#<pidfile>${JABBER_PIDDIR}#g' \ + ${WRKSRC}/muc-default.xml +.if defined(WITH_MYSQL) + @${REINPLACE_CMD} \ + -e 's#`mysql_config#`${LOCALBASE}/bin/mysql_config#g' \ + ${WRKSRC}/src/Makefile +.else + @${REINPLACE_CMD} -e 's#`mysql_config --libs`##g' \ + ${WRKSRC}/src/Makefile +.endif do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/${DISTNAME}/src/mu-conference ${PREFIX}/bin - ${INSTALL_DATA} ${WRKSRC}/${DISTNAME}/muc-jcr.xml ${PREFIX}/etc/muc.xml-dist + ${INSTALL_PROGRAM} ${WRKSRC}/src/mu-conference ${PREFIX}/bin + ${INSTALL_DATA} ${WRKSRC}/muc-default.xml ${PREFIX}/etc/muc.xml.sample + @if ! [ -f ${PREFIX}/etc/muc.xml ]; then \ + ${INSTALL_DATA} ${WRKSRC}/muc-default.xml ${PREFIX}/etc/muc.xml; \ + fi .if !defined(NOPORTDOCS) - ${MKDIR} ${DOCSDIR} -.for i in FAQ README - ${INSTALL_DATA} ${WRKSRC}/${DISTNAME}/${i} ${DOCSDIR} + @${MKDIR} ${DOCSDIR}/scripts +.for FILE in README.FreeBSD.jabberd14 README.FreeBSD.jabberd2 README.FreeBSD.external + @${INSTALL_DATA} ${WRKDIR}/${FILE} ${DOCSDIR} +.endfor +.for FILE in ${DOCFILES} + @${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR} +.endfor + ${INSTALL_DATA} ${WRKSRC}/scripts/README ${DOCSDIR}/scripts +.for FILE in roommaker.pl roomname.pl + ${INSTALL_SCRIPT} ${WRKSRC}/scripts/${FILE} ${DOCSDIR}/scripts .endfor .endif -.include <bsd.port.mk> +post-install: + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.post.mk> diff --git a/net-im/mu-conference/distinfo b/net-im/mu-conference/distinfo index 9deb67e6d86..35a0a34a88c 100644 --- a/net-im/mu-conference/distinfo +++ b/net-im/mu-conference/distinfo @@ -1,6 +1,3 @@ -MD5 (mu-conference-0.6.0.tar.gz) = e97433bf4a978329d639ce872bee3223 -SHA256 (mu-conference-0.6.0.tar.gz) = 9cc4d95f9dd8f658f174a156b768c64e0b2f30646acdd1915e97e3d1ac8c1466 -SIZE (mu-conference-0.6.0.tar.gz) = 56272 -MD5 (jcr-0.2.4.tar.gz) = f88bcc4a8347fd1dd8ca50dff50341f3 -SHA256 (jcr-0.2.4.tar.gz) = 0899920f511495a9ada6b15bd6ad4aeaa8dcc680d6f46e0f07ab718dc5689f75 -SIZE (jcr-0.2.4.tar.gz) = 128939 +MD5 (mu-conference_0.7.tar.gz) = 019e75d80a51da63ba7567341483b2e9 +SHA256 (mu-conference_0.7.tar.gz) = 914d7e5cf45c50e3eaae77d03d895211d332f85469f4a70adaf7209917d27a35 +SIZE (mu-conference_0.7.tar.gz) = 112381 diff --git a/net-im/mu-conference/files/README.FreeBSD.external.in b/net-im/mu-conference/files/README.FreeBSD.external.in new file mode 100644 index 00000000000..4b83ff16a4c --- /dev/null +++ b/net-im/mu-conference/files/README.FreeBSD.external.in @@ -0,0 +1,14 @@ +# MU-Conference and external jabber servers on FreeBSD +# README by Martin Matuska <mm_at_FreeBSD_dot_org> + +If you did not select WITH_JABBER, WITH_JABBERD or WITH_EJABBERD, you may want +to use another or external jabber server. To run the transport locally, you may +need to create the pid and spool directories manually. + +Default pahts of the current installation are: +%%JABBER_PIDDIR%% +%%JABBER_SPOOLDIR%% + +You should make these paths writable for the service user. +Default service user for this installation: +%%JABBER_USER%% diff --git a/net-im/mu-conference/files/README.FreeBSD.jabberd14.in b/net-im/mu-conference/files/README.FreeBSD.jabberd14.in new file mode 100644 index 00000000000..34fbc129200 --- /dev/null +++ b/net-im/mu-conference/files/README.FreeBSD.jabberd14.in @@ -0,0 +1,38 @@ +# MU-Conference and jabberd14 (net-im/jabber) on FreeBSD +# README by Martin Matuska <mm_at_FreeBSD_dot_org> + +The sample configuration file for jabberd14 may be located in: +%%TARGETDIR%%/etc/jabber.xml.sample + +Please make all necessary changes to your configuration file which may be: +%%TARGETDIR%%/etc/jabber.xml + +NOTE: if you want this service to be accessible from other servers, + change any 'conference.localhost' listed below to a fully qualified + domain name! Please make sure that your directives are _NOT_ in an XML + comment: there are many multi-line comments. + +To activate MU-Conference for your Jabber server, +add the following to your configuration file and adjust to your settings +(around line 921 in the sample configuration file): +------------------------------------------------------------------------------- + + <service id="conference.localhost"> + <accept> + <ip>127.0.0.1</ip> + <port>7009</port> + <secret>password</secret> + </accept> + </service> + +------------------------------------------------------------------------------- +Add this section to the browse area of the jsm to advertise it to +your users (around line 382 of the sample config): +------------------------------------------------------------------------------- + + <item category="conference" type="public" jid="conference.localhost" name="Public Conferencing"> + <ns>jabber:iq:conference</ns> + </item> + +------------------------------------------------------------------------------- +Be sure to restart your server after reconfiguring. diff --git a/net-im/mu-conference/files/README.FreeBSD.jabberd2.in b/net-im/mu-conference/files/README.FreeBSD.jabberd2.in new file mode 100644 index 00000000000..cc534420bb6 --- /dev/null +++ b/net-im/mu-conference/files/README.FreeBSD.jabberd2.in @@ -0,0 +1,11 @@ +# MU-Conference and jabberd2 (net-im/jabberd) on FreeBSD +# README by Martin Matuska <mm_at_FreeBSD_dot_org> + +The configuration for jabberd2 is located in: +%%TARGETDIR%%/etc/jabberd + +If you are using Jabberd2 then you shouldn't have to do much configuration. +Make sure the 'mainServer' setting is the IP or hostname of your Jabber server, +and set 'port' to 5347. Double-check that the secret for legacy components +in router.xml (for Jabberd2) is the same as the secret setting in config.py. +That should be all. You don't even need to restart Jabberd2. diff --git a/net-im/mu-conference/files/mu-conference.sh.in b/net-im/mu-conference/files/mu-conference.in index 9c7c2550eab..dcea13b2c5f 100644 --- a/net-im/mu-conference/files/mu-conference.sh.in +++ b/net-im/mu-conference/files/mu-conference.in @@ -1,16 +1,14 @@ #!/bin/sh - -# Start or stop jabber's mu-conference +# # $FreeBSD$ # PROVIDE: mu_conference -# REQUIRE: DAEMON jabberd +# REQUIRE: %%JABBER_REQUIRE%% # KEYWORD: shutdown -# + # Define these mu_conference_* variables in one of these files: # /etc/rc.conf # /etc/rc.conf.local -# /etc/rc.conf.d/mu_conference # # DO NOT CHANGE THESE DEFAULT VALUES HERE # @@ -27,7 +25,7 @@ name="mu_conference" rcvar=`set_rcvar` command="%%PREFIX%%/bin/mu-conference" -pidfile="/var/jabberd/pid/mu-conference.pid" +pidfile=${mu_conference_pidfile:-"%%JABBER_PIDDIR%%/mu-conference.pid"} stop_postcmd="mu_conference_stop_post" @@ -39,9 +37,8 @@ load_rc_config $name : ${mu_conference_config="%%PREFIX%%/etc/muc.xml"} : ${mu_conference_enable="NO"} -: ${mu_conference_user="jabber"} +: ${mu_conference_user="%%JABBER_USER%%"} -command_args="-c $mu_conference_config -B" +command_args="-c ${mu_conference_config} -B >/dev/null 2>&1" run_rc_command "$1" - diff --git a/net-im/mu-conference/files/patch-src-jcomp.mk b/net-im/mu-conference/files/patch-src-jcomp.mk deleted file mode 100644 index 36114f01d1e..00000000000 --- a/net-im/mu-conference/files/patch-src-jcomp.mk +++ /dev/null @@ -1,11 +0,0 @@ ---- src/jcomp.mk.orig Sun Oct 26 15:35:19 2003 -+++ src/jcomp.mk Mon Feb 9 16:03:18 2004 -@@ -25,7 +25,7 @@ - #CFLAGS:=$(CFLAGS) -pipe -Os -I../../jabberd -I../include - #LIBS:=$(LIBS) /usr/local/lib/ccmalloc-gcc.o -lccmalloc - #LIBS:=$(LIBS) -lmemusage --LIBS:=$(LIBS) -ljcomp -lm `pkg-config --libs glib-2.0` `pkg-config --libs gthread-2.0` -+LIBS:=-ljcomp -lm `pkg-config --libs glib-2.0` `pkg-config --libs gthread-2.0` - LDFLAGS:=-L../../lib - - conference_OBJECTS=conference.o conference_room.o conference_user.o utils.o xdata.o admin.o roles.o xdb.o hash.o main.o diff --git a/net-im/mu-conference/files/pkg-message.in b/net-im/mu-conference/files/pkg-message.in new file mode 100644 index 00000000000..4561c840e92 --- /dev/null +++ b/net-im/mu-conference/files/pkg-message.in @@ -0,0 +1,21 @@ +****************************************************************************** +Remember to edit %%PREFIX%%/etc/muc.xml to suit your needs. + +If necessary, please create directories owned by user "%%JABBER_USER%%": +%%JABBER_SPOOLDIR%%/conference.localhost +%%JABBER_SPOOLDIR%%/conference.localhost/logs +%%MUC_LOGDIR%% + +Please read instructions for different jabber daemons you desire to use: +- jabberd14 (net-im/jabber): + %%DOCSDIR%%/README.FreeBSD.jabberd14 +- jabberd2 (net-im/jabberd): + %%DOCSDIR%%/README.FreeBSD.jabberd2 + +If you did not select WITH_JABBER, WITH_JABBERD or WITH_EJABBERD, you may want +to use another or an external jabber server. Please read instructions from: +%%DOCSDIR%%/README.FreeBSD.external + +If you are using MySQL, sample database script can be found in: +%%DOCSDIR%%/mu-conference.sql +****************************************************************************** diff --git a/net-im/mu-conference/pkg-descr b/net-im/mu-conference/pkg-descr index 6697422d421..678abef65cc 100644 --- a/net-im/mu-conference/pkg-descr +++ b/net-im/mu-conference/pkg-descr @@ -1,4 +1,4 @@ -An implemention of the conference server using the protocol defined in -JEP-0045. +MU-Conference is a Jabber/XMPP server component. It provides an implementation +of Multi-User Chat (XEP-0045) - Jabber chatrooms. -WWW: http://www.jabberstudio.org/projects/mu-conference +WWW: https://gna.org/projects/mu-conference/ diff --git a/net-im/mu-conference/pkg-plist b/net-im/mu-conference/pkg-plist index 3dd3a73287d..00624fec8e1 100644 --- a/net-im/mu-conference/pkg-plist +++ b/net-im/mu-conference/pkg-plist @@ -1,5 +1,7 @@ +@unexec if cmp -s %D/etc/muc.xml.sample %D/etc/muc.xml; then rm -f %D/etc/muc.xml; fi bin/mu-conference -etc/muc.xml-dist -%%PORTDOCS%%%%DOCSDIR%%/FAQ -%%PORTDOCS%%%%DOCSDIR%%/README -%%PORTDOCS%%@dirrm %%DOCSDIR%% +etc/muc.xml.sample +%%PORTDOCS%%%%DOCSDIR%%/scripts/README +%%PORTDOCS%%%%DOCSDIR%%/scripts/roomname.pl +%%PORTDOCS%%%%DOCSDIR%%/scripts/roommaker.pl +%%PORTDOCS%%@dirrm %%DOCSDIR%%/scripts |