--- py-radix-0.5.orig/debian/pycompat
+++ py-radix-0.5/debian/pycompat
@@ -0,0 +1 @@
+2
--- py-radix-0.5.orig/debian/copyright
+++ py-radix-0.5/debian/copyright
@@ -0,0 +1,120 @@
+This package was debianized by Christoph Berg <myon@debian.org> on
+Mon, 15 Oct 2007 23:00:26 +0200.
+
+It was downloaded from http://www.mindrot.org/projects/py-radix/
+
+Author: Damien Miller
+
+The Python binding code is subject to this license:
+
+/*
+ * Copyright (c) 2004 Damien Miller <djm@mindrot.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+This underlying radix tree code is derived from MRT (http://www.mrtd.net/)
+and is subject to the following license:
+
+/*
+ * Copyright (c) 1999-2000
+ *
+ * The Regents of the University of Michigan ("The Regents") and
+ * Merit Network, Inc. All rights reserved. Redistribution and use
+ * in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above
+ * copyright notice, this list of conditions and the
+ * following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other
+ * materials provided with the distribution.
+ *
+ * 3. All advertising materials mentioning features or use of
+ * this software must display the following acknowledgement:
+ *
+ * This product includes software developed by the University of
+ * Michigan, Merit Network, Inc., and their contributors.
+ *
+ * 4. Neither the name of the University, Merit Network, nor the
+ * names of their contributors may be used to endorse or
+ * promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL TH E REGENTS
+ * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HO WEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+/*
+ * Portions Copyright (c) 2004,2005 Damien Miller <djm@mindrot.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+Other files:
+
+strlcpy.c:
+/*
+ * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+inet_ntop.c:
+/* Copyright (c) 1996 by Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
+ * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
+ * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ */
--- py-radix-0.5.orig/debian/watch
+++ py-radix-0.5/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://www.mindrot.org/files/py-radix/py-radix-(.*).tar.gz
--- py-radix-0.5.orig/debian/control
+++ py-radix-0.5/debian/control
@@ -0,0 +1,29 @@
+Source: py-radix
+Section: python
+Priority: extra
+Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>
+Uploaders: Christoph Berg <myon@debian.org>
+Build-Depends: debhelper (>> 5), python-all-dev (>= 2.3), python, python-central (>= 0.5), quilt
+Standards-Version: 3.8.1
+XS-Python-Version: all
+Vcs-Svn: svn://svn.debian.org/svn/python-modules/packages/py-radix/trunk/
+Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/py-radix/trunk/
+Homepage: http://www.mindrot.org/projects/py-radix/
+
+Package: python-radix
+Section: python
+Architecture: any
+Depends: ${shlibs:Depends}, ${python:Depends}
+Provides: ${python:Provides}
+XB-Python-Version: ${python:Versions}
+Description: radix tree implementation for storage of IPv4 and IPv6 networks
+ py-radix is an implementation of a radix tree for Python, which supports
+ storage and lookups of IPv4 and IPv6 networks. This is a Python equivalent to
+ Dave Plonka's Perl Net::Patricia (it even steals the same radix tree code from
+ MRTd).
+ .
+ The radix tree (a.k.a Patricia tree) is the data structure most commonly used
+ for routing table lookups. It efficiently stores network prefixes of varying
+ lengths and allows fast lookups of containing networks. py-radix's
+ implementation is built solely for networks (the data structure itself is more
+ general).
--- py-radix-0.5.orig/debian/rules
+++ py-radix-0.5/debian/rules
@@ -0,0 +1,55 @@
+#!/usr/bin/make -f
+#export DH_VERBOSE=1
+
+include /usr/share/quilt/quilt.make
+
+PYDEF=$(shell pyversions -d)
+PYVERS=$(shell pyversions -r)
+
+build build-indep build-arch: build-stamp
+build-stamp: $(PYVERS:%=build-ext-%) patch
+ touch $@
+
+build-ext-%:
+ # Building for $*
+ dh_testdir
+ $(subst $(PYDEF),python,$*) setup.py build
+ touch $@
+ # ... done
+
+install-clean: build-stamp
+ dh_clean -k
+
+install: install-clean $(PYVERS:%=install-ext-%)
+
+install-ext-%: install-clean
+ # Installing for $*
+ $(subst $(PYDEF),python,$*) setup.py install --root $(CURDIR)/debian/python-radix
+ # ... done
+
+binary-indep:
+
+binary-arch: install
+ # Building .deb
+ dh_installchangelogs -a ChangeLog
+ dh_installdocs -a README
+ dh_installman -a
+ dh_installexamples -a
+ dh_strip -a
+ dh_compress -a
+ dh_pycentral -a
+ dh_fixperms -a
+ dh_shlibdeps -a
+ dh_installdeb -a
+ dh_gencontrol -a
+ dh_md5sums -a
+ dh_builddeb -a
+
+binary: binary-indep binary-arch
+
+clean: unpatch
+ dh_testdir
+ rm -rf build
+ dh_clean build-stamp build-ext-*
+
+.PHONY: build build-indep build-arch clean binary binary-indep binary-arch install configure patch unpatch
--- py-radix-0.5.orig/debian/compat
+++ py-radix-0.5/debian/compat
@@ -0,0 +1 @@
+5
--- py-radix-0.5.orig/debian/changelog
+++ py-radix-0.5/debian/changelog
@@ -0,0 +1,31 @@
+py-radix (0.5-2) unstable; urgency=low
+
+ [ Sandro Tosi ]
+ * debian/control
+ - switch Vcs-Browser field to viewsvn
+
+ [ Christoph Berg ]
+ * Add patch by Alexander Sabourenkov to fix memory leak. Closes: #512830.
+ * Use quilt.
+ * Bump Standards-Version.
+
+ -- Christoph Berg <myon@debian.org> Tue, 09 Jun 2009 17:42:18 +0200
+
+py-radix (0.5-1) unstable; urgency=low
+
+ * New upstream version.
+ * Move package to the Python Modules Team. Co-maintainers welcome!
+
+ -- Christoph Berg <myon@debian.org> Sat, 05 Jan 2008 00:59:46 +0100
+
+py-radix (0.4-2) unstable; urgency=low
+
+ * Build extension for all python versions.
+
+ -- Christoph Berg <myon@debian.org> Fri, 19 Oct 2007 19:17:39 +0200
+
+py-radix (0.4-1) unstable; urgency=low
+
+ * Initial version.
+
+ -- Christoph Berg <myon@debian.org> Mon, 15 Oct 2007 21:40:39 +0200
--- py-radix-0.5.orig/debian/patches/512830-memleak
+++ py-radix-0.5/debian/patches/512830-memleak
@@ -0,0 +1,10 @@
+--- a/radix_python.c
++++ b/radix_python.c
+@@ -95,6 +95,7 @@ RadixNode_dealloc(RadixNodeObject *self)
+ Py_XDECREF(self->family);
+ Py_XDECREF(self->network);
+ Py_XDECREF(self->prefix);
++ Py_XDECREF(self->packed);
+ PyObject_Del(self);
+ }
+
--- py-radix-0.5.orig/debian/patches/series
+++ py-radix-0.5/debian/patches/series
@@ -0,0 +1 @@
+512830-memleak