--- pymsnt-0.11.3.orig/debian/docs
+++ pymsnt-0.11.3/debian/docs
@@ -0,0 +1 @@
+docs/*
--- pymsnt-0.11.3.orig/debian/watch
+++ pymsnt-0.11.3/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://delx.net.au/projects/pymsnt/downloads.html tarballs/pymsnt-(\S+)\.tar\.gz debian uupdate
--- pymsnt-0.11.3.orig/debian/NEWS
+++ pymsnt-0.11.3/debian/NEWS
@@ -0,0 +1,7 @@
+pymsnt (0.9.3-4) unstable; urgency=low
+
+  * Pymsnt now keeps its data in /var/lib/pymsnt. You should move the old data
+    from /var/spool/pymsnt yourself. Because the transport now runs as 'jabber',
+	any files you move should be chowned to jabber:nogroup.
+
+ -- Sam Morris <sam@robots.org.uk>  Wed, 27 Jul 2005 15:02:29 +0100
--- pymsnt-0.11.3.orig/debian/preinst
+++ pymsnt-0.11.3/debian/preinst
@@ -0,0 +1,13 @@
+#! /bin/sh
+
+set -e
+
+if test "$1" = upgrade; then
+	if dpkg --compare-versions "$2" le 0.11.1-4; then
+		rm -f /var/run/jabber/pymsnt.pid
+	fi
+fi
+
+#DEBHELPER#
+
+exit 0
--- pymsnt-0.11.3.orig/debian/compat
+++ pymsnt-0.11.3/debian/compat
@@ -0,0 +1 @@
+4
--- pymsnt-0.11.3.orig/debian/init.d
+++ pymsnt-0.11.3/debian/init.d
@@ -0,0 +1,62 @@
+#! /bin/bash
+### BEGIN INIT INFO
+# Provides:          pymsnt
+# Required-Start:    $remote_fs $syslog
+# Required-Stop:     $remote_fs $syslog
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+### END INIT INFO
+
+set -e
+
+export PATH=/sbin:/bin:/usr/sbin:/usr/bin
+
+NAME=pymsnt
+DESC="MSN transport for Jabber"
+
+PIDDIR=/var/run/pymsnt
+PIDFILE=$PIDDIR/$NAME.pid
+USER=pymsnt
+GROUP=pymsnt
+
+SSD_OPTS="--pidfile=$PIDFILE --name=python --user=$USER"
+
+DAEMON=/usr/bin/python
+OPTIONS="/usr/share/pymsnt/PyMSNt.py --config=/etc/pymsnt.conf.xml --background --pid=$PIDFILE -o spooldir=/var/lib/pymsnt --log=/var/log/pymsnt/pymsnt.log"
+
+test -f $DAEMON || exit 0
+
+if test ! -e $PIDDIR; then
+	mkdir $PIDDIR
+	chown $USER:$GROUP $PIDDIR
+fi
+
+case "$1" in
+start)
+	echo -n "Starting $DESC: "
+	(start-stop-daemon --start $SSD_OPTS --startas "$DAEMON" --chuid "$USER" -- $OPTIONS)
+	if test "$?" = 0; then echo "$NAME."; fi
+	;;
+stop)
+	echo -n "Stopping $DESC: "
+	(start-stop-daemon --stop $SSD_OPTS --retry 10)
+	if test "$?" = 0; then echo "$NAME."; fi
+	;;
+reload|force-reload)
+	echo -n "Reloading $DESC configuration..."
+	(start-stop-daemon --stop $SSD_OPTS --signal HUP)
+	if test "$?" = 0; then echo 'done.'; fi
+	;;
+restart)
+	$0 stop
+	$0 start
+	;;
+*)
+	echo "Usage: /etc/init.d/$NAME {start|stop|restart|reload|force-reload}" >&2
+	exit 1
+	;;
+esac
+
+exit 0
+
+# vim: filetype=sh
--- pymsnt-0.11.3.orig/debian/dirs
+++ pymsnt-0.11.3/debian/dirs
@@ -0,0 +1,2 @@
+var/lib/pymsnt
+var/log/pymsnt
--- pymsnt-0.11.3.orig/debian/README.Debian
+++ pymsnt-0.11.3/debian/README.Debian
@@ -0,0 +1,31 @@
+Pymsnt for Debian
+=================
+
+Documentation
+-------------
+
+Server Administrator, User and Developer guides are available in
+/usr/share/doc/pymsnt.
+
+Setup
+-----
+
+Examples of how to connect pymsnt to jabberd, jabberd2 and ejabberd can be
+found in the Server Administrator's guide, under 'Jabber Server Configuration'.
+
+Avatars
+-------
+
+By default, pymsnt only works with avatars (AKA "display pictures") in PNG
+format. If you install the python-imaging package then pymsnt will be able to
+convert between PNG and other formats commonly used by MSN users.
+
+Network issues
+--------------
+
+Luca Corti <luca@leenoox.net> reported that MSN's servers make use of the Don't
+Fragment bit on their IP packets. If you scrub, normalise, etc. incoming traffic,
+make sure you allow for this as you may run into strange connectivity problems
+otherwise. See <http://bugs.debian.org/427075> for details.
+
+ -- Sam Morris <sam@robots.org.uk>,  Sat, 16 Feb 2008 12:39:03 +0000
--- pymsnt-0.11.3.orig/debian/copyright
+++ pymsnt-0.11.3/debian/copyright
@@ -0,0 +1,55 @@
+This package was debianized by Sam Morris <sam@robots.org.uk> on
+Sun, 19 Sep 2004 19:05:38 +0100.
+
+The current Debian maintainer is Sam Morris <sam@robots.org.uk>.
+
+The package was downloaded from <http://msn-transport.jabberstudio.org/>.
+
+Upstream Authors: James Bunton, Dave Smith, Twisted Matrix Laboratories,
+Matthew W. Lefkowitz
+
+Translators: asantos, Matthias Therry, Sander Devrieze, Florian Holzhauer,
+Lucas Nussbaum, Alexandre Viard, peralta, Tomasz Sterna
+
+Copyright: 2004-2006 James Bunton
+           2001-2003 Matthew W. Lefkowitz
+           2001-2005 Twisted Matrix Laboratories
+           2002-2003 Dave Smith
+
+The following statement applies to the files src/tlib/msn/msn.py,
+src/tlib/domish.py, src/tlib/xmlstream.py and all files in the src/tlib/jabber
+directory:
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of version 2.1 of the GNU Lesser General Public
+ License as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+On Debian systems, the complete text of the GNU Lesser General Public License,
+version 2.1, can be found in /usr/share/common-licenses/LGPL-2.1.
+
+The following statement applies to all other files in this package:
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+On Debian systems, the complete text of the GNU General Public License,
+version 2, can be found in /usr/share/common-licenses/GPL-2.
--- pymsnt-0.11.3.orig/debian/install
+++ pymsnt-0.11.3/debian/install
@@ -0,0 +1,4 @@
+src                usr/share/pymsnt
+data               usr/share/pymsnt
+PyMSNt.py          usr/share/pymsnt
+config-example.xml etc
--- pymsnt-0.11.3.orig/debian/changelog
+++ pymsnt-0.11.3/debian/changelog
@@ -0,0 +1,308 @@
+pymsnt (0.11.3-5.4.201403120538) ucs4-0-0-0; urgency=low
+
+  * UCS auto build. No patches were applied to the original source package
+
+ -- Univention builddaemon <buildd@univention.de>  Wed, 12 Mar 2014 05:38:30 +0100
+
+pymsnt (0.11.3-5) unstable; urgency=low
+
+  * only-reply-to-p2p-transfer-requests.patch: taken from new upstream
+    mercurial repository to prevent spamming MSN with a lot of traffic.
+    Closes: #539302.
+  * adduser invocation is no longer conditional on the pymsnt user not
+    existing; adduser itself already handles the case where the target user
+    already exists.
+  * Drop /var/run from debian/dirs.
+
+ -- Sam Morris <sam@robots.org.uk>  Sat, 29 May 2010 12:29:21 +0100
+
+pymsnt (0.11.3-4) unstable; urgency=low
+
+  * 115_config_default_host_0.0.0.0.patch: Since the value of the 'host' option
+    is now used as the source address of outgoing connections, '0.0.0.0' is a
+    better default; the previous default of '127.0.0.1' made it impossible to
+    connect to MSN. Hopefully this closes: #469136, #489317.
+
+ -- Sam Morris <sam@robots.org.uk>  Sat, 21 Feb 2009 16:19:01 +0000
+
+pymsnt (0.11.3-3) unstable; urgency=low
+
+  * Adapt to pyopenssl's package name changes (closes: #494901). 
+
+ -- Sam Morris <sam@robots.org.uk>  Sat, 21 Feb 2009 15:54:15 +0000
+
+pymsnt (0.11.3-2) unstable; urgency=low
+
+  * Work around MSN protocol changes (closes: #493834).
+
+ -- Sam Morris <sam@robots.org.uk>  Wed, 06 Aug 2008 01:11:28 +0100
+
+pymsnt (0.11.3-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Added LSB formatted dependency info in init.d script (closes: #468903)
+
+ -- Peter Eisentraut <petere@debian.org>  Fri, 04 Apr 2008 15:42:29 +0200
+
+pymsnt (0.11.3-1) unstable; urgency=low
+
+  * New upstream release.
+    - Fixes decoding of non-utf8 status messages (closes: #435853).
+  * Add fix_server_challange.patch to work around a change, made in Python
+    2.5, that affects amd64 systems. Thanks Drew Hess and Andy Price (closes:
+    #428555).
+  * Note the MSN servers' use of the Don't Fragment bit. Thanks Luca Corti
+    (closes: #427075).
+  * Rename 130_twisted_2.5.patch to 130_twisted_2.4.patch: upstream now assumes
+    twisted 2.5 is available, so we need to fall back to 2.4.
+  * Add Homepage field to control file.
+  * Update watch file to new URL.
+  * Add XS-Dm-Upload-Allowed to control fields.
+  * Update to policy 3.7.3 (no changes).
+
+ -- Sam Morris <sam@robots.org.uk>  Sat, 16 Feb 2008 12:58:55 +0000
+
+pymsnt (0.11.2-3) unstable; urgency=low
+
+  * Incorporate Ubuntu's 130_twisted_2.5.patch for twisted 2.5 compatibility.
+    It's needed because the twisted.scripts.twistd module no longer has a
+    checkPID function. However the checkPID function is available in the
+    twisted.scripts._twistd_unix' module.
+
+ -- Sam Morris <sam@robots.org.uk>  Wed, 06 Jun 2007 00:40:04 +0100
+
+pymsnt (0.11.2-2) unstable; urgency=low
+
+  * Don't remove the pymsnt user when purging the package (closes: #417016).
+  * init script: cope with /var/run being on a tmpfs by creating it if it
+    does not already exist.
+  * init script: set -e explicitly, don't rely on putting in in the #! line.
+
+ -- Sam Morris <sam@robots.org.uk>  Mon,  9 Apr 2007 12:28:26 +0100
+
+pymsnt (0.11.2-1) unstable; urgency=high
+
+  * New upstream release
+  * 130_fix-msn-parse-fail.patch: dropped, present in upstream source code
+  * 110_config_log_tracebacks.patch: log tracebacks, warnings and errors by
+    default
+  * Fix some minor grammatical errors in README.Debian
+  * Correct copyright notice: GPL v2 only (high urgency for this RC bug fix)
+
+ -- Sam Morris <sam@robots.org.uk>  Thu, 19 Oct 2006 01:28:26 +0100
+
+pymsnt (0.11.1-6) unstable; urgency=low
+
+  * Check old log files exist before moving them to the new log file directory
+    (closes: #385007)
+
+ -- Sam Morris <sam@robots.org.uk>  Mon, 28 Aug 2006 16:38:48 +0100
+
+pymsnt (0.11.1-5) unstable; urgency=low
+
+  * No longer depend on jabber-common; give pymsnt its own user
+   (closes: #382422)
+
+ -- Sam Morris <sam@robots.org.uk>  Mon, 14 Aug 2006 01:15:51 +0100
+
+pymsnt (0.11.1-4) unstable; urgency=low
+
+  * New patch 128_no-use-env.patch: run /usr/bin/python directly instead of
+    via /usr/bin/env, as suggested by python policy
+  * New patch 130_fix-msn-parse-fail.patch: taken from upstream's development
+    code to avoid exceptions that have been cropping up since August 1st
+
+ -- Sam Morris <sam@robots.org.uk>  Fri,  4 Aug 2006 16:54:02 +0100
+
+pymsnt (0.11.1-3) unstable; urgency=low
+
+  * Increase completeness/correctness of debian/copyright
+  * Install documentation
+  * Update for new python policy
+  * Remove spool directory and log files on package purge
+
+ -- Sam Morris <sam@robots.org.uk>  Tue,  1 Aug 2006 21:14:52 +0100
+
+pymsnt (0.11.1-2) unstable; urgency=low
+
+  * Set ownership of /var/lib/pymsnt directly instead of via dpkg-statoverride
+  * Add ${misc:Depends} to dependencies
+
+ -- Sam Morris <sam@robots.org.uk>  Wed, 12 Jul 2006 00:57:28 +0100
+
+pymsnt (0.11.1-1) unstable; urgency=low
+
+  * New upstream release
+  * Add debtags
+  * Stop using CDBS' automatic debian/control management
+  * 200_fix_-o_option.patch: merged upstream
+
+ -- Sam Morris <sam@robots.org.uk>  Sun,  9 Jul 2006 13:49:12 +0100
+
+pymsnt (0.11a-1) unstable; urgency=low
+
+  * New upstream release
+  * Repack original source archive to remove .svn directories
+  * Use CDBS' simple-patchsys to manage alterations to original source
+    - 100_config_remove_init_options: remove options that are overridden in
+      the init script
+    - 110_config_log_tracebacks: log tracebacks by default
+    - 200_fix_-o_option.patch: make the -o command line option work
+  * Correct watch file
+  * Send the correct signal to reload pymsnt when logs are rotated
+  * Remove spooldir option from config file, set it in the init script instead
+  * Remove TODO file from installed documentation since it's not interesting
+    to users
+  * Update to policy 3.7.2 (no changes)
+
+ -- Sam Morris <sam@robots.org.uk>  Mon, 29 May 2006 14:02:05 +0100
+
+pymsnt (0.11-1) unstable; urgency=low
+
+  * New upstream release
+    - pymsnt no longer uses twistd(1)
+  * Add watch file
+
+ -- Sam Morris <sam@robots.org.uk>  Fri, 17 Feb 2006 17:27:23 +0000
+
+pymsnt (0.10.2-2) unstable; urgency=low
+
+  * Improve output of init script when actions fail
+
+ -- Sam Morris <sam@robots.org.uk>  Thu,  8 Dec 2005 00:47:42 +0000
+
+pymsnt (0.10.2-1) unstable; urgency=low
+
+  * New upstream release
+    - Sending of avatars now works again
+  * No longer any need for the config.py symlink
+
+ -- Sam Morris <sam@robots.org.uk>  Wed,  2 Nov 2005 13:43:53 +0000
+
+pymsnt (0.10.1-1) unstable; urgency=low
+
+  * New upstream release
+  * Drop CDBS' simple-patchsys since Darcs does that for us now
+  * The pymsnt daemon is now hosted by twistd from Twisted. Big init script
+    cleanup accordingly
+
+ -- Sam Morris <sam@robots.org.uk>  Sun, 30 Oct 2005 13:55:55 +0000
+
+pymsnt (0.10.0-2) unstable; urgency=low
+
+  * Recommend python-imaging for avatar support
+  * Update to standards-version 3.6.2; no changes
+
+ -- Sam Morris <sam@robots.org.uk>  Wed,  5 Oct 2005 17:53:46 +0100
+
+pymsnt (0.10.0-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Sam Morris <sam@robots.org.uk>  Mon,  3 Oct 2005 02:43:16 +0100
+
+pymsnt (0.9.5-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Sam Morris <sam@robots.org.uk>  Sun, 28 Aug 2005 15:37:51 +0100
+
+pymsnt (0.9.4-1) unstable; urgency=low
+
+  * New upstream release
+  * Don't update debian/control automatically
+  * Send confirmation message on successful registration
+  * Make python Build-Depends-Indep
+  * Note upstream documentation in README.Debian
+
+ -- Sam Morris <sam@robots.org.uk>  Sat, 27 Aug 2005 13:23:55 +0100
+
+pymsnt (0.9.3-6) unstable; urgency=low
+
+  * Simplify maintainer scripts and remove preinst since it's not actually
+    necessary
+  * debian/logrotate: create log files as the correct user
+  * debian/logrotate: make less noise when rotating
+
+ -- Sam Morris <sam@robots.org.uk>  Fri, 29 Jul 2005 14:50:15 +0100
+
+pymsnt (0.9.3-5) unstable; urgency=low
+
+  * The previous version didn't upgrade very well from 0.9.3-3.sarge. Changed
+    the preinst to handle upgrades from this version. Future backports will
+    use the ~ character in their version numbers so this won't be a problem
+    again
+
+ -- Sam Morris <sam@robots.org.uk>  Wed, 27 Jul 2005 15:27:55 +0100
+
+pymsnt (0.9.3-4) unstable; urgency=low
+
+  * Use CDBS's debian/control management
+  * Use jabber-common's log and run directories instead of our own
+  * debian/dirs: /etc not needed, remove it
+  * Transport data now lives in /var/lib/pymsnt
+  * Transport now runs as jabber
+  * debian/logrotate: use invoke-rc.d to reload the daemon
+
+ -- Sam Morris <sam@robots.org.uk>  Wed, 27 Jul 2005 15:07:29 +0100
+
+pymsnt (0.9.3-3) unstable; urgency=low
+
+  * Rework init script. --exec in stop/reload/restart was causing
+    the script to fail to take action
+
+ -- Sam Morris <sam@robots.org.uk>  Sat, 25 Jun 2005 02:03:02 +0100
+
+pymsnt (0.9.3-2) unstable; urgency=low
+
+  * Add reload method to init.d script
+  * debian/rules cruft removal
+  * Start a new log file after log rotation
+  * Display registration confirmation by default
+  * Correct logrotate typo
+
+ -- Sam Morris <sam@robots.org.uk>  Tue, 24 May 2005 15:18:52 +0100
+
+pymsnt (0.9.3-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Sam Morris <sam@robots.org.uk>  Sat, 21 May 2005 23:58:35 +0100
+
+pymsnt (0.9.2+0.9.3.dev3-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Sam Morris <sam@robots.org.uk>  Sun, 24 Apr 2005 16:02:14 +0100
+
+pymsnt (0.9.2-1) unstable; urgency=low
+
+  * New upstream release
+  * Use dh_python
+
+ -- Sam Morris <sam@robots.org.uk>  Sat,  2 Apr 2005 15:37:47 +0100
+
+pymsnt (0.9.1-1) unstable; urgency=low
+
+  * New upstream release
+  * Config file is now /etc/pymsnt.conf.xml, so remove the old one
+
+ -- Sam Morris <sam@robots.org.uk>  Sat, 12 Mar 2005 03:54:52 +0000
+
+pymsnt (0.8.0-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Sam Morris <sam@robots.org.uk>  Sat, 11 Dec 2004 13:50:38 +0000
+
+pymsnt (0.7.4-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Sam Morris <sam@robots.org.uk>  Wed,  6 Oct 2004 01:54:17 +0100
+
+pymsnt (0.7.3-1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Sam Morris <sam@robots.org.uk>  Sun, 19 Sep 2004 19:04:48 +0100
--- pymsnt-0.11.3.orig/debian/postrm
+++ pymsnt-0.11.3/debian/postrm
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+purge)
+	rm -rf /var/lib/pymsnt
+	rm -rf /var/log/pymsnt
+	rm -rf /var/run/pymsnt
+	;;
+remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+	;;
+*)
+	echo "postrm called with unknown argument '$1'" >&2
+	exit 1
+	;;
+esac
+
+#DEBHELPER#
+
+exit 0
--- pymsnt-0.11.3.orig/debian/pycompat
+++ pymsnt-0.11.3/debian/pycompat
@@ -0,0 +1 @@
+2
--- pymsnt-0.11.3.orig/debian/postinst
+++ pymsnt-0.11.3/debian/postinst
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+configure)
+	adduser --system --disabled-login \
+		--no-create-home --home /var/lib/pymsnt \
+		--group \
+		pymsnt
+	if ! dpkg-statoverride --list /var/lib/pymsnt >/dev/null; then
+		chown -R pymsnt:pymsnt    /var/lib/pymsnt
+	fi
+	if test -n "$2" && dpkg --compare-versions "$2" le 0.11.1-4; then
+		if test -f /var/log/jabber/pymsnt.log*; then
+			mv /var/log/jabber/pymsnt.log* /var/log/pymsnt
+		fi
+	fi
+	if ! dpkg-statoverride --list /var/log/pymsnt >/dev/null; then
+		chown -R pymsnt:adm       /var/log/pymsnt
+	fi
+	;;
+abort-upgrade|abort-remove|abort-deconfigure)
+	;;
+*)
+	echo "postinst called with unknown argument \`$1'" >&2
+	exit 1
+	;;
+esac
+
+#DEBHELPER#
+
+exit 0
--- pymsnt-0.11.3.orig/debian/logrotate
+++ pymsnt-0.11.3/debian/logrotate
@@ -0,0 +1,12 @@
+/var/log/pymsnt/pymsnt.log {
+	daily
+	missingok
+	rotate 7
+	compress
+	delaycompress
+	notifempty
+	create 640 pymsnt adm
+	postrotate
+		invoke-rc.d pymsnt reload > /dev/null
+	endscript
+}
--- pymsnt-0.11.3.orig/debian/control
+++ pymsnt-0.11.3/debian/control
@@ -0,0 +1,22 @@
+Source: pymsnt
+Section: net
+Priority: optional
+Maintainer: Sam Morris <sam@robots.org.uk>
+Standards-Version: 3.7.3
+Build-Depends: cdbs (>= 0.4.23-1.1), debhelper (>= 5.0.37.3), patchutils (>= 0.2.25)
+Build-Depends-Indep: python, python-central (>= 0.5)
+XS-Python-Version: current
+Homepage: http://delx.cjb.net/pymsnt/
+XS-Dm-Upload-Allowed: yes
+
+Package: pymsnt
+Architecture: all
+Depends: ${python:Depends}, python-crypto, python-openssl, python-twisted, adduser, ${misc:Depends}
+Recommends: python-imaging
+Suggests: jabberd2 | jabber | ejabberd
+Description: MSN transport for Jabber
+ PyMSNt provides a gateway which allows Jabber users to communicate with their
+ contacts on the MSN Messenger network. It can connect to  any Jabber server
+ that supports the Connect component mechanism.
+Tags: network::service, protocol::jabber, protocol::msn-messenger, role::sw-daemon, use::chatting, made-of::lang:python
+XB-Python-Version: ${python:Versions}
--- pymsnt-0.11.3.orig/debian/rules
+++ pymsnt-0.11.3/debian/rules
@@ -0,0 +1,11 @@
+#!/usr/bin/make -f
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/rules/simple-patchsys.mk
+
+binary-install/pymsnt::
+	dh_pycentral -ppymsnt
+	dh_python -ppymsnt
+
+binary-post-install/pymsnt::
+	mv ${DEB_DESTDIR}/etc/config-example.xml ${DEB_DESTDIR}/etc/pymsnt.conf.xml
--- pymsnt-0.11.3.orig/debian/patches/cvr0_protocol_change.patch
+++ pymsnt-0.11.3/debian/patches/cvr0_protocol_change.patch
@@ -0,0 +1,12 @@
+diff -a -u -d -r pymsnt.a/src/legacy/msn/msn.py pymsnt.b/src/legacy/msn/msn.py
+--- pymsnt.a/src/legacy/msn/msn.py	2008-02-08 16:55:07.000000000 +0300
++++ pymsnt.b/src/legacy/msn/msn.py	2008-08-05 20:40:46.000000000 +0400
+@@ -110,7 +110,7 @@
+ from urllib import quote, unquote
+ 
+ 
+-MSN_PROTOCOL_VERSION = "MSNP11 CVR0"      # protocol version
++MSN_PROTOCOL_VERSION = "MSNP11"      # protocol version
+ MSN_PORT             = 1863               # default dispatch server port
+ MSN_MAX_MESSAGE      = 1664               # max message length
+ MSN_CVR_STR          = "0x040c winnt 5.1 i386 MSNMSGR 7.0.0777 msmsgs"
--- pymsnt-0.11.3.orig/debian/patches/110_config_log_tracebacks.patch
+++ pymsnt-0.11.3/debian/patches/110_config_log_tracebacks.patch
@@ -0,0 +1,11 @@
+diff -Nur pymsnt-0.11.2/config-example.xml pymsnt-0.11.2.new/config-example.xml
+--- pymsnt-0.11.2/config-example.xml	2006-10-19 01:19:16.000000000 +0100
++++ pymsnt-0.11.2.new/config-example.xml	2006-10-19 01:19:22.000000000 +0100
+@@ -76,6 +76,6 @@
+ 3 -> Log all sorts of informational (mostly useless stuff) 
+ 4 -> Log the MSN protocol code sent
+ -->
+-<!-- <debugLevel>0</debugLevel> -->
++<debugLevel>2</debugLevel>
+ 
+ </pymsnt>
--- pymsnt-0.11.3.orig/debian/patches/120_no-use-env.patch
+++ pymsnt-0.11.3/debian/patches/120_no-use-env.patch
@@ -0,0 +1,9 @@
+diff -Nur pymsnt-0.11.2/PyMSNt.py pymsnt-0.11.2.new/PyMSNt.py
+--- pymsnt-0.11.2/PyMSNt.py	2006-10-18 05:40:56.000000000 +0100
++++ pymsnt-0.11.2.new/PyMSNt.py	2006-10-19 00:58:47.000000000 +0100
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python
+ # Copyright 2006 James Bunton <james@delx.cjb.net> 
+ # Licensed for distribution under the GPL version 2, check COPYING for details
+ 
--- pymsnt-0.11.3.orig/debian/patches/100_config_remove_init_options.patch
+++ pymsnt-0.11.3/debian/patches/100_config_remove_init_options.patch
@@ -0,0 +1,25 @@
+diff -Nur pymsnt-0.11.2/config-example.xml pymsnt-0.11.2.new/config-example.xml
+--- pymsnt-0.11.2/config-example.xml	2006-10-19 00:54:45.000000000 +0100
++++ pymsnt-0.11.2.new/config-example.xml	2006-10-19 00:55:13.000000000 +0100
+@@ -13,13 +13,6 @@
+ <!-- <discoName>MSN Transport</discoName> -->
+ 
+ 
+-<!-- The location of the spool directory.. if relative, relative to the PyMSNt dir.
+-Do not include the jid of the transport -->
+-<!-- <spooldir>/path/to/data</spooldir> -->
+-<!-- The location of the PID file, relative to the PyMSNt directory -->
+-<pid>PyMSNt.pid</pid>
+-<!-- If set, the transport will background itself when run -->
+-<background/>
+ <!-- The Twisted reactor to choose. Pick poll or epoll on Linux, kqueue on BSD. Or leave as default (best found) -->
+ <!-- <reactor>poll</reactor> -->
+ 
+@@ -85,7 +78,4 @@
+ -->
+ <!-- <debugLevel>0</debugLevel> -->
+ 
+-<!-- The file to log to. Leave this disabled for stdout -->
+-<!-- <debugFile>debug.log</debugFile> -->
+-
+ </pymsnt>
--- pymsnt-0.11.3.orig/debian/patches/fix_server_challange.patch
+++ pymsnt-0.11.3/debian/patches/fix_server_challange.patch
@@ -0,0 +1,11 @@
+--- src/legacy/msn/msnp11chl.py	(revision 228)
++++ src/legacy/msn/msnp11chl.py	(working copy)
+@@ -62,7 +62,7 @@
+ 	return out
+ 
+ def littleEndify(num, c="L"):
+-	return struct.unpack(">" + c, struct.pack("<" + c, num))[0]
++	return long(struct.unpack(">" + c, struct.pack("<" + c, num))[0])
+ 
+ 
+ if __name__ == "__main__":
--- pymsnt-0.11.3.orig/debian/patches/115_config_default_host_0.0.0.0.patch
+++ pymsnt-0.11.3/debian/patches/115_config_default_host_0.0.0.0.patch
@@ -0,0 +1,16 @@
+--- config-example.xml.orig	2009-02-21 16:15:29.000000000 +0000
++++ config-example.xml	2009-02-21 16:17:31.000000000 +0000
+@@ -4,9 +4,10 @@
+ 
+ <!-- The JabberID of the transport -->
+ <jid>msn</jid>
+-<!-- The public IP or DNS name of the machine the transport is running on -->
+-<!-- This is needed for file transfer!! This is also used as the IP address for outgoing connections -->
+-<host>127.0.0.1</host>
++<!-- The *publicly-accessible* address (DNS name or IP address) of the machine the transport is running on -->
++<!-- This is used for outgoing connections and is also needed for file transfer! -->
++<!-- If you get a "Failed to connect to MSN servers" message with the reason "Timeout" then make sure this option is correct -->
++<host>0.0.0.0</host>
+ <!-- The component JID of the transport. Unless you're doing clustering, leave this alone -->
+ <!-- <compjid>msn1</compjid> -->
+ <!-- The name of the transport in the service discovery list. -->
--- pymsnt-0.11.3.orig/debian/patches/only-reply-to-p2p-transfer-requests.patch
+++ pymsnt-0.11.3/debian/patches/only-reply-to-p2p-transfer-requests.patch
@@ -0,0 +1,38 @@
+https://sharesource.org/hg/pymsnt/rev/b704db19896a
+
+--- a/src/legacy/msn/msn.py	Sat Oct 11 23:38:52 2008 +0200
++++ b/src/legacy/msn/msn.py	Mon Feb 02 22:49:45 2009 +0200
+@@ -3010,11 +3010,12 @@
+ 
+     def handleSLPMessage(self, slpMessage):
+         if slpMessage.method == "INVITE": # The second invite
+-            data = {"Bridge"      : "TCPv1",\
+-                    "Listening"   : "false",\
+-                    "Hashed-Nonce": "{00000000-0000-0000-0000-000000000000}"}
+-            self.sendSLPMessage("200", "application/x-msnmsgr-transrespbody", data, branch=slpMessage.branch)
+-#            self.handlePacket = self.wait_data # Moved up
++            if slpMessage.ctype == "application/x-msnmsgr-transreqbody":
++                data = {"Bridge"      : "TCPv1",\
++                        "Listening"   : "false",\
++                        "Hashed-Nonce": "{00000000-0000-0000-0000-000000000000}"}
++                self.sendSLPMessage("200", "application/x-msnmsgr-transrespbody", data, branch=slpMessage.branch)
++#                self.handlePacket = self.wait_data # Moved up
+         else:
+             if MSNP2PDEBUG: log.msg("It's either a BYE or an error")
+             self.killLink()
+@@ -3039,10 +3040,11 @@
+ 
+     def handleSLPMessage(self, slpMessage):
+         if slpMessage.method == "INVITE": # The second invite
+-            data = {"Bridge"      : "TCPv1",\
+-                    "Listening"   : "false",\
+-                    "Hashed-Nonce": "{00000000-0000-0000-0000-000000000000}"}
+-            self.sendSLPMessage("200", "application/x-msnmsgr-transrespbody", data, branch=slpMessage.branch)
++            if slpMessage.ctype == "application/x-msnmsgr-transreqbody":
++                data = {"Bridge"      : "TCPv1",\
++                        "Listening"   : "false",\
++                        "Hashed-Nonce": "{00000000-0000-0000-0000-000000000000}"}
++                self.sendSLPMessage("200", "application/x-msnmsgr-transrespbody", data, branch=slpMessage.branch)
+         elif slpMessage.status == "200":
+             pass
+             #self.handlePacket = self.wait_dataprep # Moved upwards
--- pymsnt-0.11.3.orig/debian/patches/130_twisted_2.4.patch
+++ pymsnt-0.11.3/debian/patches/130_twisted_2.4.patch
@@ -0,0 +1,15 @@
+diff -Nur pymsnt-0.11.3/src/main.py pymsnt-0.11.3.new/src/main.py
+--- pymsnt-0.11.3/src/main.py	2008-02-08 13:55:07.000000000 +0000
++++ pymsnt-0.11.3.new/src/main.py	2008-02-16 12:51:07.000000000 +0000
+@@ -379,7 +379,10 @@
+ 	# Set SIGHUP to reload the config file & close & open debug file
+ 	signal.signal(signal.SIGHUP, SIGHUPstuff)
+ 	# Load some scripts for PID and daemonising
+-	from twisted.scripts import _twistd_unix as twistd
++        try:
++		from twisted.scripts import _twistd_unix as twistd
++	except ImportError:
++		from twisted.scripts import twistd
+ 
+ 
+ def main():
