--- deluge-torrent-0.5.0.orig/debian/changelog
+++ deluge-torrent-0.5.0/debian/changelog
@@ -0,0 +1,61 @@
+deluge-torrent (0.5.0-2~bpo.1) etch-backports; urgency=low
+
+  * etch backport.
+
+ -- Robert Millan <rmh@debian.org>  Thu, 12 Jul 2007 16:21:21 +0200
+
+deluge-torrent (0.5.0-2) unstable; urgency=low
+
+  * Call dh_desktop (Closes: #408891, #415708).
+
+ -- Adam Cécile (Le_Vert) <gandalf@le-vert.net>  Wed, 21 Mar 2007 17:01:09 +0100
+
+deluge-torrent (0.5.0-1) unstable; urgency=low
+
+  * New upstream release (Closes: #406790).
+  * Upstream do not release two separate tarballs anymore, fix rules.
+  * Add dpatch as patch-system.
+  * Use python-support to handle python modules.
+  * Update debian/copyright.
+  * Remove README.Debian-sources, README.
+  * Remove many useless things due to the new build system (distutils).
+  * Update debian/watch.
+  * Update manpage.
+  * Rename binary from deluge-torrent to deluge to match with upstream.
+
+ -- Adam Cécile (Le_Vert) <gandalf@le-vert.net>  Mon, 19 Mar 2007 11:46:46 +0100
+
+deluge-torrent (0.4.1-2) unstable; urgency=low
+
+  * Really change menu entries name (Closes: #404992).
+
+ -- Adam Cécile (Le_Vert) <gandalf@le-vert.net>  Wed, 17 Jan 2007 10:28:19 +0100
+
+deluge-torrent (0.4.1-1) unstable; urgency=low
+
+  * New upstream release.
+  * Change menu entries name from Deluge-torrent to Deluge Torrent.
+
+ -- Adam Cécile (Le_Vert) <gandalf@le-vert.net>  Fri, 29 Dec 2006 11:22:54 +0100
+
+deluge-torrent (0.4.0-2) unstable; urgency=low
+
+  * Build with -DAMD64 for 64bits systems (Closes: #402257).
+
+ -- Adam Cécile (Le_Vert) <gandalf@le-vert.net>  Tue, 12 Dec 2006 00:32:21 +0100
+
+deluge-torrent (0.4.0-1) unstable; urgency=low
+
+  * New upstream release
+    - Fix issue when no locale set (Closes: #399600).
+  * Update control with new dependencies.
+  * Remove .svn directories.
+  * Add debian/watch.
+
+ -- Adam Cécile (Le_Vert) <gandalf@le-vert.net>  Wed, 29 Nov 2006 00:10:34 +0100
+
+deluge-torrent (0.3.1.1-1) unstable; urgency=low
+
+  * Initial release (Closes: #398916).
+
+ -- Adam Cécile (Le_Vert) <gandalf@le-vert.net>  Wed, 15 Nov 2006 22:03:13 +0100
--- deluge-torrent-0.5.0.orig/debian/manpages
+++ deluge-torrent-0.5.0/debian/manpages
@@ -0,0 +1 @@
+debian/deluge.1
--- deluge-torrent-0.5.0.orig/debian/deluge-torrent.desktop
+++ deluge-torrent-0.5.0/debian/deluge-torrent.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=Deluge BitTorrent Client
+Comment=Bittorrent client written in Python/PyGTK
+Exec=deluge-torrent
+Icon=deluge-torrent.xpm
+Terminal=false
+Type=Application
+Categories=Application;Network
+StartupNotify=true
--- deluge-torrent-0.5.0.orig/debian/control
+++ deluge-torrent-0.5.0/debian/control
@@ -0,0 +1,20 @@
+Source: deluge-torrent
+Section: net
+Priority: optional
+Maintainer: Adam Cécile (Le_Vert) <gandalf@le-vert.net>
+Build-Depends: debhelper (>= 5.0.37.2), python-all-dev (>= 2.3.5-11), python-all, python-support (>= 0.5.3), libboost-dev, libboost-thread-dev, libboost-date-time-dev, libboost-filesystem-dev, libboost-serialization-dev, libboost-program-options-dev, libboost-regex-dev, zlib1g-dev, dpatch
+Standards-Version: 3.7.2
+
+Package: deluge-torrent
+Architecture: any
+Depends: ${shlibs:Depends}, ${python:Depends}, python-gtk2, python-glade2, python-xdg, python-notify, notification-daemon
+Description: A Bittorrent client written in Python/PyGTK
+ Deluge is a Bittorrent client, created using Python and GTK+.
+ .
+ Deluge is intended to bring a native, full-featured client to Linux GTK
+ desktop environments such as Gnome and XFCE.
+ .
+ It uses Rasterbar's version of libtorrent, and python bindings written
+ by Kripkenstein.
+ .
+  Homepage: http://www.deluge-torrent.org/
--- deluge-torrent-0.5.0.orig/debian/menu
+++ deluge-torrent-0.5.0/debian/menu
@@ -0,0 +1,3 @@
+?package(deluge-torrent): needs="X11" section="Apps/Net" \
+  title="Deluge BitTorrent Client" longtitle="Bittorrent client written in Python/PyGTK" \
+  command="/usr/bin/deluge" icon="/usr/share/pixmaps/deluge.xpm"
--- deluge-torrent-0.5.0.orig/debian/watch
+++ deluge-torrent-0.5.0/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://deluge-torrent.org/downloads/deluge-([0-9.]+)\.tar\.gz
--- deluge-torrent-0.5.0.orig/debian/compat
+++ deluge-torrent-0.5.0/debian/compat
@@ -0,0 +1 @@
+5
--- deluge-torrent-0.5.0.orig/debian/rules
+++ deluge-torrent-0.5.0/debian/rules
@@ -0,0 +1,82 @@
+#!/usr/bin/make -f
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# Dpatch targets
+include /usr/share/dpatch/dpatch.make
+
+# Available python (using debian/pyversions) and destdir
+PYVERS 	    = $(shell pyversions -rv)
+DESTDIR     = $(CURDIR)/debian/deluge-torrent
+
+# We need to known the target arch to enable/disable amd64 hack
+ARCH	    = $(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU)
+ARCH64	    = ia64 amd64 alpha kfreebsd-amd64 ppc64
+
+CFLAGS = -Wall -g
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -O0
+else
+	CFLAGS += -O2
+endif
+# python-libtorrent need to define AMD64 to work fine on a 64 bits system
+ifneq (,$(findstring $(ARCH),$(ARCH64)))
+	CFLAGS += -DAMD64
+endif
+# Required define
+CFLAGS += -DNDEBUG
+
+build: patch-stamp $(PYVERS:%=build-stamp%)
+build-stamp%: patch-stamp
+	dh_testdir
+	CFLAGS="$(CFLAGS)" python$* setup.py build
+	touch $@
+
+clean: unpatch
+	dh_testdir
+	dh_testroot
+	rm -rf build/
+	find . -name \*.pyc | xargs rm -f
+	rm -rf build-stamp*
+	dh_clean
+
+install: build install-prereq $(PYVERS:%=install-%) install-finish
+install-prereq:
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+install-%:
+	python$* setup.py install --root=$(DESTDIR) --prefix=/usr
+install-finish:
+	# Remove shebangs in python modules
+	for file in `find $(DESTDIR)/usr/lib/python*/site-packages/deluge/ -name \*.py`; do \
+	    grep -v '#!/usr/bin/env python' $$file > $$file.new; \
+	    mv $$file.new $$file; \
+	done
+	# Do not use a versionned python shebang
+	sed -i 's/^#!\/usr\/bin\/python.*$$/#!\/usr\/bin\/python/' $(DESTDIR)/usr/bin/deluge
+
+binary-indep: build install
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs
+	dh_installdocs
+	dh_installmenu
+	dh_installman
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_pysupport
+	dh_desktop
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
--- deluge-torrent-0.5.0.orig/debian/patches/000-Fix_CFLAGS_handling.dpatch
+++ deluge-torrent-0.5.0/debian/patches/000-Fix_CFLAGS_handling.dpatch
@@ -0,0 +1,53 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 000-Fix_CFLAGS_handling.dpatch
+## by Adam Cécile (Le_Vert) <gandalf@le-vert.net>
+##
+## DP: Do not add auto-defined CFLAGS.
+
+@DPATCH@
+
+diff -u deluge-torrent-0.5.0/setup.py deluge-torrent-0.5.0/setup.py.new
+--- deluge-torrent-0.5.0/setup.py	2007-03-18 17:39:56.000000000 +0100
++++ deluge-torrent-0.5.0/setup.py.new	2007-03-19 11:51:50.000000000 +0100
+@@ -37,38 +37,9 @@
+ URL			= "http://deluge-torrent.org"
+ LICENSE		= "GPLv2"
+ 
+-# NOTE: The following "hack" removes the -g and -Wstrict-prototypes
+-# build options from the command that will compile the C++ module,
+-# deluge_core.  While we understand that you aren't generally
+-# encouraged to do this, we have done so for the following reasons:
+-# 1) The -g compiler option produces debugging information about
+-#	the compiled module.  However, this option increases the 
+-#	size of deluge_core.so from ~1.9MB to 13.6MB and slows down
+-#	the program's execution without offering any benefits 
+-#	whatsoever.
+-# 2) -Wstrict-prototypes is not a valid C++ build option, and the
+-#	compiler will throw a number of warnings at compile time.
+-#	While this does not really impact anything, it makes it
+-#	seem as if something is going wrong with the compile, and
+-#	it has been removed to prevent confusion.
+-
+-removals = ['-g', '-DNDEBUG', '-O2', '-Wstrict-prototypes']
+-additions = ['-DNDEBUG', '-O2']
+-
+-if pythonVersion == '2.5':
+-	cv_opt = sysconfig.get_config_vars()["CFLAGS"]
+-	for removal in removals:
+-		cv_opt = cv_opt.replace(removal, " ")
+-	for addition in additions:
+-		cv_opt = cv_opt + " " + addition
+-	sysconfig.get_config_vars()["CFLAGS"] = ' '.join(cv_opt.split())
+-else:
+-	cv_opt = sysconfig.get_config_vars()["OPT"]
+-	for removal in removals:
+-		cv_opt = cv_opt.replace(removal, " ")
+-	for addition in additions:
+-		cv_opt = cv_opt + " " + addition
+-	sysconfig.get_config_vars()["OPT"] = ' '.join(cv_opt.split())
++# We don't want any "auto-defined" FLAGS
++sysconfig.get_config_vars()["CFLAGS"] = ''
++sysconfig.get_config_vars()["OPT"] = ''
+ 
+ # NOTE: The Rasterbar Libtorrent source code is in the libtorrent/ directory
+ # inside of Deluge's source tarball.  On several occasions, it has been 
--- deluge-torrent-0.5.0.orig/debian/patches/00list
+++ deluge-torrent-0.5.0/debian/patches/00list
@@ -0,0 +1 @@
+000-Fix_CFLAGS_handling.dpatch
--- deluge-torrent-0.5.0.orig/debian/pyversions
+++ deluge-torrent-0.5.0/debian/pyversions
@@ -0,0 +1 @@
+2.4-
--- deluge-torrent-0.5.0.orig/debian/deluge.1
+++ deluge-torrent-0.5.0/debian/deluge.1
@@ -0,0 +1,35 @@
+.TH DELUGE 1 "March 2007" "0.5.0"
+
+.SH NAME
+.B deluge
+is a Bittorrent client written in Python/PyGTK.
+
+.SH SYNOPSIS
+.B deluge [options] [torrent]
+
+.SH DESCRIPTION
+.B deluge
+is a Bittorrent client, created using Python and GTK+.
+.br
+Deluge is intended to bring a native, full-featured client to Linux GTK desktop environments such as Gnome and XFCE.
+.br
+It uses Rasterbar's version of libtorrent, and python bindings writte by Kripkenstein.
+
+.SH OPTIONS
+.TP
+.I -tray
+Start deluge minimized to tray.
+.TP
+.I [torrent]
+List of ".torrent" files to add to the download queue.
+
+.SH SEE ALSO
+.B Homepage:
+http://www.deluge-torrent.org/
+
+.SH AUTHOR
+This manual page was written by Adam Cecile <gandalf@le-vert.net> for the Debian system (but may be used by others).
+.br
+Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or any later version published by the Free Software Foundation
+.br
+On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.
--- deluge-torrent-0.5.0.orig/debian/copyright
+++ deluge-torrent-0.5.0/debian/copyright
@@ -0,0 +1,92 @@
+This package was debianized by Adam Cécile (Le_Vert) <gandalf@le-vert.net> on
+Wed, 15 Nov 2006 22:03:13 +0100.
+
+It was downloaded from http://www.deluge-torrent.org/
+
+Upstream Author: Zach Tibbitts <zach@collegegeek.org>
+                 Alon Zakai <kripkensteiner@gmail.com>
+
+Copyright: (C) 2006, Zach Tibbitts <zach@collegegeek.org>
+	   (C) 2006, Alon Zakai <kripkensteiner@gmail.com>
+
+License:
+
+   This package 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 package 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 package; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+
+On Debian systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL'.
+
+libtorrent/* are (C) 2006, A. Zakai ('Kripken') <kripkensteiner@gmail.com>
+and distributed unders term of GNU General Public License.
+
+  This code is baded on libtorrent which is (C) 2003 Arvid Norberg and
+  distributed under terms of the license below :
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions
+    are met:
+
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+    * 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.
+    * Neither the name of the author nor the names of its
+      contributors may be used to endorse or promote products derived
+      from this software without specific prior written permission.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 THE COPYRIGHT OWNER 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) HOWEVER 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.
+
+    "libtorrent/include/libtorrent/asio*" are (C) 2003-2006 Christopher
+    M. Kohlhoff <chris@kohlhoff.com> and distributed under terms of the Boost
+    Software License, Version 1.0 :
+
+      Permission is hereby granted, free of charge, to any person or organization
+      obtaining a copy of the software and accompanying documentation covered by
+      this license (the "Software") to use, reproduce, display, distribute,
+      execute, and transmit the Software, and to prepare derivative works of the
+      Software, and to permit third-parties to whom the Software is furnished to
+      do so, all subject to the following:
+
+      The copyright notices in the Software and this entire statement, including
+      the above license grant, this restriction and the following disclaimer,
+      must be included in all copies of the Software, in whole or in part, and
+      all derivative works of the Software, unless such copies or derivative
+      works are solely in the form of machine-executable object code generated by
+      a source language processor.
+
+      THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+      IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+      FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+      SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+      FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+      ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+      DEALINGS IN THE SOFTWARE.
+
+"po/*" are (C) 2006 Rosetta Contributors and Canonical Ltd 2006 and distributed
+under the same license as the deluge software.
+
+The Debian packaging is (C) 2006-2007, Adam Cécile (Le_Vert)
+<gandalf@le-vert.net> and  is licensed under the GPL, see above.
