[Lunar-commits] r26056 - in moonbase/trunk/zbeta: . pymsnt pymsnt/init.d
Stefan Wold
ratler at lunar-linux.org
Wed Oct 3 23:02:24 CEST 2007
Author: ratler
Date: 2007-10-03 23:02:24 +0200 (Wed, 03 Oct 2007)
New Revision: 26056
Added:
moonbase/trunk/zbeta/pymsnt/
moonbase/trunk/zbeta/pymsnt/BUILD
moonbase/trunk/zbeta/pymsnt/DEPENDS
moonbase/trunk/zbeta/pymsnt/DETAILS
moonbase/trunk/zbeta/pymsnt/init.d/
moonbase/trunk/zbeta/pymsnt/init.d/pymsnt
Log:
Initial import of MSN jabber transport, might need some tweaking
Added: moonbase/trunk/zbeta/pymsnt/BUILD
===================================================================
--- moonbase/trunk/zbeta/pymsnt/BUILD (rev 0)
+++ moonbase/trunk/zbeta/pymsnt/BUILD 2007-10-03 21:02:24 UTC (rev 26056)
@@ -0,0 +1,34 @@
+(
+ python_major=`installed_version Python | cut -d. -f1-2`
+ python_dir="/usr/lib/python${python_major}/site-packages/pymsnt"
+
+ # Fix pid
+ sedit 's;PyMSNt.pid;/var/run/pymsnt.pid;' config-example.xml &&
+ # Stupid tarballs
+ find $SOURCE_DIRECTORY/ -type d -name .svn | xargs rm -rf &&
+ prepare_install &&
+
+ if [ ! -d $python_dir ]; then
+ mkdir -p $python_dir
+ fi &&
+ if [ ! -d /etc/jabber ]; then
+ mkdir /etc/jabber
+ fi &&
+ if [ ! -f /etc/jabber/pymsnt.xml ]; then
+ install -m600 config-example.xml /etc/jabber/pymsnt.xml
+ fi &&
+
+ cp -r {src,data} ${python_dir} &&
+ install -m755 PyMSNt.py ${python_dir}/pymsnt.py &&
+
+ # A bit hackish to byte compile everything
+cat <<EOF>> /tmp/$$-compileall.py
+import compileall
+import re
+compileall.compile_dir('$python_dir', rx=re.compile('/[.]svn'), force=True)
+EOF
+
+ python /tmp/$$-compileall.py &&
+ rm -f /tmp/$$-compileall.py
+
+) > $C_FIFO 2>&1
Added: moonbase/trunk/zbeta/pymsnt/DEPENDS
===================================================================
--- moonbase/trunk/zbeta/pymsnt/DEPENDS (rev 0)
+++ moonbase/trunk/zbeta/pymsnt/DEPENDS 2007-10-03 21:02:24 UTC (rev 26056)
@@ -0,0 +1 @@
+depends Twisted
Added: moonbase/trunk/zbeta/pymsnt/DETAILS
===================================================================
--- moonbase/trunk/zbeta/pymsnt/DETAILS (rev 0)
+++ moonbase/trunk/zbeta/pymsnt/DETAILS 2007-10-03 21:02:24 UTC (rev 26056)
@@ -0,0 +1,13 @@
+ MODULE=pymsnt
+ VERSION=0.11.2
+ SOURCE=${MODULE}-${VERSION}.tar.gz
+ SOURCE_URL=http://delx.cjb.net/pymsnt/tarballs/
+SOURCE_DIRECTORY=$BUILD_DIRECTORY/$MODULE-$VERSION
+ SOURCE_VFY=sha1:631743956339435e05d69548142e390fd95263ae
+ WEB_SITE="http://delx.cjb.net/pymsnt/"
+ ENTERED=20071003
+ UPDATED=20071003
+ SHORT="MSN transport for jabber servers"
+cat <<EOF
+MSN transport for jabber servers
+EOF
Added: moonbase/trunk/zbeta/pymsnt/init.d/pymsnt
===================================================================
--- moonbase/trunk/zbeta/pymsnt/init.d/pymsnt (rev 0)
+++ moonbase/trunk/zbeta/pymsnt/init.d/pymsnt 2007-10-03 21:02:24 UTC (rev 26056)
@@ -0,0 +1,20 @@
+#!/bin/bash
+#
+# Startup script for MSN jabber transport
+#
+# chkconfig: 345 90 10
+# description: MSN jabber transport
+# config: /etc/jabber/pymsnt.xml
+
+
+start ()
+{
+ python /usr/lib/python2.5/site-packages/pymsnt/pymsnt.py -c /etc/jabber/pymsnt.xml
+}
+
+stop ()
+{
+ kill `cat /var/run/pymsnt.pid`
+}
+
+. /lib/lsb/init-functions
More information about the Lunar-commits
mailing list