--- /dev/null
+Description: Fix python script shebangs to comply with Debian policy
+Author: Michael McMaster <michael@codesrc.com>
+Last-Update: 2011-06-02
+
+Index: python-pygresql-4.0/pg.py
+===================================================================
+--- python-pygresql-4.0.orig/pg.py 2011-06-02 21:07:29.000000000 +1000
++++ python-pygresql-4.0/pg.py 2011-06-02 21:08:05.000000000 +1000
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python
+ #
+ # pg.py
+ #
+Index: python-pygresql-4.0/pgdb.py
+===================================================================
+--- python-pygresql-4.0.orig/pgdb.py 2011-06-02 21:07:35.000000000 +1000
++++ python-pygresql-4.0/pgdb.py 2011-06-02 21:07:58.000000000 +1000
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python
+ #
+ # pgdb.py
+ #
+Index: python-pygresql-4.0/setup.py
+===================================================================
+--- python-pygresql-4.0.orig/setup.py 2011-06-02 21:07:41.000000000 +1000
++++ python-pygresql-4.0/setup.py 2011-06-02 21:10:18.000000000 +1000
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python
+ # $Id: setup.py,v 1.27 2008/11/21 17:08:17 cito Exp $
+
+ """Setup script for PyGreSQL version 4.0
+Index: python-pygresql-4.0/tutorial/advanced.py
+===================================================================
+--- python-pygresql-4.0.orig/tutorial/advanced.py 2011-06-02 21:07:50.000000000 +1000
++++ python-pygresql-4.0/tutorial/advanced.py 2011-06-02 21:08:14.000000000 +1000
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#! /usr/bin/python
+ # advanced.py - demo of advanced features of PostGres. Some may not be ANSI.
+ # inspired from the Postgres tutorial
+ # adapted to Python 1995 by Pascal Andre
+Index: python-pygresql-4.0/tutorial/basics.py
+===================================================================
+--- python-pygresql-4.0.orig/tutorial/basics.py 2011-06-02 21:07:50.000000000 +1000
++++ python-pygresql-4.0/tutorial/basics.py 2011-06-02 21:08:19.000000000 +1000
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#! /usr/bin/python
+ # basics.py - basic SQL commands tutorial
+ # inspired from the Postgres95 tutorial
+ # adapted to Python 1995 by Pascal ANDRE
+Index: python-pygresql-4.0/tutorial/func.py
+===================================================================
+--- python-pygresql-4.0.orig/tutorial/func.py 2011-06-02 21:07:50.000000000 +1000
++++ python-pygresql-4.0/tutorial/func.py 2011-06-02 21:10:02.000000000 +1000
+@@ -1,3 +1,4 @@
++#! /usr/bin/python
+ # func.py - demonstrate the use of SQL functions
+ # inspired from the PostgreSQL tutorial
+ # adapted to Python 1995 by Pascal ANDRE
+Index: python-pygresql-4.0/tutorial/syscat.py
+===================================================================
+--- python-pygresql-4.0.orig/tutorial/syscat.py 2011-06-02 21:07:50.000000000 +1000
++++ python-pygresql-4.0/tutorial/syscat.py 2011-06-02 21:10:06.000000000 +1000
+@@ -1,3 +1,4 @@
++#! /usr/bin/python
+ # syscat.py - parses some system catalogs
+ # inspired from the PostgreSQL tutorial
+ # adapted to Python 1995 by Pascal ANDRE
+++ /dev/null
---- pygresql-4.0.orig/setup.py
-+++ pygresql-4.0/setup.py
-@@ -92,12 +92,13 @@
- os.rmdir('include')
-
- pg_include_dir = pg_config('includedir')
--pg_include_dir_server = pg_config('includedir-server')
-+#pg_include_dir_server = pg_config('includedir-server')
-
--rm_include()
--mk_include()
-+#rm_include()
-+#mk_include()
-
--include_dirs = ['include', pg_include_dir, pg_include_dir_server]
-+#include_dirs = ['include', pg_include_dir, pg_include_dir_server]
-+include_dirs = ['include', pg_include_dir]
-
- pg_libdir = pg_config('libdir')
- library_dirs = [pg_libdir]
---- pygresql-4.0.orig/debian/compat
-+++ pygresql-4.0/debian/compat
-@@ -0,0 +1 @@
-+5
---- pygresql-4.0.orig/debian/rules
-+++ pygresql-4.0/debian/rules
-@@ -0,0 +1,88 @@
-+#!/usr/bin/make -f
-+# -*- makefile -*-
-+# Sample debian/rules that uses debhelper.
-+# GNU copyright 1997 to 1999 by Joey Hess.
-+#
-+# Modified to make a template file for a multi-binary package with separated
-+# build-arch and build-indep targets by Bill Allombert 2001
-+
-+# Uncomment this to turn on verbose mode.
-+#export DH_VERBOSE=1
-+
-+# This has to be exported to make some magic below work.
-+export DH_OPTIONS
-+
-+CFLAGS = -Wall -g
-+
-+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-+ CFLAGS += -O0
-+else
-+ CFLAGS += -O2
-+endif
-+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
-+ INSTALL_PROGRAM += -s
-+endif
-+
-+PYVERS=$(shell pyversions -vs)
-+PYVER := $(shell python -c 'import sys; print sys.version[:3]')
-+
-+build: build-arch
-+build-arch: build-arch-stamp
-+build-arch-stamp:
-+ set -e; \
-+ for v in $(PYVERS); do \
-+ python$$v setup.py build; \
-+ python$$v-dbg setup.py build; \
-+ done
-+ touch build-arch-stamp
-+
-+clean:
-+ dh_testdir
-+ dh_testroot
-+ rm -f build-arch-stamp
-+ rm -rf build
-+ dh_clean
-+
-+install:
-+ dh_testdir
-+ dh_testroot
-+ dh_clean -k
-+ dh_installdirs -a
-+
-+ set -e; \
-+ for v in $(PYVERS); do \
-+ python$$v setup.py install \
-+ --root=$(CURDIR)/debian/python-pygresql --install-layout=deb; \
-+ python$$v-dbg setup.py install \
-+ --root=$(CURDIR)/debian/python-pygresql-dbg --install-layout=deb; \
-+ done
-+ find debian -name '*.py[co]' | xargs -r rm -f
-+ find debian/python-pygresql-dbg ! -type d ! -name '*_d.so' | xargs rm -f
-+ find debian/python-pygresql-dbg -depth -empty -exec rmdir {} \;
-+
-+# Build architecture independant packages using the common target.
-+binary-indep:
-+# nothing to do
-+
-+# Build architecture dependant packages using the common target.
-+binary-arch: build-arch install
-+ dh_testdir
-+ dh_testroot
-+ dh_installchangelogs docs/changelog.txt
-+ dh_installdocs docs/* tutorial
-+ rm -f debian/python-pygresql/usr/share/doc/python-pygresql/changelog.txt
-+ dh_installexamples
-+ dh_strip -ppython-pygresql --dbg-package=python-pygresql-dbg
-+ rm -rf debian/python-pygresql-dbg/usr/share/doc/python-pygresql-dbg
-+ ln -s python-pygresql debian/python-pygresql-dbg/usr/share/doc/python-pygresql-dbg
-+ dh_compress -X.py -X.html
-+ dh_fixperms
-+ dh_python2
-+ dh_installdeb
-+ dh_shlibdeps
-+ dh_gencontrol
-+ dh_md5sums
-+ dh_builddeb
-+
-+binary: binary-arch binary-indep
-+.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure
---- pygresql-4.0.orig/debian/control
-+++ pygresql-4.0/debian/control
-@@ -0,0 +1,34 @@
-+Source: pygresql
-+Section: python
-+Priority: optional
-+Maintainer: Debian QA Group <packages@qa.debian.org>
-+Build-Depends: debhelper (>= 7), python-all-dev (>= 2.6.6-14), python-all-dbg, libpq-dev, libssl-dev
-+Build-Conflicts: python-setuptools
-+XS-Python-Version: all
-+Standards-Version: 3.9.1
-+
-+Package: python-pygresql
-+Architecture: any
-+Depends: ${python:Depends}, python-egenix-mxdatetime, ${shlibs:Depends}, ${misc:Depends}
-+Conflicts: python2.3-pygresql, python2.4-pygresql
-+Replaces: python2.3-pygresql, python2.4-pygresql
-+Provides: ${python:Provides}, python-pg
-+Suggests: python-pygresql-dbg
-+XB-Python-Version: ${python:Versions}
-+Description: PostgreSQL module for Python
-+ PyGreSQL is a Python module that interfaces to a PostgreSQL database. It
-+ embeds the PostgreSQL query library to allow easy use of the powerful
-+ PostgreSQL features from a Python script.
-+
-+Package: python-pygresql-dbg
-+Section: debug
-+Priority: extra
-+Architecture: any
-+Depends: python-pygresql (= ${binary:Version}), python-dbg, ${shlibs:Depends}, python-egenix-mxdatetime-dbg, ${misc:Depends}
-+Provides: python-pg
-+Description: PostgreSQL module for Python (debug extension)
-+ PyGreSQL is a Python module that interfaces to a PostgreSQL database. It
-+ embeds the PostgreSQL query library to allow easy use of the powerful
-+ PostgreSQL features from a Python script.
-+ .
-+ This package contains the extension built for the Python debug interpreter.
---- pygresql-4.0.orig/debian/copyright
-+++ pygresql-4.0/debian/copyright
-@@ -0,0 +1,32 @@
-+This package was debianized by Matthias Klose <doko@debian.org> on
-+Sat, 10 Jan 2004 19:26:26 +0100.
-+
-+It was downloaded from http://www.druid.net/pygresql
-+
-+Upstream Authors:
-+ Written by D'Arcy J.M. Cain, darcy@druid.net
-+ Based heavily on code written by Pascal Andre, andre@chimay.via.ecp.fr.
-+
-+Copyright:
-+
-+Copyright (c) 1995, Pascal ANDRE (andre@via.ecp.fr)<BR>
-+
-+Permission to use, copy, modify, and distribute this software and its
-+documentation for any purpose, without fee, and without a written agreement
-+is hereby granted, provided that the above copyright notice and this
-+paragraph and the following two paragraphs appear in all copies or in any
-+new file that contains a substantial portion of this file.
-+
-+IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-+SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-+ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE
-+AUTHOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-+
-+THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED
-+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-+PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE
-+AUTHOR HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
-+ENHANCEMENTS, OR MODIFICATIONS.
-+
-+Further modifications copyright 1997 to 2000 by D'Arcy J.M. Cain
-+(darcy@PyGreSQL.org) subject to the same terms and conditions as above.
---- pygresql-4.0.orig/debian/changelog
-+++ pygresql-4.0/debian/changelog
-@@ -0,0 +1,146 @@
-+pygresql (1:4.0-3) unstable; urgency=low
-+
-+ * Orphan the package.
-+ * Build using dh_python2. Closes: #616968.
-+
-+ -- Matthias Klose <doko@debian.org> Fri, 22 Apr 2011 10:56:38 +0200
-+
-+pygresql (1:4.0-2) unstable; urgency=low
-+
-+ * python-pygresql: Provide python-pg, no need to rename the package.
-+ Closes: #556415.
-+
-+ -- Matthias Klose <doko@debian.org> Tue, 19 Jan 2010 13:53:30 +0100
-+
-+pygresql (1:4.0-1) unstable; urgency=low
-+
-+ * New upstream version.
-+
-+ -- Matthias Klose <doko@debian.org> Sat, 29 Aug 2009 10:12:35 +0200
-+
-+pygresql (1:3.8.1-3) unstable; urgency=low
-+
-+ * Rebuild to move files to /usr/share/pyshared.
-+
-+ -- Matthias Klose <doko@debian.org> Tue, 24 Jun 2008 19:40:43 +0200
-+
-+pygresql (1:3.8.1-2) unstable; urgency=low
-+
-+ * Fix package dependency on libpq. Closes: #430836.
-+ * Merge from Ubuntu: Build a python-pygresql-dbg package.
-+
-+ -- Matthias Klose <doko@debian.org> Thu, 02 Aug 2007 02:07:53 +0200
-+
-+pygresql (1:3.8.1-1) unstable; urgency=low
-+
-+ * New upstream version.
-+ * Convert to updated Python policy. Closes: #373494.
-+
-+ -- Matthias Klose <doko@debian.org> Fri, 16 Jun 2006 21:43:33 +0200
-+
-+pygresql (1:3.8-1.1) unstable; urgency=high
-+
-+ * NMU with the maintainer's permission.
-+ * Urgency high since this only fixes an important bug with a trivial patch.
-+ * pg.py, _quote(): Escape quotes in strings as '', not as \', since the
-+ latter does not work any more with some client encodings with the latest
-+ PostgreSQL (in some multi-byte encodings you can exploit \' escaping to
-+ inject SQL code, see CVE-2006-2314). Closes: #369239
-+
-+ -- Martin Pitt <mpitt@debian.org> Sun, 28 May 2006 17:23:29 +0200
-+
-+pygresql (1:3.8-1) unstable; urgency=low
-+
-+ * New upstream version.
-+
-+ -- Matthias Klose <doko@debian.org> Sun, 5 Mar 2006 10:41:48 +0000
-+
-+pygresql (1:3.7-1) unstable; urgency=low
-+
-+ * New upstream version.
-+
-+ -- Matthias Klose <doko@debian.org> Thu, 22 Sep 2005 06:56:26 +0200
-+
-+pygresql (1:3.6.2-1) unstable; urgency=low
-+
-+ * New upstream version (bug fix release).
-+ * Drop python2.2 package.
-+
-+ -- Matthias Klose <doko@debian.org> Wed, 27 Jul 2005 10:41:38 +0200
-+
-+pygresql (1:3.6.1-1) unstable; urgency=low
-+
-+ * New upstream version.
-+
-+ -- Matthias Klose <doko@debian.org> Sun, 16 Jan 2005 10:33:28 +0100
-+
-+pygresql (1:3.5-4) unstable; urgency=low
-+
-+ * Build python2.4 packages.
-+
-+ -- Matthias Klose <doko@debian.org> Sun, 12 Dec 2004 18:08:35 +0100
-+
-+pygresql (1:3.5-3) unstable; urgency=medium
-+
-+ * Fix typo (closes: #276775).
-+
-+ -- Matthias Klose <doko@debian.org> Sat, 16 Oct 2004 13:49:03 +0200
-+
-+pygresql (1:3.5-2) unstable; urgency=medium
-+
-+ * Fix error using time types (Chad Miller). Closes: #212271.
-+
-+ -- Matthias Klose <doko@debian.org> Fri, 8 Oct 2004 22:24:46 +0200
-+
-+pygresql (1:3.5-1) unstable; urgency=medium
-+
-+ * New upstream version.
-+
-+ -- Matthias Klose <doko@debian.org> Wed, 1 Sep 2004 18:57:04 +0200
-+
-+pygresql (1:3.4-4) unstable; urgency=low
-+
-+ * Add build dependency on python (neeeded for debhelper's dh_python).
-+
-+ -- Matthias Klose <doko@debian.org> Thu, 1 Jul 2004 20:34:38 +0200
-+
-+pygresql (1:3.4-3) unstable; urgency=low
-+
-+ * Fix download URL (closes: #244242).
-+
-+ -- Matthias Klose <doko@debian.org> Tue, 20 Apr 2004 23:56:44 +0200
-+
-+pygresql (1:3.4-2) unstable; urgency=low
-+
-+ * Add upstream README.txt (closes: #244245).
-+ * Remove README.Debian (closes: #244244).
-+ * Fix download location (closes: #244242).
-+
-+ -- Matthias Klose <doko@debian.org> Mon, 19 Apr 2004 07:50:11 +0200
-+
-+pygresql (1:3.4-1) unstable; urgency=low
-+
-+ * New upstream version.
-+ * Build-Depend on versioned libpq-dev to get the correct shlibs dependency.
-+
-+ -- Matthias Klose <doko@debian.org> Sun, 22 Feb 2004 19:10:09 +0100
-+
-+pygresql (1:3.2.90-3) unstable; urgency=low
-+
-+ * Fix installation directory.
-+
-+ -- Matthias Klose <doko@debian.org> Sat, 10 Jan 2004 22:37:02 +0100
-+
-+pygresql (1:3.2.90-2) unstable; urgency=low
-+
-+ * Add dependencies on the python-egenix-mxdatetime module.
-+
-+ -- Matthias Klose <doko@debian.org> Sat, 10 Jan 2004 20:18:59 +0100
-+
-+pygresql (1:3.2.90-1) unstable; urgency=low
-+
-+ * Initial Release, taken from CVS.
-+ * Use the pygresql version number, increase the epoch.
-+
-+ -- Matthias Klose <doko@debian.org> Sat, 10 Jan 2004 19:26:26 +0100
-+
---- pygresql-4.0.orig/debian/watch
-+++ pygresql-4.0/debian/watch
-@@ -0,0 +1,2 @@
-+version=2
-+ftp://ftp.pygresql.org/pub/distrib/PyGreSQL-([\d\.]*)\.tgz