--- xapian-bindings-1.0.7.orig/debian/control.in
+++ xapian-bindings-1.0.7/debian/control.in
@@ -0,0 +1,71 @@
+Source: xapian-bindings
+Section: libs
+Priority: optional
+Maintainer: Olly Betts <olly@survex.com>
+Build-Depends: @BUILD_DEPS@ po-debconf, autotools-dev
+XS-Python-Version: all
+Standards-Version: 3.8.0
+Homepage: http://www.xapian.org/
+
+Package: tclxapian
+Section: libs
+Architecture: any
+Depends: ${tcl:Depends}, ${shlibs:Depends}, ${misc:Depends}
+Suggests: xapian-doc
+Description: Xapian search engine interface for Tcl
+ This package provides Xapian Tcl bindings which should work with any version
+ of Tcl >= 8.1 (by using Tcl's stubs mechanism.)
+ .
+ The Xapian search engine library is a highly adaptable toolkit to allow
+ developers to easily add advanced indexing and search facilities to their own
+ applications.  It implements the probabilistic model of information retrieval,
+ and provides facilities for performing ranked free-text searches, relevance
+ feedback, phrase searching, boolean searching, stemming, and simultaneous
+ update and searching.  It is highly scalable, and is capable of working with
+ collections containing hundreds of millions of documents.
+ .
+ The Xapian Tcl bindings provide an interface to the Xapian library from the
+ Tcl programming language, allowing both indexing and retrieval operations.
+
+Package: libxapian-ruby1.8
+Section: libs
+Architecture: any
+Depends: ${ruby:Depends}, ${shlibs:Depends}, ${misc:Depends}
+Suggests: xapian-doc
+Description: Xapian search engine interface for Ruby 1.8
+ This package provides Xapian Ruby bindings built for Ruby 1.8.
+ .
+ The Xapian search engine library is a highly adaptable toolkit to allow
+ developers to easily add advanced indexing and search facilities to their own
+ applications.  It implements the probabilistic model of information retrieval,
+ and provides facilities for performing ranked free-text searches, relevance
+ feedback, phrase searching, boolean searching, stemming, and simultaneous
+ update and searching.  It is highly scalable, and is capable of working with
+ collections containing hundreds of millions of documents.
+ .
+ The Xapian Ruby bindings provide an interface to the Xapian library from the
+ Ruby programming language, allowing both indexing and retrieval operations.
+
+Package: python-xapian
+Section: python
+Architecture: any
+Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends}
+Suggests: xapian-doc
+Conflicts: @PYTHON_OLD_PACKAGES@
+Replaces: @PYTHON_OLD_PACKAGES@
+Provides: ${python:Provides}
+XB-Python-Version: ${python:Versions}
+Description: Xapian search engine interface for Python
+ This package provides Xapian Python bindings for all the packaged versions
+ of Python.
+ .
+ The Xapian search engine library is a highly adaptable toolkit to allow
+ developers to easily add advanced indexing and search facilities to their own
+ applications.  It implements the probabilistic model of information retrieval,
+ and provides facilities for performing ranked free-text searches, relevance
+ feedback, phrase searching, boolean searching, stemming, and simultaneous
+ update and searching.  It is highly scalable, and is capable of working with
+ collections containing hundreds of millions of documents.
+ .
+ The Xapian Python bindings provide an interface to the Xapian library from the
+ Python programming language, allowing both indexing and retrieval operations.
--- xapian-bindings-1.0.7.orig/debian/libxapian-ruby1.8.install
+++ xapian-bindings-1.0.7/debian/libxapian-ruby1.8.install
@@ -0,0 +1,3 @@
+usr/lib/ruby/1.8
+usr/share/doc/xapian-bindings/ruby/* usr/share/doc/libxapian-ruby1.8
+usr/share/doc/xapian-bindings/ruby/examples/*.rb usr/share/doc/libxapian-ruby1.8/examples
--- xapian-bindings-1.0.7.orig/debian/control-php.in
+++ xapian-bindings-1.0.7/debian/control-php.in
@@ -0,0 +1,19 @@
+
+Package: php@PHP_VERSION@-xapian
+Section: web
+Architecture: any
+Depends: ${php@PHP_VERSION@:Depends}, ${shlibs:Depends}, ${misc:Depends}
+Suggests: xapian-doc
+Description: Xapian search engine interface for PHP@PHP_VERSION@
+ This package provides Xapian PHP bindings built for PHP@PHP_VERSION@.
+ .
+ The Xapian search engine library is a highly adaptable toolkit to allow
+ developers to easily add advanced indexing and search facilities to their own
+ applications.  It implements the probabilistic model of information retrieval,
+ and provides facilities for performing ranked free-text searches, relevance
+ feedback, phrase searching, boolean searching, stemming, and simultaneous
+ update and searching.  It is highly scalable, and is capable of working with
+ collections containing hundreds of millions of documents.
+ .
+ The Xapian PHP bindings provide an interface to the Xapian library from PHP,
+ allowing both indexing and retrieval operations.
--- xapian-bindings-1.0.7.orig/debian/control
+++ xapian-bindings-1.0.7/debian/control
@@ -0,0 +1,109 @@
+Source: xapian-bindings
+Section: libs
+Priority: optional
+Maintainer: Olly Betts <olly@survex.com>
+Build-Depends: debhelper (>= 5.0.37.1), python (>= 2.3.5-7), python-central (>= 0.4.10), python-all-dev, php4-dev [!hurd-i386], php5-dev [!hurd-i386], php4-cli [!hurd-i386], php5-cli [!hurd-i386], tcl8.4-dev, ruby1.8-dev, ruby1.8, libxapian-dev (>= 1.0.7), libxapian-dev (<< 1.1.0), po-debconf, autotools-dev
+XS-Python-Version: all
+Standards-Version: 3.8.0
+Homepage: http://www.xapian.org/
+
+Package: tclxapian
+Section: libs
+Architecture: any
+Depends: ${tcl:Depends}, ${shlibs:Depends}, ${misc:Depends}
+Suggests: xapian-doc
+Description: Xapian search engine interface for Tcl
+ This package provides Xapian Tcl bindings which should work with any version
+ of Tcl >= 8.1 (by using Tcl's stubs mechanism.)
+ .
+ The Xapian search engine library is a highly adaptable toolkit to allow
+ developers to easily add advanced indexing and search facilities to their own
+ applications.  It implements the probabilistic model of information retrieval,
+ and provides facilities for performing ranked free-text searches, relevance
+ feedback, phrase searching, boolean searching, stemming, and simultaneous
+ update and searching.  It is highly scalable, and is capable of working with
+ collections containing hundreds of millions of documents.
+ .
+ The Xapian Tcl bindings provide an interface to the Xapian library from the
+ Tcl programming language, allowing both indexing and retrieval operations.
+
+Package: libxapian-ruby1.8
+Section: libs
+Architecture: any
+Depends: ${ruby:Depends}, ${shlibs:Depends}, ${misc:Depends}
+Suggests: xapian-doc
+Description: Xapian search engine interface for Ruby 1.8
+ This package provides Xapian Ruby bindings built for Ruby 1.8.
+ .
+ The Xapian search engine library is a highly adaptable toolkit to allow
+ developers to easily add advanced indexing and search facilities to their own
+ applications.  It implements the probabilistic model of information retrieval,
+ and provides facilities for performing ranked free-text searches, relevance
+ feedback, phrase searching, boolean searching, stemming, and simultaneous
+ update and searching.  It is highly scalable, and is capable of working with
+ collections containing hundreds of millions of documents.
+ .
+ The Xapian Ruby bindings provide an interface to the Xapian library from the
+ Ruby programming language, allowing both indexing and retrieval operations.
+
+Package: python-xapian
+Section: python
+Architecture: any
+Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends}
+Suggests: xapian-doc
+Conflicts: python2.1-xapian (<< 0.9.6-3), python2.2-xapian (<< 0.9.6-3), python2.3-xapian (<< 0.9.6-3), python2.4-xapian (<< 0.9.6-3)
+Replaces: python2.1-xapian (<< 0.9.6-3), python2.2-xapian (<< 0.9.6-3), python2.3-xapian (<< 0.9.6-3), python2.4-xapian (<< 0.9.6-3)
+Provides: ${python:Provides}
+XB-Python-Version: ${python:Versions}
+Description: Xapian search engine interface for Python
+ This package provides Xapian Python bindings for all the packaged versions
+ of Python.
+ .
+ The Xapian search engine library is a highly adaptable toolkit to allow
+ developers to easily add advanced indexing and search facilities to their own
+ applications.  It implements the probabilistic model of information retrieval,
+ and provides facilities for performing ranked free-text searches, relevance
+ feedback, phrase searching, boolean searching, stemming, and simultaneous
+ update and searching.  It is highly scalable, and is capable of working with
+ collections containing hundreds of millions of documents.
+ .
+ The Xapian Python bindings provide an interface to the Xapian library from the
+ Python programming language, allowing both indexing and retrieval operations.
+
+Package: php4-xapian
+Section: web
+Architecture: any
+Depends: ${php4:Depends}, ${shlibs:Depends}, ${misc:Depends}
+Suggests: xapian-doc
+Description: Xapian search engine interface for PHP4
+ This package provides Xapian PHP bindings built for PHP4.
+ .
+ The Xapian search engine library is a highly adaptable toolkit to allow
+ developers to easily add advanced indexing and search facilities to their own
+ applications.  It implements the probabilistic model of information retrieval,
+ and provides facilities for performing ranked free-text searches, relevance
+ feedback, phrase searching, boolean searching, stemming, and simultaneous
+ update and searching.  It is highly scalable, and is capable of working with
+ collections containing hundreds of millions of documents.
+ .
+ The Xapian PHP bindings provide an interface to the Xapian library from PHP,
+ allowing both indexing and retrieval operations.
+
+Package: php5-xapian
+Section: web
+Architecture: any
+Depends: ${php5:Depends}, ${shlibs:Depends}, ${misc:Depends}
+Suggests: xapian-doc
+Description: Xapian search engine interface for PHP5
+ This package provides Xapian PHP bindings built for PHP5.
+ .
+ The Xapian search engine library is a highly adaptable toolkit to allow
+ developers to easily add advanced indexing and search facilities to their own
+ applications.  It implements the probabilistic model of information retrieval,
+ and provides facilities for performing ranked free-text searches, relevance
+ feedback, phrase searching, boolean searching, stemming, and simultaneous
+ update and searching.  It is highly scalable, and is capable of working with
+ collections containing hundreds of millions of documents.
+ .
+ The Xapian PHP bindings provide an interface to the Xapian library from PHP,
+ allowing both indexing and retrieval operations.
--- xapian-bindings-1.0.7.orig/debian/php5-xapian.install
+++ xapian-bindings-1.0.7/debian/php5-xapian.install
@@ -0,0 +1,5 @@
+usr/lib/php5/*/xapian.so
+usr/share/php/xapian.php
+usr/share/doc/xapian-bindings/php/index.html usr/share/doc/php5-xapian
+usr/share/doc/xapian-bindings/php/examples/*.php5 usr/share/doc/php5-xapian/examples
+etc/php5/conf.d/xapian.ini
--- xapian-bindings-1.0.7.orig/debian/php4-xapian.postinst
+++ xapian-bindings-1.0.7/debian/php4-xapian.postinst
@@ -0,0 +1,32 @@
+#!/bin/sh -e
+
+# Major version of PHP we're installing for.
+PHP_VERSION=4
+
+# Source the debconf library.
+. /usr/share/debconf/confmodule
+
+# Check package is being configured and that this is an upgrade from a version
+# prior to 1.0.1-0 (-0 to allow for the stable backport).  If it is, we (or the
+# user) might have modified php.ini so check for and remove
+# "extension=xapian.so".
+if [ "$1" = configure ] && dpkg --compare-versions "$2" lt-nl 1.0.1-0 ; then
+  # Check php.ini files for any installed variant of this version of PHP.
+  for ppkg in apache apache2 cgi cli ; do
+    ini=/etc/php$PHP_VERSION/$ppkg/php.ini
+    if [ -f "$ini" ]; then
+      if grep -q '^[[:space:]]*extension[[:space:]]*=[[:space:]]*xapian\.so\>' "$ini" ; then
+	sed 's/^[[:space:]]*extension[[:space:]]*=[[:space:]]*xapian\.so\>/#&/' "$ini" > "$ini.dpkg-tmp"
+	ln "$ini" "$ini.dpkg-old"
+	mv "$ini.dpkg-tmp" "$ini"
+      fi
+    fi
+  done
+fi
+
+# dh_installdeb will replace the magic cookie below with any postinst actions
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
--- xapian-bindings-1.0.7.orig/debian/rules
+++ xapian-bindings-1.0.7/debian/rules
@@ -0,0 +1,377 @@
+#!/usr/bin/make -f
+#
+# Copyright (C) 2004,2005,2006 Lemur Consulting Ltd
+# Copyright (C) 2006,2007,2008 Olly Betts
+#
+# 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
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
+# USA
+
+# Codename we're building packages for.  If not explicitly specified, default
+# to that named in debian/codename and if that's not given, use "sid".
+CODENAME ?= $(shell cat debian/codename 2>/dev/null||echo sid)
+
+# Version without the "-N" suffix.
+XAPIAN_VERSION := $(shell sed 's/.*(\([^-]*\)\(-.*\)*).*/\1/;q' debian/changelog)
+
+# The next incompatible version - i.e. the first release of the next release
+# branch.  So for XAPIAN_VERSION "1.0.<n>", this should be "1.1.0".
+XAPIAN_VERSION_CEILING := $(shell echo '$(XAPIAN_VERSION)'|awk -F. '{print $$1"."$$2+1".0"}')
+
+# `--exclude=.EXT' arguments to pass dh_install
+DH_INSTALL_EXCLUDE := --exclude=.pyc --exclude=.pyo
+
+# Debian "etch" (and later), and Ubuntu "edgy" (and later) have pyversions.
+USE_PYVERSIONS := no
+ifeq ($(findstring .$(CODENAME)., .sarge.dapper.), )
+USE_PYVERSIONS := yes
+endif
+
+ifeq ($(USE_PYVERSIONS), yes)
+
+# The python versions to build for:
+PYTHON_VERSIONS := $(shell pyversions -r debian/control)
+ifeq ($(PYTHON_VERSIONS), )
+PYTHON_VERSIONS := python2.3 python2.4
+endif
+# python >= 2.3.5-7 is required for the pyversions command.
+BUILD_DEPS := debhelper (>= 5.0.37.1), python (>= 2.3.5-7), python-central (>= 0.4.10), python-all-dev,
+
+else
+
+# When we finally drop support for both sarge and dapper, we can remove this
+# branch as all newer distros have pyversions.  On dapper, python2.2 is in
+# universe and 2.3 and 2.4 are available, so we could drop 2.2 support if
+# necessary.
+
+# The python versions to build for (Debian sarge also has Python 2.1, but
+# xapian-bindings now requires at least Python 2.2):
+PYTHON_VERSIONS := python2.2 python2.3 python2.4
+
+# We need python itself for dh_python to work.
+BUILD_DEPS := debhelper (>= 4.1.67), python, $(PYTHON_VERSIONS:%=%-dev,)
+
+endif
+
+# The PHP versions to build for:
+ifeq ($(CODENAME), sarge)
+# Debian sarge doesn't have PHP5.
+PHP_VERSIONS := 4
+DH_INSTALL_EXCLUDE += --exclude=.php5
+else
+ifneq ($(findstring .$(CODENAME)., .etch.dapper.edgy.), )
+PHP_VERSIONS := 4 5
+else
+# PHP4 support was dropped in Debian sid (and lenny) and Ubuntu feisty.
+PHP_VERSIONS := 5
+DH_INSTALL_EXCLUDE += --exclude=.php4
+endif
+endif
+
+# We'll need this if we ever generate different .py modules for different
+# supported python versions.
+#export DH_PYCENTRAL=nomove
+
+export DH_OPTIONS
+
+export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
+    confflags += --build $(DEB_HOST_GNU_TYPE)
+else
+    confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
+    # Disable the testsuite when cross-compiling.
+    DEB_BUILD_OPTIONS += nocheck
+endif
+
+# Handle DEB_BUILD_OPTIONS.  Note that dh_strip handles nostrip for us.
+ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
+    confflags += CFLAGS=-O0 CXXFLAGS=-O0
+else
+    confflags += CFLAGS=-O2 CXXFLAGS=-O2
+endif
+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+    NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+    MAKEFLAGS += -j$(NUMJOBS)
+endif
+ifneq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+    MAKE_CHECK := :
+else
+    MAKE_CHECK := make check
+endif
+
+# Python versions which had packages before the Python policy transition.
+PYTHON_OLD_VERSIONS := 2.1 2.2 2.3 2.4
+# For use in Conflicts: and Replaces:
+PYTHON_XAPIAN_TOO_OLD := (<< 0.9.6-3)
+PYTHON_OLD_PACKAGES := $(shell echo "$(PYTHON_OLD_VERSIONS:%=python%-xapian $(PYTHON_XAPIAN_TOO_OLD),)"|sed 's/,$$//')
+
+# Build depends for PHP.  We need phpN-cli so we can run "make check" on
+# the bindings and to get the phpapi version we need to depend on.
+#
+# Currently hurd-i386 doesn't have any PHP packages, but that's no reason to
+# prevent python/tcl/ruby-loving hurd users having packaged xapian bindings.
+# Note that we check for /usr/bin/php-configN before trying to build PHP
+# bindings below.
+#
+# Only the first % in the replacement part is substituted, so we need to do
+# this in two goes.
+BUILD_DEPS += $(PHP_VERSIONS:%=php%-dev [!hurd-i386],)
+BUILD_DEPS += $(PHP_VERSIONS:%=php%-cli [!hurd-i386],)
+
+# Build depends for Tcl.  We use Tcl's stubs mechanism, so the built
+# bindings will work with any Tcl version from 8.0.6 upwards, whichever
+# version they were built against.
+#
+ifeq ($(findstring .$(CODENAME)., .sarge.etch.dapper.edgy.feisty.gutsy.), )
+# lenny/hardy onwards have a "tcl-dev" dummy package which pulls in the package
+# for the current preferred version.
+BUILD_DEPS += tcl-dev,# NB Trailing ',' required here!
+TCLSH=/usr/bin/tclsh
+else
+# All the older distributions which we want to build packages for have
+# tcl8.4-dev, so just build against that.
+BUILD_DEPS += tcl8.4-dev,# NB Trailing ',' required here!
+TCLSH=/usr/bin/tclsh8.4
+endif
+
+# Build depends for Ruby.
+BUILD_DEPS += ruby1.8-dev, ruby1.8,# NB Trailing ',' required here!
+RUBY=/usr/bin/ruby1.8
+RUBY_LIB=$(shell $(RUBY) -rrbconfig -e 'puts Config::CONFIG["rubylibdir"]')
+RUBY_LIB_ARCH=$(shell $(RUBY) -rrbconfig -e 'puts Config::CONFIG["archdir"]')
+
+# We need a versioned build dependency on libxapian-dev.
+BUILD_DEPS += libxapian-dev (>= $(XAPIAN_VERSION)),# NB Trailing ',' required here!
+BUILD_DEPS += libxapian-dev (<< $(XAPIAN_VERSION_CEILING)),# NB Trailing ',' required here!
+
+commonconfflags := \
+	$(confflags) \
+	--prefix=/usr \
+	--sysconfdir=/etc
+
+# With GCC3 and later this won't make a huge difference, but it'll save
+# a bit of time and diskspace while building.
+commonconfflags += --disable-dependency-tracking
+
+maint: debian/control
+
+maintclean: clean
+	rm -f debian/control
+
+debian/control: debian/rules debian/control.in
+	rm -f debian/control.tmp
+	sed -e "s/@BUILD_DEPS@/$(BUILD_DEPS)/g" \
+	    -e "s/@PYTHON_OLD_PACKAGES@/$(PYTHON_OLD_PACKAGES)/g" \
+	    < debian/control.in > debian/control.tmp
+	for v in $(PHP_VERSIONS); do \
+	    sed "s/@PHP_VERSION@/$$v/g" debian/control-php.in ;\
+	done >> debian/control.tmp
+	mv debian/control.tmp debian/control
+
+configure: debian/configure-stamp
+debian/configure-stamp:
+	dh_testdir
+
+	# Use the latest config.sub and config.guess from the autotools-dev
+	# package.
+	rm -f config.sub config.guess
+	ln -s /usr/share/misc/config.sub config.sub
+	ln -s /usr/share/misc/config.guess config.guess
+
+	for python in $(PYTHON_VERSIONS); do \
+	    set -e; \
+	    mkdir -p build-$$python; \
+	    cd build-$$python; \
+	    ../configure $(commonconfflags) --with-python \
+		PYTHON=/usr/bin/$$python; \
+	    cd ..; \
+	done
+
+	for v in $(PHP_VERSIONS); do \
+	    c=/usr/bin/php-config$$v; \
+	    if test -x $$c ; then \
+		set -e; \
+		mkdir -p build-php$$v; \
+		cd build-php$$v; \
+		../configure $(commonconfflags) --with-php PHP_CONFIG=$$c; \
+		cd ..; \
+	    fi \
+	done
+
+	mkdir -p build-tcl-and-ruby
+	cd build-tcl-and-ruby && ../configure $(commonconfflags) \
+	    --with-tcl TCLSH=$(TCLSH) TCL_LIB=/usr/lib/tcltk \
+	    --with-ruby RUBY=$(RUBY) RUBY_LIB=$(RUBY_LIB) RUBY_LIB_ARCH=$(RUBY_LIB_ARCH)
+
+	touch $@
+
+build: debian/build-stamp
+debian/build-stamp: configure
+	dh_testdir
+	for python in $(PYTHON_VERSIONS); do \
+	    set -e; \
+	    $(MAKE) -C build-$$python ; \
+	    $(MAKE_CHECK) -C build-$$python ; \
+	done
+	for v in $(PHP_VERSIONS); do \
+	    if test -x /usr/bin/php-config$$v ; then \
+		set -e; \
+		$(MAKE) -C build-php$$v ; \
+		$(MAKE_CHECK) -C build-php$$v ; \
+	    fi \
+	done
+	$(MAKE) -C build-tcl-and-ruby
+	$(MAKE_CHECK) -C build-tcl-and-ruby
+	touch $@
+
+install: DH_OPTIONS=
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+
+	# Install the files under 'debian/tmp'.
+	for python in $(PYTHON_VERSIONS); do \
+	    set -e; \
+	    $(MAKE) -C build-$$python DESTDIR=$(CURDIR)/debian/tmp install; \
+	done
+
+	# Install xapian.php in /usr/share/php for PHP5 so that it's in the
+	# PHP include_path, but for the PHP4 backport put it in /usr/share/php4
+	# to avoid a file conflict with the php5-xapian package.  The file won't
+	# be automatically found there, but it isn't vital for the PHP4 bindings
+	# while it is for the PHP5 ones.
+	#
+	# Always install /etc/xapian/phpN/conf.d/xapian.ini, even for backports
+	# to suites where PHP doesn't support it - the extra file is harmless,
+	# and it means we'll work nicely with backported PHP packages too.
+	for v in $(PHP_VERSIONS); do \
+	    c=/usr/bin/php-config$$v; \
+	    if test -x $$c ; then \
+		set -e; \
+		$(MAKE) -C build-php$$v DESTDIR=$(CURDIR)/debian/tmp \
+		    phpincdir=/usr/share/php`echo $$v|tr -d 5` install; \
+		install -d -m 755 debian/tmp/etc/php$$v/conf.d; \
+		install -m 644 debian/etc-php-conf.d-xapian.ini debian/tmp/etc/php$$v/conf.d/xapian.ini; \
+	    fi \
+	done
+
+ifneq ($(findstring .$(CODENAME)., .sarge.dapper.edgy.), )
+	# If PHP doesn't support /etc/phpN/conf.d then add README.Debian with
+	# a note explaining that user needs to modify php.ini themselves.  This
+	# affects Debian sarge, and Ubuntu edgy (and earlier).
+	for v in $(PHP_VERSIONS); do \
+	    c=/usr/bin/php-config$$v; \
+	    if test -x $$c ; then \
+		set -e; \
+		install -d -m 755 debian/php$$v-xapian/usr/share/doc/php$$v-xapian; \
+		install -m 644 debian/php$$v-README.Debian debian/php$$v-xapian/usr/share/doc/php$$v-xapian/README.Debian; \
+	    fi \
+	done
+endif
+
+	$(MAKE) -C build-tcl-and-ruby DESTDIR=$(CURDIR)/debian/tmp install
+
+	# Reads the '*.install' files to decide where to install everything.
+	dh_install --sourcedir=debian/tmp --fail-missing $(DH_INSTALL_EXCLUDE)
+
+binary: binary-arch
+binary-arch: DH_OPTIONS=-a
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installdocs
+	dh_installexamples
+	dh_installmenu
+	dh_installman
+	dh_installchangelogs ChangeLog
+	dh_strip
+	dh_link
+	dh_compress
+	dh_fixperms
+	dh_makeshlibs
+	# This allows the rules file to be used for backports to releases
+	# which predate python-central.  Once python-central is in all the
+	# Debian and Ubuntu releases we want to build packages for, this can
+	# be replaced by just "dh_pycentral".
+ifeq ($(USE_PYVERSIONS), yes)
+	dh_pycentral
+else
+	# Recent Lintian versions warn if this file matches: /^\s+dh_python\s/
+	# But we need to call dh_python for backports, so to avoid the warning
+	# we insert `$(strip )' which expands to nothing.
+	dh_$(strip )python
+endif
+	dh_installdeb
+
+	dh_shlibdeps
+	# Rewrite the dependency on libxapianN to be >= our version, since
+	# we may require features added in that version.
+	perl -pi -e \
+	    's/^(shlibs:Depends=.*libxapian\d+)/$$1 (>= $(XAPIAN_VERSION))/' \
+	    debian/*.substvars
+
+	# php-config4 in sarge doesn't understand --phpapi and we want to
+	# support backporting so get the api version from the phpN-cli
+	# package's "Provides".
+	for v in $(PHP_VERSIONS); do \
+	    c=/usr/bin/php-config$$v; \
+	    if test -x $$c ; then \
+		set -e; \
+		echo "php$$v:Depends=`dpkg -s php$$v-cli|sed 's/^Provides: //p;d'|sed 's/, */\n/g'|grep '^phpapi-'`, php$$v-common" >> debian/php$$v-xapian.substvars; \
+	    fi \
+	done
+
+ifeq ($(findstring .$(CODENAME)., .sarge.etch.dapper.edgy.feisty.gutsy.), )
+	# lenny/hardy onwards have a "tcl" dummy package which pulls in the
+	# package for the current preferred version.  "tclsh" is a virtual
+	# package which the Debian Tcl/Tk Policy recommends we specify as an
+	# alternative if we work with all available Tcl/Tk versions:
+	# http://pkg-tcltk.alioth.debian.org/tcltk-policy.html/ch-module_packages.html
+	echo "tcl:Depends=tcl|tclsh" >> debian/tclxapian.substvars
+else
+	# sarge onwards don't have tcl8.2 or earlier, though we would work with
+	# 8.2 and 8.1 if they were packaged.
+	echo "tcl:Depends=tcl8.4|tcl8.3" >> debian/tclxapian.substvars
+endif
+
+	echo "ruby:Depends=libruby1.8" >> debian/libxapian-ruby1.8.substvars
+
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary-indep:
+	echo "Nothing to do!"
+
+clean:
+	dh_testdir
+	dh_testroot
+	for python in $(PYTHON_VERSIONS); do \
+	    set -e; \
+	    rm -rf build-$$python; \
+	done
+	for v in $(PHP_VERSIONS); do \
+	    set -e; \
+	    rm -rf build-php$$v; \
+	done
+	rm -rf build-tcl-and-ruby
+	rm -f config.sub config.guess
+	dh_clean
+	rm -f debian/build-stamp debian/configure-stamp
+
+.PHONY: maint maintclean configure build install binary binary-arch binary-indep clean
--- xapian-bindings-1.0.7.orig/debian/compat
+++ xapian-bindings-1.0.7/debian/compat
@@ -0,0 +1 @@
+4
--- xapian-bindings-1.0.7.orig/debian/php5-README.Debian
+++ xapian-bindings-1.0.7/debian/php5-README.Debian
@@ -0,0 +1,17 @@
+The Xapian PHP5 bindings packages used to ask (via debconf) if you wished to
+have php.ini modified such that the Xapian PHP module would be automatically
+loaded.  The PHP packages in more recent version of Debian and Ubuntu now
+provide a better mechanism that allows this to be done without modifying
+php.ini at all.
+
+You have installed a version of php5-xapian which has been backported to an
+older Debian or Ubuntu version, so the new mechanism isn't available (unless
+you also install suitable backported packages of PHP5).  However, the code to
+modify php.ini has been removed so if you wish the Xapian PHP module to be
+automatically loaded, you must make sure that the relevant php.ini file
+(/etc/php5/$PHPSAPI/php.ini where $PHPSAPI is cgi, cli, apache, or apache2)
+contains this line:
+
+    extension=xapian.so
+
+ -- Olly Betts <olly@survex.com>  Thu, 07 Jun 2007 23:38:14 +0100
--- xapian-bindings-1.0.7.orig/debian/etc-php-conf.d-xapian.ini
+++ xapian-bindings-1.0.7/debian/etc-php-conf.d-xapian.ini
@@ -0,0 +1,2 @@
+# Configuration for PHP xapian module
+extension=xapian.so
--- xapian-bindings-1.0.7.orig/debian/codename
+++ xapian-bindings-1.0.7/debian/codename
@@ -0,0 +1 @@
+etch
--- xapian-bindings-1.0.7.orig/debian/php4-README.Debian
+++ xapian-bindings-1.0.7/debian/php4-README.Debian
@@ -0,0 +1,17 @@
+The Xapian PHP4 bindings packages used to ask (via debconf) if you wished to
+have php.ini modified such that the Xapian PHP module would be automatically
+loaded.  The PHP packages in more recent version of Debian and Ubuntu now
+provide a better mechanism that allows this to be done without modifying
+php.ini at all.
+
+You have installed a version of php4-xapian which has been backported to an
+older Debian or Ubuntu version, so the new mechanism isn't available (unless
+you also install suitable backported packages of PHP4).  However, the code to
+modify php.ini has been removed so if you wish the Xapian PHP module to be
+automatically loaded, you must make sure that the relevant php.ini file
+(/etc/php4/$PHPSAPI/php.ini where $PHPSAPI is cgi, cli, apache, or apache2)
+contains this line:
+
+    extension=xapian.so
+
+ -- Olly Betts <olly@survex.com>  Thu, 07 Jun 2007 23:38:14 +0100
--- xapian-bindings-1.0.7.orig/debian/changelog
+++ xapian-bindings-1.0.7/debian/changelog
@@ -0,0 +1,513 @@
+xapian-bindings (1.0.7-3~bpo40+2) etch-backports; urgency=low
+
+  * Rebuild for etch-backports.
+  * Setting debian/codename and refreshing debian/control to build PHP4
+    bindings. Thanks to Alexander Wirt <formorer@formorer.de>.
+
+ -- Chris Lamb <lamby@debian.org>  Mon, 17 Nov 2008 17:28:04 +0000
+
+xapian-bindings (1.0.7-3~bpo40+1) etch-backports; urgency=low
+
+  * Rebuild for etch-backports.
+  * Replace Build-Depends on tcl-dev with tcl8.3-dev.
+
+ -- Chris Lamb <lamby@debian.org>  Fri, 14 Nov 2008 09:45:31 +0000
+
+xapian-bindings (1.0.7-3) unstable; urgency=low
+
+  * Install /etc/php5/conf.d/xapian.ini instead of /etc/php5/conf.d/xapian as
+    the file is ignored unless it has extensions ".ini".  Closes: #493941
+  * Install xapian.php in /usr/share/php not /usr/share/php5 so that it is in
+    the default PHP include_path.  Closes: #493944
+  * debian/rules: Run "make all" and "make check" as separate commands to
+    avoid hitting parallel building bugs.  Closes: #494247
+
+ -- Olly Betts <olly@survex.com>  Fri,  8 Aug 2008 08:18:52 +0100
+
+xapian-bindings (1.0.7-2) unstable; urgency=low
+
+  * debian/rules: Fix build rule to be parallel make safe.
+  * debian/rules: Back out link_all_deplibs=no change made in 1.0.7-1 since
+    the bindings shared objects weren't getting an explicit dependency on zlib
+    anyway.
+
+ -- Olly Betts <olly@survex.com>  Tue, 29 Jul 2008 15:25:56 +0100
+
+xapian-bindings (1.0.7-1) unstable; urgency=low
+
+  * New upstream release.
+  * debian/copyright: Update for 2008 and a few other minor changes.
+  * debian/rules: The dependency on libxapianN is now versioned.  We require a
+    version >= the version of xapian-bindings being packaged (which is
+    sometimes slightly too conservative, but simple to implement without
+    manual maintenance).  Closes: #462106
+  * debian/rules: Add support for parallel=<n> in DEB_BUILD_OPTIONS, as
+    recommended by policy 3.8.0.  Use $(filter ...) instead of $(find ...)
+    to check for noopt in DEB_BUILD_OPTIONS to avoid false matches on
+    substrings of non-standard options (e.g. snooptables).  Add support
+    for nocheck in DEB_BUILD_OPTIONS.
+  * debian/control.in: Standards-Version: 3.8.0
+  * debian/watch: Add watch file.  Not useful for me as I make the upstream
+    releases, but DEHS, etc find it useful.
+  * debian/control.in: Capitalise python to placate lintian.
+  * debian/patch: Remove since all patches are already in the upstream
+    sources.
+  * debian/rules: Calculate the version starting the next release branch (so
+    1.1.0 currently) and use that as the upper bound on the libxapian-dev
+    build dependency).
+  * debian/tclxapian.install: Update to reflect new install location which
+    reflects the new tcl policy: /usr/lib/xapian<version> ->
+    /usr/lib/tcltk/xapian<version>
+  * debian/rules: Tweak how we build the conflicts/replaces for old
+    python-xapian as the old way doesn't seem to work for newer versions of
+    GNU make.
+  * debian/rules: Force link_all_deplibs=no so libtool doesn't try to
+    explicitly link with -lz.
+
+ -- Olly Betts <olly@survex.com>  Sat, 26 Jul 2008 16:27:57 +0100
+
+xapian-bindings (1.0.5-1) unstable; urgency=low
+
+  * debian/rules: Look for "CODENAME" and "debian/codename" rather than
+    "COMPONENT" and "debian/component".
+  * debian/rules: Strip out unused support for Ubuntu breezy since it reached
+    end-of-life and we stopped building packages for it a while ago.
+  * debian/control.in: Standards-Version: 3.7.3 (no changes required).
+  * debian/patch: Remove patch for building tcl8 on latest sid as it is
+    already in the upstream sources.
+  * debian/patch: Add patch to fix installation of Ruby RDocs.
+  * debian/patch: Add patch to fix "make check" for PHP4 (needed for some of
+    the backports).
+  * debian/libxapian-ruby1.8.install: Package the installed RDocs.
+  * debian/control.in,debian/control-php.in: The "Homepage:" header is now
+    official, so convert "Homepage:" pseudo-headers.
+  * debian/rules: For Debian lenny and later, and Ubuntu hardy and later,
+    make use of the new tcl and tcl-dev packages as the Debian Tcl/Tk policy
+    describes.
+
+ -- Olly Betts <olly@survex.com>  Sun, 23 Dec 2007 01:30:45 +0000
+
+xapian-bindings (1.0.4-1) unstable; urgency=low
+
+  * New upstream release.
+    + "make clean" now removes python/testsuite.pyc.  Closes: #442766
+  * debian/rules: Override RUBY_LIB and RUBY_LIB_ARCH which now have different
+    defaults upstream.
+  * debian/patch: Backport configure fix from upstream SVN to allow tcl8 to be 
+    built on unstable.
+  * debian/tclxapian.install: Also package "usr/share/tcltk/xapian*" which is
+    where files get installed on unstable.
+  * debian/php4-xapian.install,debian/php5-xapian.install,
+    debian/python-xapian.install,debian/libxapian-ruby1.8.install,
+    debian/tclxapian.install: Update for "bindings.html" -> "index.html"
+    change.
+
+ -- Olly Betts <olly@survex.com>  Fri,  2 Nov 2007 05:13:29 +0000
+
+xapian-bindings (1.0.2-1) unstable; urgency=low
+
+  * New upstream release.
+  * debian/rules: Upstream build now installs xapian.php, so remove code to
+    install it here.
+
+ -- Olly Betts <olly@survex.com>  Thu,  5 Jul 2007 01:17:29 +0100
+
+xapian-bindings (1.0.1-1) unstable; urgency=low
+
+  * New upstream release.
+  * php4-xapian and php5-xapian now make use of the (relatively) new
+    /etc/phpN/conf.d mechanism to enable the xapian extension automatically,
+    instead of modifying php.ini directly (after checking that's OK using
+    debconf).  Backports to Debian oldstable, and to Ubuntu etch and earlier,
+    now require the user to add "extension=xapian.so" to php.ini by hand,
+    so backports where this is required now include a README.Debian which
+    explains this.
+  * debian/rules: Upstream build now generates .pyo so we need to tell
+    dh_install that we don't want to package it.
+
+ -- Olly Betts <olly@survex.com>  Tue, 12 Jun 2007 02:21:14 +0100
+
+xapian-bindings (1.0.0-1) unstable; urgency=low
+
+  * New upstream release.
+  * New debconf translations:
+    - Malayalam.  Closes: #418032
+    - Dutch.  Closes: #423066
+  * debian/rules: Debian unstable has dropped PHP4 support, so don't build
+    php4-xapian for it.  Closes: #424809
+  * debian/rules,debian/php4-xapian.install,debian/php5-install: Install and
+    package xapian.php which is handy for PHP4 and vital for PHP5.
+  * debian/rules: Update now there's a new stable release.  Keep support for
+    oldstable for the time being, in case someone wants to backport.
+  * debian/patch: Changes included upstream so remove.
+  * debian/patch: Add new patches to fix "package require xapian" issues for
+    Tcl example scripts.
+  * debian/copyright: Update.
+  * debian/rules: We don't need to pass --mandir or --infodir to configure
+    as the values we explicitly set are the defaults anyway (and we don't
+    have any documentation in "info" format).
+  * debian/rules: Avoid Lintian's uses-dh-python-with-no-pycompat warning -
+    for now we want to keep the call to dh_python for backports.
+
+ -- Olly Betts <olly@survex.com>  Tue, 29 May 2007 14:13:14 +0100
+
+xapian-bindings (0.9.9-2) unstable; urgency=low
+
+  * ACK NMU - thanks Christian!
+  * debian/rules: Fix how we determine the phpapi version to depend on.
+    The previous way was technically wrong, but got the right answer
+    for Debian unstable, and for Ubuntu dapper and edgy (Debian sarge was
+    wrong though).
+  * debian/po/nb.po: New debconf translation from Hans Fredrik Nordhaug
+    (Closes: #414461).
+  * debian/rules: Ubuntu feisty has dropped php4 support.
+
+ -- Olly Betts <olly@survex.com>  Wed, 28 Mar 2007 03:02:50 +0000
+
+xapian-bindings (0.9.9-1.1) unstable; urgency=low
+
+  * Non-maintainer upload on maintainer's request to fix remaining l10n issues.
+  * Debconf translations:
+    - German. Closes: #412250
+    - Russian. Closes: #412274
+    - Galician. Closes: #412338
+    - Basque. Closes: #412420
+    - Catalan. Closes: #412579
+    - Romanian. Closes: #412933
+
+ -- Christian Perrier <bubulle@debian.org>  Sat, 10 Mar 2007 07:41:40 +0100
+
+xapian-bindings (0.9.9-1) unstable; urgency=low
+
+  * New upstream release.
+  * debian/rules: Build tcl and ruby bindings in the same build tree to save
+    a bit of diskspace and time during the build.
+  * debian/rules: Fix the incorrect "Conflicts:" and "Replaces:" we generate
+    for the old "per-version" Python packages (broken in 0.9.8-1).
+  * debian/patch: Patch to fix building bindings for Python 2.5 on amd64
+    (needed for the Ubuntu etch and any other Debian derived distros with
+    Python 2.5).
+
+ -- Olly Betts <olly@survex.com>  Fri, 10 Nov 2006 04:03:28 +0000
+
+xapian-bindings (0.9.8-1) unstable; urgency=low
+
+  * New upstream release.
+  * debian/rules: Add no-op "binary-indep" target (Closes: #395761).
+  * debian/rules: Don't try to build PHP bindings on hurd-i386 (PHP hasn't
+    been ported, but Python, Tcl, and Ruby have).
+  * debian/rules: Upstream no longer support Python 2.1 bindings so update
+    comments regarding the Python versions supported by the sarge backport.
+  * debian/control.in,debian/control-php.in: Add "Suggests: xapian-doc" since
+    the xapian-core documentation is useful reading for people developing
+    using xapian-bindings.
+  * debian/rules: Use python-all-dev where we can.
+
+ -- Olly Betts <olly@survex.com>  Sat,  4 Nov 2006 22:02:05 +0000
+
+xapian-bindings (0.9.7-2) unstable; urgency=low
+
+  * debian/control.in,debian/rules: Build dependency on libxapian-dev
+    should be versioned (Closes: #392537).
+  * debian/rules: Don't include Python 2.1 support in the stable backport
+    since SWIG generates bad code for it at present.
+
+ -- Olly Betts <olly@survex.com>  Thu, 12 Oct 2006 14:36:43 +0100
+
+xapian-bindings (0.9.7-1) unstable; urgency=low
+
+  * New upstream release.
+  * debian/rules: Fix typo in configure invocation for Tcl so that we only
+    build the Tcl bindings in that source tree.
+  * debian/rules: Build-Depends on phpN-cli so that we can run "make check".
+  * debian/po/: Added newly translated debconf messages for fr, cs, pt, sv
+    (Closes: #380341, #382933, #383396, #387533).
+
+ -- Olly Betts <olly@survex.com>  Wed, 11 Oct 2006 19:09:35 +0100
+
+xapian-bindings (0.9.6-5) unstable; urgency=low
+
+  * debian/copyright: Add Java bindings copyrights and licences.
+  * debian/rules: Run "make check" on each of the built bindings.  It's a very
+    lightweight test but will at least ensure that the basics work.  It also
+    serves to check the core library is working - xapian-core's own testsuite
+    is probably too slow to justify devoting autobuilder time to.
+  * debian/control.in,debian/control-php.in: Remove "designed to be" from the
+    package description at Wookey's suggestion.
+
+ -- Olly Betts <olly@survex.com>  Sun, 09 Jul 2006 01:31:02 +0100
+
+xapian-bindings (0.9.6-4) unstable; urgency=low
+
+  * debian/rules: Since the python packaging change we no longer have any
+    "Architecture: all" packages to build so remove the binary-indep target.
+  * Fix prerm file comments which said "postinst".
+  * debian/copyright: Update with a thorough list of copyrights and licences.
+
+ -- Olly Betts <olly@survex.com>  Mon, 26 Jun 2006 16:16:37 +0100
+
+xapian-bindings (0.9.6-3) unstable; urgency=low
+
+  * Tweak description and add "Homepage: http://www.xapian.org/".
+  * tclxapian package wasn't depending on the tcl interpreter due to a typo
+    in debian/rules.
+  * libxapian-ruby1.8 package wasn't depending on the ruby interpreter due to
+    a typo in debian/rules.
+  * Update python packages to follow new python packaging policy.
+
+ -- Olly Betts <olly@survex.com>  Fri, 16 Jun 2006 04:09:49 +0100
+
+xapian-bindings (0.9.6-2) unstable; urgency=low
+
+  * dh_strip checks for nostrip in DEB_BUILD_OPTIONS, so we don't need to.
+  * configure with --disable-depending-tracking to reduce build time and
+    space requirements a little.
+  * Fix debian/control generation not to leave a partial file if interrupted.
+  * Add packages for the Ruby bindings, built for Ruby 1.8.
+
+ -- Olly Betts <olly@survex.com>  Fri,  9 Jun 2006 02:33:10 +0100
+
+xapian-bindings (0.9.6-1) unstable; urgency=low
+
+  * New upstream release.
+  * "Standards-Version: 3.7.2" - no changes required.
+  * Debian unstable no longer includes Python 2.1 or 2.2, so don't package
+    Python bindings for them (backports can easily reenable them.)
+  * Add packages for the TCL bindings (which should work with any Tcl version
+    from 8.1 onwards.)
+  * We no longer need to change the permissions of xapian.py and xapian.pyc
+    as they are now set correctly by the upstream "make install".
+  * Add "python" to "Build-Depends" so that dh_python works and also to
+    workaround a broken configure test for PYTHON_PATHSEP which uses "python"
+    instead of "$PYTHON" so PYTHON_PATHSEP is empty if there's no "python"
+    in the path.
+
+ -- Olly Betts <olly@survex.com>  Mon, 15 May 2006 21:11:41 +0100
+  
+xapian-bindings (0.9.5-3) unstable; urgency=low
+
+  * PHP bindings packages now have the correct "Depends:" and are able to
+    automatically modify php.ini upon installation (using debconf to ask if
+    this should be done) and removal.
+  * dh_python automatically generates the xapian-python->xapian-python2.X
+    dependency for us, so remove the PYTHON_VERSION_MAIN mechanism (which
+    wasn't actually being used anyway!)
+
+ -- Olly Betts <olly@survex.com>  Wed, 12 Apr 2006 19:03:23 +0100
+
+xapian-bindings (0.9.5-2) unstable; urgency=low
+
+  * Added packages for PHP bindings (for both PHP4 and PHP5).
+  * Don't install .py wrapper as executable (fixes Lintian warning).
+  * dh_install with --fail-missing intead of just --list-missing.
+
+ -- Olly Betts <olly@survex.com>  Sun,  9 Apr 2006 19:54:03 +0100
+
+xapian-bindings (0.9.5-1) unstable; urgency=low
+
+  * New upstream release.
+  * "Standards-Version: 3.6.2" - no changes required.
+  * debian/copyright: Update FSF address and give download URL for releases
+    instead of obsolete CVS location.
+  * debian/rules: When generating debian/control, die if the python package
+    isn't installed (since we require it to discover the default python
+    version).
+  * debian/rules: Simplify configure invocation by taking advantage of the
+    change to handling of --with-XXX options in 0.9.3.
+  * debian/rules: Increase DH_COMPAT from 3 to 4.
+  * debian/TODO: No point planning to package guile right now!
+  * debian/rules: Generate bindings package for Python 2.1.
+  * New maintainer.
+
+ -- Olly Betts <olly@survex.com>  Sun,  9 Apr 2006 00:46:22 +0100
+
+xapian-bindings (0.9.4-2) unstable; urgency=low
+
+  * Fix invalid date line in previous changelog entry.
+
+ -- Richard Boulton <richard@tartarus.org>  Fri,  3 Mar 2006 02:32:31 +0000
+
+xapian-bindings (0.9.4-1) unstable; urgency=low
+
+  * New upstream release.  (No package was made of 0.9.3)
+  * Query constructor which takes a list of strings fixed.
+  * Zero byte cleanliness.
+  * Improved tests. 
+  * Other small fixes.
+
+ -- Richard Boulton <richard@tartarus.org>  Fri,  3 Mar 2006 02:32:31 +0000
+
+xapian-bindings (0.9.2-1) unstable; urgency=low
+
+  * New upstream release.
+  * Added wrappers for new optional flags argument to
+    QueryParser::parse_query().
+  * Efficiency improvement when converting python list to vector<string>.
+
+ -- Richard Boulton <richard@tartarus.org>  Fri, 15 Jul 2005 13:11:12 +0100
+
+xapian-bindings (0.9.1-3) unstable; urgency=low
+
+  * Correct python2.4-xapian.install to include the 2.4 files, not the 2.3
+    ones.
+
+ -- Richard Boulton <richard@tartarus.org>  Wed, 15 Jun 2005 12:11:34 +0100
+
+xapian-bindings (0.9.1-2) unstable; urgency=low
+
+  * Temporarily disable python 2.1 packages, since tarball seems to be
+    broken for them.
+
+ -- Richard Boulton <richard@tartarus.org>  Wed, 15 Jun 2005 11:16:19 +0100
+
+xapian-bindings (0.9.1-1) unstable; urgency=low
+
+  * New upstream releases (No package was generated for release 0.9.0)
+  * Now build for python 2.4.
+  * Update default python version to be compatible with that for new
+    Debain stable version.
+
+ -- Richard Boulton <richard@tartarus.org>  Wed, 15 Jun 2005 09:12:07 +0100
+
+xapian-bindings (0.8.5-1) unstable; urgency=low
+
+  * New upstream release.
+  * Remove patch - fixed in slightly different manner in release.
+
+ -- Richard Boulton <richard@tartarus.org>  Wed,  5 Jan 2005 11:57:17 +0000
+
+xapian-bindings (0.8.4-4) unstable; urgency=low
+
+  * Fixes to patch.
+
+ -- Richard Boulton <richard@tartarus.org>  Fri, 10 Dec 2004 18:16:38 +0000
+
+xapian-bindings (0.8.4-3) unstable; urgency=low
+
+  * Add patch needed to get python install to work.  This is backported
+    from latest CVS, so will be removed with the next release.
+
+ -- Richard Boulton <richard@tartarus.org>  Fri, 10 Dec 2004 17:24:42 +0000
+
+xapian-bindings (0.8.4-2) unstable; urgency=low
+
+  * Don't configure with csharp support when building the python packages.
+
+ -- Richard Boulton <richard@tartarus.org>  Fri, 10 Dec 2004 10:15:53 +0000
+
+xapian-bindings (0.8.4-1) unstable; urgency=low
+
+  * New upstream release.
+  * Build fixes - in particular, swig is used at package generation time,
+    not build time.
+  * python: wrap MSet::MSet() again, and other fixes.
+
+ -- Richard Boulton <richard@tartarus.org>  Thu,  9 Dec 2004 17:38:29 +0000
+
+xapian-bindings (0.8.3-1) unstable; urgency=low
+
+  * New upstream release.
+  * Use swig's -modern switch for Python 2.2 and up - it gives cleaner, leaner,
+    faster Python wrapper code.
+
+ -- Richard Boulton <richard@tartarus.org>  Tue, 21 Sep 2004 13:31:14 +0100
+
+xapian-bindings (0.8.2-2) unstable; urgency=low
+
+  * Build against libxapian3. (See changelog for libxapian for explanation)
+
+ -- Richard Boulton <richard@tartarus.org>  Tue, 14 Sep 2004 17:03:28 +0100
+
+xapian-bindings (0.8.2-1) unstable; urgency=low
+
+  * New upstream release.
+  * Many changes and additions to methods which are wrapped - applications
+    may need updates.  See NEWS for full details.
+  * Builds against libxapian4.
+
+ -- Richard Boulton <richard@tartarus.org>  Tue, 14 Sep 2004 13:20:31 +0100
+
+xapian-bindings (0.8.1-2) unstable; urgency=low
+
+  * debian/control.in: Update build dependency on swig to require at
+    least version 1.3.20, since the configure script now requires this.
+
+ -- Richard Boulton <richard@tartarus.org>  Thu,  1 Jul 2004 10:02:35 +0100
+
+xapian-bindings (0.8.1-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Richard Boulton <richard@tartarus.org>  Wed, 30 Jun 2004 20:19:11 +0100
+
+xapian-bindings (0.8.0-9) unstable; urgency=low
+
+  * debian/rules: Read value of $COMPONENT from a file, rather than the
+    environment, so that it is the same whenever we re-run.
+
+ -- Richard Boulton <richard@tartarus.org>  Wed, 30 Jun 2004 14:21:20 +0100
+
+xapian-bindings (0.8.0-8) unstable; urgency=low
+
+  * debian/rules: Build appropriate python versions depending on enviornment
+    variable "$COMPONENT", set in my build script.  Remove dependencies on
+    debian/control, so that it is only generated when explicitly requested
+    by build script.
+
+ -- Richard Boulton <richard@tartarus.org>  Wed, 30 Jun 2004 13:28:43 +0100
+
+xapian-bindings (0.8.0-7) unstable; urgency=low
+
+  * debian/rules: Change ' to " so that python versions get substituted
+    correctly.
+  * debain/python*-xapian.install: Install documentation files.
+
+ -- Richard Boulton <richard@tartarus.org>  Wed, 30 Jun 2004 11:39:55 +0100
+
+xapian-bindings (0.8.0-6) unstable; urgency=low
+
+  * debian/rules: Determine primary python version on the system
+    automatically (by invoking /usr/bin/python).
+
+ -- Richard Boulton <richard@tartarus.org>  Wed, 30 Jun 2004 00:52:52 +0100
+
+xapian-bindings (0.8.0-5) unstable; urgency=low
+
+  * debian/rules: move stamp files into debian directory, to avoid polluting
+    other builds.
+  * debian/patch: Add patch containing missing documentation files for python
+    bindings (were missing from distribution tarballs in the 0.8.0 release).
+
+ -- Richard Boulton <richard@tartarus.org>  Tue, 29 Jun 2004 15:13:50 +0100
+
+xapian-bindings (0.8.0-4) unstable; urgency=low
+
+  * Split debian/control into debian/control.in and debian/control-python.in
+    and add rules to generate debian/control whilst substituting python
+    version numbers.  The python versions supported can now be updated
+    simply by changing variables in debian/rules and rebuilding.
+  * debian/rules: remove --enable-maintainer-mode configure flag.
+
+ -- Richard Boulton <richard@tartarus.org>  Wed, 19 May 2004 10:55:02 +0100
+
+xapian-bindings (0.8.0-3) unstable; urgency=low
+
+  * Add --list-missing back to dh_install command, since we're already
+    depending on a debhelper version high enough to support that option.
+
+ -- Richard Boulton <richard@tartarus.org>  Wed, 12 May 2004 12:27:27 +0100
+
+xapian-bindings (0.8.0-2) unstable; urgency=low
+
+  * Add rules to make symlinks to config.guess and config.sub, and added
+    Build-Depends on autotools-dev.
+  * Add some more TODO notes.
+
+ -- Richard Boulton <richard@tartarus.org>  Wed, 12 May 2004 10:15:06 +0100
+
+xapian-bindings (0.8.0-1) unstable; urgency=low
+
+  * Initial release - provides packages for only the python bindings, so far.
+
+ -- Richard Boulton <richard@tartarus.org>  Tue, 11 May 2004 15:12:04 +0100
+
--- xapian-bindings-1.0.7.orig/debian/watch
+++ xapian-bindings-1.0.7/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://xapian.org/download http://oligarchy.co.uk/xapian/([\d.]+)/xapian-bindings-\1\.tar\.gz
--- xapian-bindings-1.0.7.orig/debian/TODO
+++ xapian-bindings-1.0.7/debian/TODO
@@ -0,0 +1 @@
+Package java and csharp bindings.
--- xapian-bindings-1.0.7.orig/debian/php4-xapian.install
+++ xapian-bindings-1.0.7/debian/php4-xapian.install
@@ -0,0 +1,5 @@
+usr/lib/php4/*/xapian.so
+usr/share/php4/xapian.php
+usr/share/doc/xapian-bindings/php/index.html usr/share/doc/php4-xapian
+usr/share/doc/xapian-bindings/php/examples/*.php4 usr/share/doc/php4-xapian/examples
+etc/php4/conf.d/xapian.ini
--- xapian-bindings-1.0.7.orig/debian/copyright
+++ xapian-bindings-1.0.7/debian/copyright
@@ -0,0 +1,82 @@
+This is the Debian package of the Xapian language bindings.  This
+package was originally created and maintained by Richard Boulton
+<richard@tartarus.org>.  It is currently maintained by Olly Betts
+<olly@survex.com>.
+
+It was downloaded from http://xapian.org/download
+
+Upstream Authors:
+
+        Olly Betts <olly@survex.com>
+        James Aylett <tartarus@users.sourceforge.net>
+	BrightStation PLC
+	Ananova Ltd
+	Technology Concepts & Design, Inc.
+	Networked Knowledge Systems, Inc. 
+	Richard Boulton
+	Lemur Consulting Ltd
+
+Copyright:
+
+  Copyright (C) 2002,2003,2004,2005,2007,2008 Olly Betts
+  Copyright (C) 2002,2003,2004,2005 James Aylett
+  Copyright (C) 2001,2002 Ananova Ltd
+  Copyright (C) 1999,2000,2001 BrightStation PLC
+  Copyright (C) 2006 Networked Knowledge Systems, Inc. 
+  Copyright (C) 2007 Richard Boulton
+  Copyright (C) 2007 Lemur Consulting Ltd
+
+  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
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+
+  See /usr/share/common-licenses/GPL for the full text of the GNU GPL.
+
+The JNI Java bindings in the java subdirectory bear the following
+licence notice:
+
+  Copyright (c) 2003, Technology Concepts & Design, Inc.
+  Copyright (c) 2005,2006, Olly Betts
+  All rights reserved.
+
+  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 Technology Concepts & Design, Inc. 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.
+
+The Debian packaging is also licensed under the GPL v2 or later (see above)
+and the copyright details are:
+
+  Copyright (C) 2004,2005,2006 Lemur Consulting Ltd
+  Copyright (C) 2006,2007,2008 Olly Betts
--- xapian-bindings-1.0.7.orig/debian/python-xapian.install
+++ xapian-bindings-1.0.7/debian/python-xapian.install
@@ -0,0 +1,4 @@
+usr/lib/python2.*/site-packages/*.so
+usr/lib/python2.*/site-packages/*.py
+usr/share/doc/xapian-bindings/python/index.html usr/share/doc/python-xapian
+usr/share/doc/xapian-bindings/python/examples/*.py usr/share/doc/python-xapian/examples
--- xapian-bindings-1.0.7.orig/debian/php5-xapian.postinst
+++ xapian-bindings-1.0.7/debian/php5-xapian.postinst
@@ -0,0 +1,32 @@
+#!/bin/sh -e
+
+# Major version of PHP we're installing for.
+PHP_VERSION=5
+
+# Source the debconf library.
+. /usr/share/debconf/confmodule
+
+# Check package is being configured and that this is an upgrade from a version
+# prior to 1.0.1-0 (-0 to allow for the stable backport).  If it is, we (or the
+# user) might have modified php.ini so check for and remove
+# "extension=xapian.so".
+if [ "$1" = configure ] && dpkg --compare-versions "$2" lt-nl 1.0.1-0 ; then
+  # Check php.ini files for any installed variant of this version of PHP.
+  for ppkg in apache apache2 cgi cli ; do
+    ini=/etc/php$PHP_VERSION/$ppkg/php.ini
+    if [ -f "$ini" ]; then
+      if grep -q '^[[:space:]]*extension[[:space:]]*=[[:space:]]*xapian\.so\>' "$ini" ; then
+	sed 's/^[[:space:]]*extension[[:space:]]*=[[:space:]]*xapian\.so\>/#&/' "$ini" > "$ini.dpkg-tmp"
+	ln "$ini" "$ini.dpkg-old"
+	mv "$ini.dpkg-tmp" "$ini"
+      fi
+    fi
+  done
+fi
+
+# dh_installdeb will replace the magic cookie below with any postinst actions
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
--- xapian-bindings-1.0.7.orig/debian/tclxapian.install
+++ xapian-bindings-1.0.7/debian/tclxapian.install
@@ -0,0 +1,3 @@
+usr/lib/tcltk/xapian*
+usr/share/doc/xapian-bindings/tcl8/index.html usr/share/doc/tclxapian
+usr/share/doc/xapian-bindings/tcl8/examples/*.tcl usr/share/doc/tclxapian/examples
