diff options
author | Pav Lucistnik <pav@FreeBSD.org> | 2005-06-07 15:18:15 +0000 |
---|---|---|
committer | Pav Lucistnik <pav@FreeBSD.org> | 2005-06-07 15:18:15 +0000 |
commit | afe46a3a17f6a68b36ff3974dba21766222e546e (patch) | |
tree | 182f77534a63ecf52f852778120fb726e3e99b7b /net-im/jabber-pyicq | |
parent | ab32e20b45bf1e865e3eacb2dfc732027897663b (diff) | |
download | ports-afe46a3a17f6a68b36ff3974dba21766222e546e.tar.gz ports-afe46a3a17f6a68b36ff3974dba21766222e546e.zip |
Notes
Diffstat (limited to 'net-im/jabber-pyicq')
-rw-r--r-- | net-im/jabber-pyicq/Makefile | 66 | ||||
-rw-r--r-- | net-im/jabber-pyicq/distinfo | 2 | ||||
-rw-r--r-- | net-im/jabber-pyicq/files/jabber-pyicq-transport.sh.in | 34 | ||||
-rw-r--r-- | net-im/jabber-pyicq/files/patch-src_main.py | 24 | ||||
-rw-r--r-- | net-im/jabber-pyicq/files/pkg-message.in | 22 | ||||
-rw-r--r-- | net-im/jabber-pyicq/pkg-descr | 8 | ||||
-rw-r--r-- | net-im/jabber-pyicq/pkg-plist | 45 |
7 files changed, 201 insertions, 0 deletions
diff --git a/net-im/jabber-pyicq/Makefile b/net-im/jabber-pyicq/Makefile new file mode 100644 index 000000000000..286f06870660 --- /dev/null +++ b/net-im/jabber-pyicq/Makefile @@ -0,0 +1,66 @@ +# New ports collection makefile for: Jabber Python ICQ Transport +# Date created: 2005-06-07 +# Whom: Renato Botelho <freebsd@galle.com.br> +# +# $FreeBSD$ + +PORTNAME= pyicq +PORTVERSION= 0.6 +CATEGORIES= net +MASTER_SITES= http://www.blathersource.org/download.php/pyicq-t/ +PKGNAMEPREFIX= jabber- +PKGNAMESUFFIX= -transport +DISTNAME= ${PORTNAME}-t-${PORTVERSION} +DIST_SUBDIR= jabber + +MAINTAINER= freebsd@galle.com.br +COMMENT= Python ICQ-Transport for Jabber + +RUN_DEPENDS= ${PYTHON_SITELIBDIR}/OpenSSL/__init__.py:${PORTSDIR}/security/py-openssl \ + ${PYTHON_SITELIBDIR}/twisted/__init__.py:${PORTSDIR}/devel/py-twisted + +NO_BUILD= yes +USE_PYTHON= yes +USE_REINPLACE= yes +USE_RC_SUBR= jabber-pyicq-transport.sh + +SUB_FILES= pkg-message +SUB_LIST= PYTHON_CMD=${PYTHON_CMD} + +INST_DIR= ${PREFIX}/lib/jabber/${PORTNAME} + +PORTDOCS= COPYING README TODO + +post-extract: + @${FIND} ${WRKSRC}/src -type d -name '.svn' | ${XARGS} ${RM} -rf + +post-patch: + @${REINPLACE_CMD} -e '/spooldir/s|\.|/var/spool/jabber|' \ + -e '/pid/s|PyICQt.pid|/var/jabberd/pid/${PORTNAME}.pid|' \ + -e '/<debugOn>/s|<debugOn>|<!--<debugOn>-->|' \ + ${WRKSRC}/config_example.xml + @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g; s|%%PYTHON_CMD%%|${PYTHON_CMD}|g' \ + ${WRKSRC}/src/main.py + @${RM} ${WRKSRC}/src/main.py.* + @${MV} ${WRKSRC}/src/config.py ${WRKSRC}/src/config.py.sample + +do-install: + ${INSTALL} -d ${INST_DIR} + ${CP} -pPR ${WRKSRC}/src/* ${INST_DIR}/ + ${CHMOD} 755 ${INST_DIR}/main.py + [ -f ${INST_DIR}/config.py ] || ${CP} ${INST_DIR}/config.py.sample ${INST_DIR}/config.py + ${INSTALL_SCRIPT} -m 751 ${WRKDIR}/${PKGBASE}.sh ${PREFIX}/etc/rc.d/${PKGBASE}.sh + @${MKDIR} ${EXAMPLESDIR}/etc + ${INSTALL_DATA} ${WRKSRC}/config_example.xml ${EXAMPLESDIR}/etc/jabber-pyicq.xml + [ -f ${PREFIX}/etc/jabber-pyicq.xml ] || ${CP} ${EXAMPLESDIR}/etc/jabber-pyicq.xml ${PREFIX}/etc/jabber-pyicq.xml +.if !defined(NOPORTDOCS) +.for portdoc in ${PORTDOCS} + @${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/${portdoc} ${DOCSDIR}/ +.endfor +.endif + +post-install: + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.mk> diff --git a/net-im/jabber-pyicq/distinfo b/net-im/jabber-pyicq/distinfo new file mode 100644 index 000000000000..029227cf4186 --- /dev/null +++ b/net-im/jabber-pyicq/distinfo @@ -0,0 +1,2 @@ +MD5 (jabber/pyicq-t-0.6.tar.gz) = 5c6f8cd598465124d886f1c47f88c809 +SIZE (jabber/pyicq-t-0.6.tar.gz) = 140654 diff --git a/net-im/jabber-pyicq/files/jabber-pyicq-transport.sh.in b/net-im/jabber-pyicq/files/jabber-pyicq-transport.sh.in new file mode 100644 index 000000000000..dda434fc9d75 --- /dev/null +++ b/net-im/jabber-pyicq/files/jabber-pyicq-transport.sh.in @@ -0,0 +1,34 @@ +#!/bin/sh + +# Start or stop jabber-pyicq +# $FreeBSD$ + +# PROVIDE: jabber_pyicq +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: FreeBSD shutdown +# +# Define these jabber_pyicq_* variables in one of these files: +# /etc/rc.conf +# /etc/rc.conf.local +# +# DO NOT CHANGE THESE DEFAULT VALUES HERE +# +jabber_pyicq_dir=${jabberd_pyicq_dir-"%%PREFIX%%/lib/jabber/pyicq"} +jabber_pyicq_piddir=${jabberd_pyicq_piddir-"/var/jabberd/pid"} +jabber_pyicq_enable=${jabberd_pyicq_enable-"NO"} + + +. %%RC_SUBR%% + +name="jabber_pyicq" +rcvar=`set_rcvar` +command_interpreter="%%PYTHON_CMD%%" +command="${jabber_pyicq_dir}/main.py" +command_args="&" + +#procname="${PYTHON} ${jabber_pyicq_dir}/main.py" +pidfile="${jabber_pyicq_piddir}/pyicq.pid" + +load_rc_config $name +run_rc_command "$1" diff --git a/net-im/jabber-pyicq/files/patch-src_main.py b/net-im/jabber-pyicq/files/patch-src_main.py new file mode 100644 index 000000000000..29195250e9d2 --- /dev/null +++ b/net-im/jabber-pyicq/files/patch-src_main.py @@ -0,0 +1,24 @@ +--- src/main.py.orig Tue Jun 7 09:54:58 2005 ++++ src/main.py Tue Jun 7 09:56:26 2005 +@@ -1,3 +1,4 @@ ++#!%%PYTHON_CMD%% + # Copyright 2004 James Bunton <james@delx.cjb.net> + # Licensed for distribution under the GPL version 2, check COPYING for details + +@@ -13,15 +14,9 @@ + print("You are using version %s of Python, at least 2.3 is required." % (sys.version[:3])) + os._exit(0) + +-name = "PyICQt" +-exe = os.path.realpath(sys.executable) +-if (exe.find("python") >= 0): +- print("Restarting with process name %s..." % (name)) +- os.execv(exe, [name, sys.argv[0]]+sys.argv[1:]) +- + import config + import xmlconfig +-conffile = "config.xml" ++conffile = "%%PREFIX%%/etc/jabber-pyicq.xml" + options = {} + opts, args = getopt.getopt(sys.argv[1:], "c:o:dDl:h", ["config=", "option=", "debug", "Debug", "log=", "help"]) + for o, v in opts: diff --git a/net-im/jabber-pyicq/files/pkg-message.in b/net-im/jabber-pyicq/files/pkg-message.in new file mode 100644 index 000000000000..7fd511c6c383 --- /dev/null +++ b/net-im/jabber-pyicq/files/pkg-message.in @@ -0,0 +1,22 @@ +****************************************************************************** +Remember to edit %%PREFIX%%/etc/jabber-pyicq.xml to suit your needs. + +* The 'jid' setting should be what ID you want PyICQt to take on the network. +* The 'mainServer' setting should be the IP address or DNS of the main Jabberd + server. +* The 'secret' setting should match the secret specified for component + connections in your main Jabberd server. +* The 'port' setting is the port that PyICQt is to connect to (more details on + this below. +* You can also turn on debugging options, and customise some of the text that + is sent to the users in this file. + +If you are using Jabberd2 then you shouldn't have to do much configuration. +Make sure the 'mainServer' setting is the IP or DNS of your Jabber server, and +leave the 'port' setting alone. 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. + +If you are using Jabberd1.4.x, it's a bit more complicated. Follow the setup +instructions at http://pyicq-t.blathersource.org/install.php +****************************************************************************** diff --git a/net-im/jabber-pyicq/pkg-descr b/net-im/jabber-pyicq/pkg-descr new file mode 100644 index 000000000000..6c502f66c733 --- /dev/null +++ b/net-im/jabber-pyicq/pkg-descr @@ -0,0 +1,8 @@ +Python ICQ-Transport for Jabber. + +The purpose of this transport is to provide a way for users to be logged into +ICQ via their Jabber account. It is implemented in Python, using the Twisted +framework. This project is just getting off the ground, and so it does not have +quite the functionality of other transports yet. That will come in time. + +WWW: http://pyicq-t.blathersource.org/ diff --git a/net-im/jabber-pyicq/pkg-plist b/net-im/jabber-pyicq/pkg-plist new file mode 100644 index 000000000000..36d835d87b1a --- /dev/null +++ b/net-im/jabber-pyicq/pkg-plist @@ -0,0 +1,45 @@ +@comment $FreeBSD$ +@unexec if cmp -s %D/%%EXAMPLESDIR%%/etc/jabber-pyicq.xml %D/etc/jabber-pyicq.xml; then rm -f %D/etc/jabber-pyicq.xml; fi +%%EXAMPLESDIR%%/etc/jabber-pyicq.xml +@exec [ -f %D/etc/jabber-pyicq.xml ] || cp %B/%f %D/etc/jabber-pyicq.xml +@unexec if cmp -s %D/lib/jabber/pyicq/config.py.sample %D/lib/jabber/pyicq/config.py; then rm -f %D/lib/jabber/pyicq/config.py; fi +lib/jabber/pyicq/config.py.sample +@exec [ -f %D/lib/jabber/pyicq/config.py ] || cp %B/%f %D/lib/jabber/pyicq/config.py +lib/jabber/pyicq/debug.py +lib/jabber/pyicq/disco.py +lib/jabber/pyicq/jabw.py +lib/jabber/pyicq/lang.py +lib/jabber/pyicq/legacy/__init__.py +lib/jabber/pyicq/legacy/glue.py +lib/jabber/pyicq/legacy/icqt.py +lib/jabber/pyicq/main.py +lib/jabber/pyicq/misciq.py +lib/jabber/pyicq/register.py +lib/jabber/pyicq/session.py +lib/jabber/pyicq/stats.py +lib/jabber/pyicq/tlib/__init__.py +lib/jabber/pyicq/tlib/countrycodes.py +lib/jabber/pyicq/tlib/domish.py +lib/jabber/pyicq/tlib/jabber/__init__.py +lib/jabber/pyicq/tlib/jabber/client.py +lib/jabber/pyicq/tlib/jabber/component.py +lib/jabber/pyicq/tlib/jabber/jid.py +lib/jabber/pyicq/tlib/jabber/jstrports.py +lib/jabber/pyicq/tlib/langcodes.py +lib/jabber/pyicq/tlib/oscar.py +lib/jabber/pyicq/tlib/socks5.py +lib/jabber/pyicq/tlib/sockserror.py +lib/jabber/pyicq/tlib/xmlstream.py +lib/jabber/pyicq/utils.py +lib/jabber/pyicq/webadmin/__init__.py +lib/jabber/pyicq/webadmin/handler.py +lib/jabber/pyicq/xdb.py +lib/jabber/pyicq/xmlconfig.py +@dirrm lib/jabber/pyicq/legacy +@dirrm lib/jabber/pyicq/tlib/jabber +@dirrm lib/jabber/pyicq/tlib +@dirrm lib/jabber/pyicq/webadmin +@dirrm lib/jabber/pyicq +@unexec rmdir %D/lib/jabber 2>/dev/null || true +@dirrm %%EXAMPLESDIR%%/etc +@dirrm %%EXAMPLESDIR%% |