--- foolscap-0.5.0+dfsg.orig/debian/preinst
+++ foolscap-0.5.0+dfsg/debian/preinst
@@ -0,0 +1,9 @@
+#!/bin/sh
+# TODO: remove this file after squeeze has been released
+set -e
+if [ "$1" = upgrade ] && dpkg --compare-versions "$2" lt-nl 0.4.0+dfsg-0;
+then
+	pycentral pkgremove python-foolscap
+fi
+
+#DEBHELPER#
\ No newline at end of file
--- foolscap-0.5.0+dfsg.orig/debian/copyright
+++ foolscap-0.5.0+dfsg/debian/copyright
@@ -0,0 +1,68 @@
+This package was debianized by Stephan Peijnik <debian@sp.or.at> on
+Fri, 19 Sep 2008 17:48:21 +0200.
+
+It was downloaded from http://foolscap.lothar.com/.
+
+Upstream Author:
+    
+    Brian Warner <warner@lothar.com>
+
+Copyright:
+
+    Copyright (C) 2006-2008 Brian Warner
+
+License:
+ 
+    Permission is hereby granted, free of charge, to any person
+    obtaining a copy of this software and associated documentation
+    files (the "Software"), to deal in the Software without
+    restriction, including without limitation the rights to use,
+    copy, modify, merge, publish, distribute, sublicense, and/or sell
+    copies of the Software, and to permit persons to whom the
+    Software is furnished to do so, subject to the following
+    conditions:
+
+    The above copyright notice and this permission notice shall be
+    included in all copies or substantial portions of the Software.
+
+    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 AND
+    NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+    HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+    WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+    OTHER DEALINGS IN THE SOFTWARE.
+
+Files with extra copyrights/licenses:
+
+* foolscap/sslverify.py
+
+  Slightly modified of sslverify.py which can also be found in 
+  python-epsilon.
+
+  Copyright (c) 2005 Divmod Inc.
+
+  Permission is hereby granted, free of charge, to any person obtaining
+  a copy of this software and associated documentation files (the
+  "Software"), to deal in the Software without restriction, including
+  without limitation the rights to use, copy, modify, merge, publish,
+  distribute, sublicense, and/or sell copies of the Software, and to
+  permit persons to whom the Software is furnished to do so, subject to
+  the following conditions:
+
+  The above copyright notice and this permission notice shall be
+  included in all copies or substantial portions of the Software.
+
+  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 AND
+  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+The Debian packaging is (C) 2008, Stephan Peijnik <debian@sp.or.at> and
+is licensed under the same license as foolscap, see the license text included
+above for more information.
--- foolscap-0.5.0+dfsg.orig/debian/rules
+++ foolscap-0.5.0+dfsg/debian/rules
@@ -0,0 +1,70 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p' | sed -rne 's,(.*)\+dfsg,\1,p')
+PYVERS=$(shell pyversions -vr)
+
+# if $py_setup_install_args will contain "--install-layout=deb" dist-packages
+# will be used instead of site-packages for Python >= 2.6;
+# --install-layout=deb and python.mk are available since python >= 2.5.4-1~,
+# here's backwards compatible code:
+-include /usr/share/python/python.mk
+ifeq (,$(py_libdir))
+    py_libdir = /usr/lib/python$(subst python,,$(1))/site-packages
+endif
+
+get-orig-source:
+	uscan --force-download --destdir=. --rename \
+		--download-version=$(DEB_UPSTREAM_VERSION)
+
+	tar xzf foolscap_$(DEB_UPSTREAM_VERSION).orig.tar.gz
+
+	# Remove unused misc/testutils directory.
+	rm -rf foolscap-$(DEB_UPSTREAM_VERSION)/misc/testutils/
+
+	tar czf foolscap_$(DEB_UPSTREAM_VERSION)+dfsg.orig.tar.gz foolscap-$(DEB_UPSTREAM_VERSION)
+	rm -rf foolscap-$(DEB_UPSTREAM_VERSION)
+	rm -f foolscap_$(DEB_UPSTREAM_VERSION).orig.tar.gz
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -rf $(CURDIR)/build
+	find $(CURDIR) -name '*\.py[co]' -delete
+	dh_clean $(PYVERS:%=install-python%)
+
+build:
+
+install: build $(PYVERS:%=install-python%)
+
+install-python%:
+	python$* setup.py install --root $(CURDIR)/debian/python-foolscap \
+		--single-version-externally-managed $(py_setup_install_args)
+	# No need to include the unit tests in the deb file.
+	rm -rf $(CURDIR)/debian/python-foolscap/$(call py_libdir,$*)/foolscap/test
+	touch $@
+
+# Build architecture-independent files here.
+binary-indep: build install
+	dh_testdir -i
+	dh_testroot -i
+	dh_install -i
+	dh_installchangelogs -i NEWS
+	dh_installdocs -i README
+	dh_installman -i
+	dh_pysupport -i
+	dh_compress -i -X.py -X.xhtml -X.txt
+	dh_fixperms -i
+	dh_installdeb -i
+	dh_gencontrol -i
+	dh_md5sums -i
+	dh_builddeb -i
+
+binary-arch:
+# We have nothing to do by default.
+
+binary: binary-indep binary-arch
+.PHONY: get-orig-source build clean binary-indep binary-arch install
--- foolscap-0.5.0+dfsg.orig/debian/docs
+++ foolscap-0.5.0+dfsg/debian/docs
@@ -0,0 +1,2 @@
+README
+doc/
--- foolscap-0.5.0+dfsg.orig/debian/compat
+++ foolscap-0.5.0+dfsg/debian/compat
@@ -0,0 +1 @@
+5
--- foolscap-0.5.0+dfsg.orig/debian/control
+++ foolscap-0.5.0+dfsg/debian/control
@@ -0,0 +1,22 @@
+Source: foolscap
+Section: python
+Priority: optional
+Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>
+Uploaders: Stephan Peijnik <debian@sp.or.at>
+Build-Depends: debhelper (>= 5)
+Build-Depends-Indep: python-all (>= 2.5.4-1~), python-support (>= 0.6.4), python-openssl, python-twisted-core, python-twisted-web, python-setuptools
+XS-Python-Version: all
+Standards-Version: 3.8.3
+Homepage: http://foolscap.lothar.com/
+Vcs-Svn: svn://svn.debian.org/python-modules/packages/foolscap/trunk/
+Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/foolscap/trunk/
+
+Package: python-foolscap
+Architecture: all
+Depends: ${misc:Depends}, ${python:Depends}, python-twisted-core, python-twisted-web, python-zope.interface
+Recommends: python-twisted-names, python-openssl (>= 0.6)
+XB-Python-Version: ${python:Versions}
+Description: object-capability-based RPC system for Twisted Python
+ Foolscap (also known as "newpb") contains a new RPC system for Twisted Python,
+ combining capability-based security, secure references, flexible 
+ serialization, and technology to mitigate resource-consumption attacks.
--- foolscap-0.5.0+dfsg.orig/debian/flogtool.1
+++ foolscap-0.5.0+dfsg/debian/flogtool.1
@@ -0,0 +1,45 @@
+.TH FLOGTOOL 1 "September 21, 2008" "" ""
+.SH NAME
+\fBflogtool \- foolscap log tool
+.SH SYNOPSIS
+.nf
+.fam C
+\fBflogtool\fP (tail|create-gatherer|dump|filter|web-viewer)
+.fam T
+.fi
+.SH DESCRIPTION
+flogtool is an interface to the logging capabilities in the
+\fBpython-foolscap\fP package.
+.PP
+The available options are described below.
+.SH OPTIONS
+.TP
+.B
+tail
+follow logs of the target node
+.TP
+.B
+create-gatherer
+Make a .tac file which will record all logs to a given directory.
+.TP
+.B
+create-incident-gatherer
+Make a .tac file which will record all incidents to a given directory
+.TP
+.B
+dump
+Dump the logs recorded by 'flogtool gather'.
+.TP
+.B
+filter
+Produce a new file with a subset of the events from another file.
+.TP
+.B
+web-viewer
+View the logs through a web page.
+.SH AUTHOR
+\fBflogtool\fP is a tool that ships with foolscap, created by
+Brian Warner.
+.PP
+This manual page was written by Stephan Peijnik <debian@sp.or.at>,
+for the Debian project (but may be used by others).
--- foolscap-0.5.0+dfsg.orig/debian/watch
+++ foolscap-0.5.0+dfsg/debian/watch
@@ -0,0 +1,3 @@
+version=3
+opts=dversionmangle=s/\+dfsg$// \
+     http://foolscap.lothar.com/releases/foolscap-(.*)\.tar\.gz
--- foolscap-0.5.0+dfsg.orig/debian/changelog
+++ foolscap-0.5.0+dfsg/debian/changelog
@@ -0,0 +1,40 @@
+foolscap (0.5.0+dfsg-1) unstable; urgency=low
+
+  [ Elliot Murphy ]
+  * New upstream release (Closes: #567145)
+  * Depend on python-zope.interface now
+  * Added misc-depends.
+  * Added man page for flappclient.
+
+ -- Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>  Thu, 28 Jan 2010 15:56:46 -0500
+
+foolscap (0.4.2+dfsg-1) unstable; urgency=low
+
+  [ Stephan Peijnik ]
+  * New upstream release (0.4.0)
+  * Switched to python-support
+  * Bumped Standards-Version to 3.8.1, no changes needed
+  * Documentation should not end up in /usr/share/python-foolscap anymore, but
+    /usr/share/python-foolscap/doc now.
+  * Added dependency on python-all (>= 2.5.4-1~).
+  * Using py_libdir in debian/rules now.
+  * Not using hardcoded python2.5 in debian/rules anymore.
+
+  [ Piotr Ożarowski ]
+  * New upstream release (0.4.2) (Closes: #542876)
+  * Bumped Standards-Version to 3.8.3, no changes needed
+
+ -- Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>  Thu, 27 Aug 2009 00:03:29 +0200
+
+foolscap (0.3.2.dfsg-2) unstable; urgency=low
+
+  * Fixed missing build dependency on python-setuptools (Closes: #510901).
+
+ -- Stephan Peijnik <debian@sp.or.at>  Wed, 07 Jan 2009 00:04:08 +0100
+
+foolscap (0.3.2.dfsg-1) unstable; urgency=low
+
+  * Initial release (Closes: #499699)
+  * Remove misc/testutils directory from source tarball in get-orig-sources.
+
+ -- Stephan Peijnik <debian@sp.or.at>  Wed, 10 Dec 2008 00:33:43 +0100
--- foolscap-0.5.0+dfsg.orig/debian/flappserver.1
+++ foolscap-0.5.0+dfsg/debian/flappserver.1
@@ -0,0 +1,54 @@
+.TH FLAPPSERVER 1
+.SH NAME
+flappserver \- foolscap server
+.SH SYNOPSYS
+.nf
+.fam C
+\fbflappserver\fP (create|add|list|start|stop)
+.fam T
+.fi
+.SH DESCRIPTION
+This command controls a foolscap application server or 'flappserver'. It
+fulfills the same role as "twistd" does for Twisted code: allows sysadmins
+to configure and launch services without obligating them to write Python
+code for each one.
+.PP
+The options are described below.
+.SH OPTIONS
+.TP
+.B
+create
+Create a new app server.
+.TP
+.B
+add
+Add new service to an app server.
+.TP
+.B
+list
+List services in an app server.
+.TP
+.B
+start
+Launch an app server.
+.TP
+.B
+stop
+Shut down an app server.
+.TP
+.B
+restart
+First stop, if necessary, then start a server.
+.TP
+.B
+version
+Show the version.
+.TP
+.B
+help
+Show the embedded help.
+.SH AUTHOR
+\fBflappserver\fP is a tool that ships with foolscap, created by Brian Warner.
+.PP
+This manual page was written by Elliot Murphy <elliot@ubuntu.com>, for the Debian
+project (but may be used by others).
--- foolscap-0.5.0+dfsg.orig/debian/manpages
+++ foolscap-0.5.0+dfsg/debian/manpages
@@ -0,0 +1,3 @@
+debian/flogtool.1
+debian/flappclient.1
+debian/flappserver.1
--- foolscap-0.5.0+dfsg.orig/debian/flappclient.1
+++ foolscap-0.5.0+dfsg/debian/flappclient.1
@@ -0,0 +1,39 @@
+.TH FLAPPCLIENT 1
+.SH NAME
+flappclient \- foolscap client
+.SH SYNOPSYS
+.nf
+.fam C
+\fbflappclient\fP (upload-file|run-command)
+.fam T
+.fi
+.SH DESCRIPTION
+This client invokes a remote services that is running as part of a 'flappserver'.
+Each service lives at the specific secret FURL, which starts with 'pb://'. This
+FURL can be passed on the command line with --furl=FURL, or it can be stored in
+a file (along with the comment lines that start with '#') and passed with
+--furlfile=FILE.
+.PP
+The options are described below.
+.SH OPTIONS
+.TP
+.B
+furl
+FURL of the service to contact.
+.TP
+.B
+furlfile
+File containing the FURL of the service.
+.TP
+.B
+version
+Show the version.
+.TP
+.B
+help
+Show the embedded help.
+.SH AUTHOR
+\fBflappclient\fP is a tool that ships with foolscap, created by Brian Warner.
+.PP
+This manual page was written by Elliot Murphy <elliot@ubuntu.com>, for the Debian
+project (but may be used by others).
