--- ctrlproxy-3.0.3.orig/Makefile.settings
+++ ctrlproxy-3.0.3/Makefile.settings
@@ -1,19 +1,19 @@
-BZR_CHECKOUT = yes
+BZR_CHECKOUT = no
 SHLIBEXT = so
 LIBS =  -Wl,--export-dynamic -lgmodule-2.0 -ldl -lglib-2.0   
 CC = gcc
 LD = gcc
-prefix = /usr/local
+prefix = /usr
 exec_prefix = ${prefix}
 datarootdir = ${prefix}/share
 localedir = ${datarootdir}/locale
 INSTALL = /usr/bin/install -c
 bindir = ${exec_prefix}/bin
-docdir = /usr/local/share/doc/ctrlproxy
+docdir = /usr/share/doc/ctrlproxy
 modulesdir = ${exec_prefix}/lib/ctrlproxy
 libdir = ${exec_prefix}/lib
-includedir = ${prefix}/include
-mandir = ${datarootdir}/man
+includedir = /usr/include/ctrlproxy
+mandir = /usr/share/man
 destincludedir = $(includedir)/ctrlproxy-3.0
 cdatadir = ${datarootdir}/ctrlproxy
 EXEEXT = 
@@ -22,24 +22,24 @@
 MODS_SHARED = log_irssi auto_away log_custom repl_simple repl_highlight repl_lastdisconnect \
 	socks listener 
 LDFLAGS = 
-BINS =  linestack-cmd ctrlproxy
+BINS =  ctrlproxy
 scriptdir = $(cdatadir)/scripts
-EXTRA_INSTALL_TARGETS = install-doc
+EXTRA_INSTALL_TARGETS = 
 PACKAGE_VERSION = 3.0.3
 WITH_GCOV = 0
-GNUTLS_CFLAGS = 
-GNUTLS_LIBS = 
-SSL_OBJS = 
+GNUTLS_CFLAGS =  
+GNUTLS_LIBS = -lgnutls  
+SSL_OBJS = src/gnutls.o src/tlscert.o
 SQLITE_CFLAGS = @SQLITE_CFLAGS@
 SQLITE_LDFLAGS = @SQLITE_LIBS@
 PYTHON = @PYTHON@
 PYTHON_PREFIX = @PYTHON_PREFIX@
-SWIG = /usr/bin/swig
+SWIG = 
 PYTHON_CFLAGS = @PYTHON_CPPFLAGS@
 PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ @PYTHON_EXTRA_LIBS@
 IRCDTORTURE = 
-XSLTPROC = /usr/bin/xsltproc
-EXTRA_INSTALL_TARGETS = install-doc
+XSLTPROC = 
+EXTRA_INSTALL_TARGETS = 
 DEFAULT_CONFIG_DIR = $(cdatadir)/default
 HELPFILE = $(cdatadir)/help
 CHECK_CFLAGS =  
--- ctrlproxy-3.0.3.orig/debian/docs
+++ ctrlproxy-3.0.3/debian/docs
@@ -0,0 +1,4 @@
+BUGS
+README
+AUTHORS
+UPGRADING
--- ctrlproxy-3.0.3.orig/debian/control
+++ ctrlproxy-3.0.3/debian/control
@@ -0,0 +1,41 @@
+Source: ctrlproxy
+Section: net
+Priority: optional
+Maintainer: Jelmer Vernooij <jelmer@samba.org>
+Uploaders: Wilmer van der Gaast <lintux@debian.org>
+Standards-Version: 3.7.2
+Build-Depends: libglib2.0-dev, libgnutls-dev, debhelper (>> 5.0.0), check, xsltproc
+XS-Vcs-Bzr: http://people.samba.org/bzr/jelmer/ctrlproxy/debian
+
+Package: ctrlproxy
+Architecture: any
+Depends: ${shlibs:Depends}
+Suggests: bitlbee
+Description: IRC proxy with conversation replay support
+ ctrlproxy is an IRC proxy with support for multiple 
+ client and server connections within a single process. It can 
+ replay stored conversations when a client connects.
+ .
+ It has an easy configuration that can be changed at run-time using special 
+ IRC commands.
+ .
+ Other features include flexible logging, SSL, IPv6, acting as a SOCKS proxy, 
+ ability to talk to NickServ and support for CTCP when no clients are 
+ connected.
+
+Package: ctrlproxy-dev
+Architecture: any
+Depends: ctrlproxy, libglib2.0-dev
+Description: IRC proxy with conversation replay support - development files
+ ctrlproxy is an IRC proxy with support for multiple 
+ client and server connections within a single process. It can 
+ replay stored conversations when a client connects.
+ .
+ It has an easy configuration that can be changed at run-time using special 
+ IRC commands.
+ .
+ Other features include flexible logging, SSL, IPv6, acting as a SOCKS proxy, 
+ ability to talk to NickServ and support for CTCP when no clients are 
+ connected.
+ .
+ This package contains files required for building ctrlproxy plugins.
--- ctrlproxy-3.0.3.orig/debian/rules
+++ ctrlproxy-3.0.3/debian/rules
@@ -0,0 +1,50 @@
+#!/usr/bin/make -f
+
+# turn DEB_BUILD_OPTIONS='foo,bar' into DEB_BUILD_OPT_FOO and DEB_BUILD_OPT_BAR
+d_b_o:=$(shell echo "$$DEB_BUILD_OPTIONS"|sed 's/[^-[:alnum:]]/ /g'|tr a-z A-Z)
+$(foreach o, $(d_b_o), $(eval DEB_BUILD_OPT_$o := 1))
+
+build: build-stamp
+
+build-stamp:
+	dh_testdir
+	./configure --prefix=/usr --includedir=/usr/include/ctrlproxy --mandir=/usr/share/man
+	$(MAKE)
+ifndef DEB_BUILD_OPT_NOTEST
+	$(MAKE) test
+endif
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	dh_clean
+	-$(MAKE) distclean
+	rm -f build-stamp
+
+
+binary-indep: build
+
+binary-arch: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+	$(MAKE) install DESTDIR=`pwd`/debian/tmp
+	dh_install --sourcedir=debian/tmp -a --list-missing --fail-missing
+	dh_strip -a
+	dh_installdocs -a
+	dh_installchangelogs -a 
+	dh_installexamples -a 
+	dh_installman -a
+	dh_compress -a
+	dh_fixperms -a
+	dh_shlibdeps -a
+	dh_installdeb -a
+	dh_gencontrol -a
+	dh_md5sums -a
+	dh_builddeb -a
+
+binary: binary-indep binary-arch
+
+.PHONY: build clean binary-arch binary-indep binary
--- ctrlproxy-3.0.3.orig/debian/watch
+++ ctrlproxy-3.0.3/debian/watch
@@ -0,0 +1,2 @@
+version=3
+ftp://ctrlproxy.vernstok.nl/pub/ctrlproxy/ctrlproxy-(.*).tar.gz
--- ctrlproxy-3.0.3.orig/debian/changelog
+++ ctrlproxy-3.0.3/debian/changelog
@@ -0,0 +1,183 @@
+ctrlproxy (3.0.3-1~bpo40+1) etch-backports; urgency=low
+
+  * Rebuild for etch.
+
+ -- Adeodato Simó <dato@net.com.org.es>  Fri, 12 Oct 2007 12:21:13 +0200
+
+ctrlproxy (3.0.3-1) unstable; urgency=low
+
+  * New upstream release.
+  * Add build-dependency on xsltproc.
+
+ -- Jelmer Vernooij <jelmer@samba.org>  Mon, 23 Jul 2007 13:48:04 +0200
+
+ctrlproxy (3.0.2-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Jelmer Vernooij <jelmer@samba.org>  Sun, 15 Apr 2007 14:23:12 +0200
+
+ctrlproxy (3.0.1-2) unstable; urgency=low
+
+  * Add watch file.
+  * Install config.example in examples directory. (Closes: 414731)
+
+ -- Jelmer Vernooij <jelmer@samba.org>  Sun, 18 Mar 2007 16:36:16 +0100
+
+ctrlproxy (3.0.1-1) unstable; urgency=low
+
+  * New upstream release. (Closes: #412273)
+  * Add XS-VCS-Bzr field.
+  * Fix copyright file.
+  * Add development package with headers and pkg-config file.
+  * Run testsuite when building package.
+
+ -- Jelmer Vernooij <jelmer@samba.org>  Wed, 28 Feb 2007 13:06:11 +0100
+
+ctrlproxy (3.0.0-1) unstable; urgency=high
+
+  * New upstream release.
+  * Install manpages. (Closes: #307192, #324601)
+  * New configuration format and examples. (Closes: #333126, #308665, #298679)
+  * Fixes directory permissions for log_irssi. (Closes: #333127)
+  * Fixes several segmentation faults. (Closes: #314532)
+  * Lower memory profile, history no longer stored in memory. (Closes: #333835)
+  * Removed obsolete ctrlproxy-setup script. (Closes: #324936)
+  * Removed obsolete stats module. (Closes: #276072)
+  * Fixes dates in logs (Closes: #222994)
+  * New maintainer.
+
+ -- Jelmer Vernooij <jelmer@samba.org>  Fri,  8 Dec 2006 17:32:25 +0100
+
+ctrlproxy (2.6.2-1) unstable; urgency=low
+
+  * New upstream release.
+  * Fixes support for ksIRC, mIRC and possibly others. (Closes: #233078,
+    #295691)
+  * Better error message on unexpected <network> tags in conffiles.
+    (Closes: #291318)
+
+ -- Wilmer van der Gaast <lintux@debian.org>  Fri, 22 Apr 2005 14:02:25 +0200
+
+ctrlproxy (2.6.1-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Wilmer van der Gaast <lintux@debian.org>  Tue,  3 Feb 2004 21:25:08 +0100
+
+ctrlproxy (2.6-1) unstable; urgency=low
+
+  * New upstream release.
+  * Fixed: Segfaults on Ctrl-C (Closes: #222991)
+  * Fixed: Incorrect docs and examples for liblog_custom (Closes: #222993)
+  * Fixed: Should set SO_REUSEADDR on listen sockets (Closes: #222994)
+  * Yeah, finally 2.6 in Debian.. :-) (Closes: #226846)
+
+ -- Wilmer van der Gaast <lintux@debian.org>  Sun, 11 Jan 2004 23:43:09 +0100
+
+ctrlproxy (2.5-3) unstable; urgency=low
+
+  * Added -fPIC for mods/lib*. (Closes: #217885)
+  * Fixed debian/rules bug. (Now the package is only built *once*...)
+
+ -- Wilmer van der Gaast <lintux@debian.org>  Sun, 02 Nov 2003 00:21:36 +0100
+
+ctrlproxy (2.5-2) unstable; urgency=medium
+
+  * Added a libxml-2.0 builddep. (Closes: #217733)
+  * Higher priority; people have been waiting for too long for this
+    package.
+
+ -- Wilmer van der Gaast <lintux@debian.org>  Mon, 27 Oct 2003 18:02:51 +0100
+
+ctrlproxy (2.5-1) unstable; urgency=low
+
+  * New upstream version. (Closes: #217688)
+  * CPU hog bug hopefully fixed. (Closes: #200260)
+  * More documentation included now. (Closes: #207144)
+
+ -- Wilmer van der Gaast <lintux@debian.org>  Sun, 26 Oct 2003 20:48:00 +0100
+
+ctrlproxy (2.4-1) unstable; urgency=low
+
+  * New upstream version.
+  * This version has never been finished/uploaded. While upstream fixed
+    some bugs from BTS in this version, 2.5 really closes them.
+
+ -- Wilmer van der Gaast <lintux@debian.org>  Wed, 24 Sep 2003 23:54:29 +0200
+
+ctrlproxy (2.2-5) unstable; urgency=low
+
+  * Fixed build problems on HPPA (no -fPIC for the shared libs)
+    (Closes: #189644)
+
+ -- Wilmer van der Gaast <lintux@debian.org>  Sun, 27 Apr 2003 16:00:31 +0200
+
+ctrlproxy (2.2-4) unstable; urgency=low
+
+  * Took over Debian maintenance from upstream author
+  * Removed empty README.Debian file
+  * Separated debian/ part from upstream tarball, upstream will release without
+    it next time
+
+ -- Wilmer van der Gaast <lintux@debian.org>  Sat,  5 Apr 2003 02:21:41 +0200
+
+ctrlproxy (2.2-3) unstable; urgency=low
+
+  * Add example ctrlproxy module
+
+ -- Jelmer Vernooij <jelmer@vernstok.dyndns.org>  Tue,  1 Apr 2003 21:15:33 +0200
+
+ctrlproxy (2.2-2) unstable; urgency=low
+
+  * Fix some other outstanding bugs
+
+ -- Jelmer Vernooij <jelmer@vernstok.dyndns.org>  Tue,  1 Apr 2003 20:49:27 +0200
+
+ctrlproxy (2.2-1) unstable; urgency=low
+
+  * Fix 100% memory usage bugs
+
+ -- Jelmer Vernooij <jelmer@vernstok.dyndns.org>  Thu, 27 Mar 2003 22:13:35 +0100
+
+ctrlproxy (2.1-1) unstable; urgency=low
+
+  * New upstream release - lots of bugfixes
+
+ -- Jelmer Vernooij <jelmer@vernstok.dyndns.org>  Mon, 17 Mar 2003 18:21:55 +0100
+
+ctrlproxy (2.0-5) unstable; urgency=low
+
+  * Fix reconnecting
+
+ -- Jelmer Vernooij <jelmer@vernstok.dyndns.org>  Thu,  6 Mar 2003 16:44:54 +0100
+
+ctrlproxy (2.0-4) unstable; urgency=low
+
+  * Several small bugfixes
+
+ -- Jelmer Vernooij <jelmer@vernstok.dyndns.org>  Mon,  3 Mar 2003 20:08:04 +0100
+
+ctrlproxy (2.0-3) unstable; urgency=low
+
+  * Lot of bug fixes and memory leak fixes
+  * Add auto-away module
+
+ -- Jelmer Vernooij <jelmer@vernstok.dyndns.org>  Sun, 23 Feb 2003 17:37:12 +0100
+
+ctrlproxy (2.0-2) unstable; urgency=low
+
+  * some minor bugfixes for the modules
+
+ -- Jelmer Vernooij <jelmer@vernstok.dyndns.org>  Sat, 22 Feb 2003 21:08:07 +0100
+
+ctrlproxy (2.0-1) unstable; urgency=medium
+  * Complete rewrite
+
+ -- Jelmer Vernooij <jelmer@vernstok.dyndns.org>  Sat, 22 Feb 2003 20:08:18 +0100
+
+ctrlproxy (1.0-1) unstable; urgency=low
+
+  * Initial release.
+
+ -- Jelmer Vernooij <jelmer@vernstok.dyndns.org>  Wed, 25 Dec 2002 17:58:16 +0100
--- ctrlproxy-3.0.3.orig/debian/compat
+++ ctrlproxy-3.0.3/debian/compat
@@ -0,0 +1 @@
+5
--- ctrlproxy-3.0.3.orig/debian/ctrlproxy-dev.install
+++ ctrlproxy-3.0.3/debian/ctrlproxy-dev.install
@@ -0,0 +1,2 @@
+/usr/include
+/usr/lib/pkgconfig
--- ctrlproxy-3.0.3.orig/debian/README.Debian
+++ ctrlproxy-3.0.3/debian/README.Debian
@@ -0,0 +1,3 @@
+Please read the documentation (ctrlproxy(1), /usr/share/doc/ctrlproxy/*)
+for more information about setting up ctrlproxy. You can find an example
+configuration file in the examples directory. 
--- ctrlproxy-3.0.3.orig/debian/ctrlproxy.install
+++ ctrlproxy-3.0.3/debian/ctrlproxy.install
@@ -0,0 +1,5 @@
+/usr/bin/ctrlproxy
+/usr/lib/ctrlproxy
+/usr/share/man
+/usr/share/ctrlproxy
+/usr/share/doc
--- ctrlproxy-3.0.3.orig/debian/copyright
+++ ctrlproxy-3.0.3/debian/copyright
@@ -0,0 +1,23 @@
+This package was debianized by Jelmer Vernooij <jelmer@nl.linux.org>
+and Wilmer van der Gaast <lintux@debian.org>, somewhere in 2003.
+
+The source can be downloaded from http://ctrlproxy.vernstok.nl/
+
+CtrlProxy is (C) 2002-2007 Jelmer Vernooij <jelmer@vernstok.nl>
+
+The license is:
+
+  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, or
+  (at your option) any later version.
+
+  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 with
+  the Debian GNU/Linux distribution in file /usr/share/common-licenses/GPL;
+  if not, write to the Free Software Foundation, Inc., 51 Franklin Street, 
+  Fifth Floor, Boston, MA 02110-1301.
--- ctrlproxy-3.0.3.orig/debian/examples
+++ ctrlproxy-3.0.3/debian/examples
@@ -0,0 +1,2 @@
+scripts/upgrade.py
+config.example
