diff -pruN 0.4.100/1/class/gnome.mk.in 0.4.100ubuntu2/1/class/gnome.mk.in
--- 0.4.100/1/class/gnome.mk.in	2011-01-08 14:37:13.000000000 +0000
+++ 0.4.100ubuntu2/1/class/gnome.mk.in	2012-02-07 03:14:20.000000000 +0000
@@ -41,5 +41,6 @@ clean::
 $(patsubst %,binary-install/%,$(DEB_PACKAGES)) :: binary-install/%:
 	$(if $(wildcard /usr/bin/dh_gconf),dh_gconf -p$(cdbs_curpkg) $(DEB_DH_GCONF_ARGS))
 	$(if $(wildcard /usr/bin/dh_icons),dh_icons -p$(cdbs_curpkg) $(DEB_DH_ICONS_ARGS))
+	$(if $(wildcard /usr/bin/dh_translations),dh_translations -p$(cdbs_curpkg) $(DEB_DH_TRANSLATIONS_ARGS))
 
 endif
diff -pruN 0.4.100/1/class/python-distutils.mk.in 0.4.100ubuntu2/1/class/python-distutils.mk.in
--- 0.4.100/1/class/python-distutils.mk.in	2011-09-12 08:47:13.000000000 +0000
+++ 0.4.100ubuntu2/1/class/python-distutils.mk.in	2012-02-07 03:14:20.000000000 +0000
@@ -28,7 +28,8 @@ include $(_cdbs_class_path)/python-modul
 
 DEB_PYTHON_SETUP_CMD ?= setup.py
 DEB_PYTHON_BUILD_ARGS ?= --build-base="$(CURDIR)/$(cdbs_curbuilddir)/build"
-DEB_PYTHON_INSTALL_ARGS_ALL ?= --prefix=/usr --no-compile -O0
+DEB_PYTHON_PREFIX_ARG ?= /usr
+DEB_PYTHON_INSTALL_ARGS_ALL ?= --prefix=$(DEB_PYTHON_PREFIX_ARG) --no-compile -O0 --install-layout=deb
 DEB_PYTHON_CLEAN_ARGS ?= -a
 #DEB_PYTHON_DISTUTILS_INSTALLDIR_SKEL = /usr/lib/@PYTHONBINARY@/site-packages/
 
@@ -57,7 +58,7 @@ cdbs_python_setup_cmd = $(call cdbs_expa
 cdbs_python_build_args = $(call cdbs_expand_curvar,DEB_PYTHON_BUILD_ARGS)
 cdbs_python_install_args = $(call cdbs_expand_curvar,DEB_PYTHON_INSTALL_ARGS)
 cdbs_python_clean_args = $(call cdbs_expand_curvar,DEB_PYTHON_CLEAN_ARGS)
-cdbs_expand_python_distutils_installdir = $(subst @PYTHONBINARY@,$1,$(or $(DEB_PYTHON_DISTUTILS_INSTALLDIR_SKEL),/usr/lib/@PYTHONBINARY@/site-packages/))
+cdbs_expand_python_distutils_installdir = $(subst @PYTHONBINARY@,$1,$(or $(DEB_PYTHON_DISTUTILS_INSTALLDIR_SKEL),$(DEB_PYTHON_PREFIX_ARG)/lib/@PYTHONBINARY@/site-packages/))
 
 # prepare sanity checks
 cdbs_python_packages_pre := $(cdbs_python_arch_packages)$(cdbs_python_indep_packages)
diff -pruN 0.4.100/1/class/python-module.mk.in 0.4.100ubuntu2/1/class/python-module.mk.in
--- 0.4.100/1/class/python-module.mk.in	2011-09-12 10:15:50.000000000 +0000
+++ 0.4.100ubuntu2/1/class/python-module.mk.in	2012-02-07 03:14:20.000000000 +0000
@@ -30,6 +30,8 @@ _cdbs_deprecated_vars += DEB_PYTHON_PRIV
 # New in 0.4.97.
 DEB_PYTHON_PRIVATE_MODULES_DIRS_ALL ?= $(DEB_PYTHON_PRIVATE_MODULES_DIRS)
 
+_cdbs_class_python_prefix_arg = $(if $(cdbs_python_pysupport), $(if $(call cdbs_streq,$(DEB_PYTHON_PREFIX_ARG),/usr),, --prefix=$(DEB_PYTHON_PREFIX_ARG)))
+
 # pysupport/pycentral dependencies according to Python policy, appendix A
 CDBS_BUILD_DEPENDS_class_python-module_pysupport ?= python-support
 CDBS_BUILD_DEPENDS += $(if $(cdbs_python_pysupport),$(comma) $(CDBS_BUILD_DEPENDS_class_python-module_pysupport))
@@ -55,7 +57,7 @@ $(patsubst %,testsanity/%,$(DEB_ALL_PACK
 # * invoke public and private modules separately with default helpers
 $(patsubst %,binary-post-install/%,$(DEB_PACKAGES)) :: binary-post-install/%: binary-install-python/%
 $(patsubst %,binary-install-python/%,$(DEB_PACKAGES)) :: binary-install-python/%: binary-install/%
-	$(if $(DEB_PYTHON_SYSTEM),dh_$(cdbs_curpythonsystems) -p$(cdbs_curpkg) $(call cdbs_expand_curvar,DEB_DH_PYTHONHELPER_ARGS) $(call cdbs_expand_curvar,DEB_PYTHON_PRIVATE_MODULES_DIRS))
+	$(if $(DEB_PYTHON_SYSTEM),dh_$(cdbs_curpythonsystems) -p$(cdbs_curpkg) $(_cdbs_class_python_prefix_arg) $(call cdbs_expand_curvar,DEB_DH_PYTHONHELPER_ARGS) $(call cdbs_expand_curvar,DEB_PYTHON_PRIVATE_MODULES_DIRS))
 	$(if $(DEB_PYTHON_SYSTEM),,$(if $(cdbs_curpythonsystems),dh_$(cdbs_curpythonsystems) -p$(cdbs_curpkg) $(call cdbs_expand_curvar,DEB_DH_PYTHONHELPER_ARGS)))
 	$(if $(DEB_PYTHON_SYSTEM),,$(and $(cdbs_curpythonsystems),$(call cdbs_expand_curvar,DEB_PYTHON_PRIVATE_MODULES_DIRS),dh_$(cdbs_curpythonsystems) -p$(cdbs_curpkg) $(call cdbs_expand_curvar,DEB_DH_PYTHONHELPER_ARGS) $(call cdbs_expand_curvar,DEB_PYTHON_PRIVATE_MODULES_DIRS)))
 
diff -pruN 0.4.100/1/rules/debhelper.mk.in 0.4.100ubuntu2/1/rules/debhelper.mk.in
--- 0.4.100/1/rules/debhelper.mk.in	2011-09-12 07:51:13.000000000 +0000
+++ 0.4.100ubuntu2/1/rules/debhelper.mk.in	2012-02-07 03:14:20.000000000 +0000
@@ -59,6 +59,8 @@
 #   Arguments passed directly to dh_gencontrol, for a particular package <package>
 # DEB_DH_GENCONTROL_ARGS
 #   Completely override argument passing to dh_gencontrol.
+# DEB_DH_SCOUR_ARGS
+#   Completely override argument passing to dh_scour.
 # DEB_DH_MAKESHLIBS_ARGS_ALL
 #   Arguments passed directly to dh_makeshlibs, for all packages
 # DEB_DH_MAKESHLIBS_ARGS_<package>
@@ -280,6 +282,9 @@ $(patsubst %,binary-makedeb/%,$(DEB_INDE
 $(patsubst %,binary-makedeb-IMPL/%,$(DEB_ALL_PACKAGES)) :: binary-makedeb-IMPL/% : 
 # TODO: Use DEB_DH_GENCONTROL_ARGS as package-default (not global override)
 	dh_gencontrol -p$(cdbs_curpkg) $(DEB_DH_GENCONTROL_ARGS)
+	# only call dh_scour for packages in main
+	if grep -q '^Component:[[:space:]]*main' /CurrentlyBuilding 2>/dev/null; then dh_scour -p$(cdbs_curpkg) $(DEB_DH_SCOUR_ARGS); fi
+
 	dh_md5sums -p$(cdbs_curpkg) $(call cdbs_expand_curvar,DEB_DH_MD5SUMS_ARGS)
 	$(DEB_DH_BUILDDEB_ENV) dh_builddeb -p$(cdbs_curpkg) $(call cdbs_expand_curvar,DEB_DH_BUILDDEB_ARGS)
 
diff -pruN 0.4.100/1/rules/utils.mk.in 0.4.100ubuntu2/1/rules/utils.mk.in
--- 0.4.100/1/rules/utils.mk.in	2011-09-16 19:33:07.000000000 +0000
+++ 0.4.100ubuntu2/1/rules/utils.mk.in	2012-02-07 03:14:20.000000000 +0000
@@ -56,6 +56,7 @@ list-missing:
 	   done; \
 	   test -e debian/not-installed && grep -v '^#' debian/not-installed; \
 	   ) | sort -u > debian/cdbs-package-list; \
+          echo "# list-missing files result:"; \
 	  diff -u debian/cdbs-install-list debian/cdbs-package-list | sed '1,2d' | egrep '^-' || true; \
 	else \
 	  echo "All files were installed into debian/$(DEB_SOURCE_PACKAGE)."; \
diff -pruN 0.4.100/configure 0.4.100ubuntu2/configure
--- 0.4.100/configure	2011-04-17 03:25:04.000000000 +0000
+++ 0.4.100ubuntu2/configure	2012-02-07 03:14:20.000000000 +0000
@@ -564,6 +564,12 @@ PACKAGE_URL=''
 ac_unique_file="1/rules/buildcore.mk.in"
 ac_subst_vars='LTLIBOBJS
 LIBOBJS
+HAVE_PYSUPPORT_FALSE
+HAVE_PYSUPPORT_TRUE
+HAVE_PYCENTRAL_FALSE
+HAVE_PYCENTRAL_TRUE
+PYSUPPORT
+PYCENTRAL
 MAINT
 MAINTAINER_MODE_FALSE
 MAINTAINER_MODE_TRUE
@@ -2214,6 +2220,96 @@ fi
   MAINT=$MAINTAINER_MODE_TRUE
 
 
+# Extract the first word of "dh_pycentral", so it can be a program name with args.
+set dummy dh_pycentral; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_PYCENTRAL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$PYCENTRAL"; then
+  ac_cv_prog_PYCENTRAL="$PYCENTRAL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_PYCENTRAL="dh_pycentral"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+PYCENTRAL=$ac_cv_prog_PYCENTRAL
+if test -n "$PYCENTRAL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYCENTRAL" >&5
+$as_echo "$PYCENTRAL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "dh_pysupport", so it can be a program name with args.
+set dummy dh_pysupport; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_PYSUPPORT+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$PYSUPPORT"; then
+  ac_cv_prog_PYSUPPORT="$PYSUPPORT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_PYSUPPORT="dh_pysupport"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+PYSUPPORT=$ac_cv_prog_PYSUPPORT
+if test -n "$PYSUPPORT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYSUPPORT" >&5
+$as_echo "$PYSUPPORT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ if test "x${PYCENTRAL}" != x; then
+  HAVE_PYCENTRAL_TRUE=
+  HAVE_PYCENTRAL_FALSE='#'
+else
+  HAVE_PYCENTRAL_TRUE='#'
+  HAVE_PYCENTRAL_FALSE=
+fi
+
+ if test "x${PYSUPPORT}" != x; then
+  HAVE_PYSUPPORT_TRUE=
+  HAVE_PYSUPPORT_FALSE='#'
+else
+  HAVE_PYSUPPORT_TRUE='#'
+  HAVE_PYSUPPORT_FALSE=
+fi
+
 ac_config_files="$ac_config_files Makefile test/Makefile"
 
 cat >confcache <<\_ACEOF
@@ -2366,6 +2462,14 @@ if test -z "${MAINTAINER_MODE_TRUE}" && 
   as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${HAVE_PYCENTRAL_TRUE}" && test -z "${HAVE_PYCENTRAL_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_PYCENTRAL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_PYSUPPORT_TRUE}" && test -z "${HAVE_PYSUPPORT_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_PYSUPPORT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 
 : "${CONFIG_STATUS=./config.status}"
 ac_write_fail=0
diff -pruN 0.4.100/configure.ac 0.4.100ubuntu2/configure.ac
--- 0.4.100/configure.ac	2010-05-22 20:52:01.000000000 +0000
+++ 0.4.100ubuntu2/configure.ac	2012-02-07 03:14:20.000000000 +0000
@@ -20,5 +20,9 @@ AC_INIT(cdbs, something)
 AC_CONFIG_SRCDIR(1/rules/buildcore.mk.in)
 AM_INIT_AUTOMAKE
 AM_MAINTAINER_MODE
+AC_CHECK_PROG(PYCENTRAL,dh_pycentral,dh_pycentral)
+AC_CHECK_PROG(PYSUPPORT,dh_pysupport,dh_pysupport)
+AM_CONDITIONAL(HAVE_PYCENTRAL,test "x${PYCENTRAL}" != x)
+AM_CONDITIONAL(HAVE_PYSUPPORT,test "x${PYSUPPORT}" != x)
 AC_CONFIG_FILES([Makefile test/Makefile])
 AC_OUTPUT
diff -pruN 0.4.100/debian/changelog 0.4.100ubuntu2/debian/changelog
--- 0.4.100/debian/changelog	2011-11-29 13:48:28.000000000 +0000
+++ 0.4.100ubuntu2/debian/changelog	2012-02-07 03:38:37.000000000 +0000
@@ -1,3 +1,30 @@
+cdbs (0.4.100ubuntu2) precise; urgency=low
+
+  * Mark cdbs Multi-Arch: foreign.  Closes: #658973.
+
+ -- Steve Langasek <steve.langasek@ubuntu.com>  Mon, 06 Feb 2012 19:38:36 -0800
+
+cdbs (0.4.100ubuntu1) precise; urgency=low
+
+  * Merge from Debian testing (LP: #906759).  Remaining changes:
+    - 1/rules/utils.mk.in: add some text before listing missing file to make
+      it easier to see from the build log (LP #509249, Debian #565771)
+    - 1/class/gnome.mk.in: Call dh_translations.
+    - test/testsuite_functions: Set NO_PKG_MANGLE so that tests do not fail
+      with pkgstriptranslations installed. (Ubuntu specific)
+    - 1/rules/debhelper.mk.in: Call dh_scour. debian/control.in: Add scour
+      build and binary dependency (build dep for test suite).
+    - 1/class/python-distutils.mk.in, 1/class/python-module.mk.in: Add
+      --prefix support for pysupport by DEB_PYTHON_PREFIX_ARG (LP #625581)
+    - Drop build dependencies on python-support and python-central.
+    - Disable distutils pycentral and pysupport tests if the tools are
+      not present (LP #904248).
+    - Makefile.in, configure, configure.ac, debian/control.in,
+      test/Makefile.am, test/Makefile.in: drop build dependency on
+      python-support and python-central
+
+ -- Anders Kaseorg <andersk@mit.edu>  Tue, 20 Dec 2011 02:45:48 -0500
+
 cdbs (0.4.100) unstable; urgency=low
 
   * Fix strip whitespace to avoid resolving unnecessary tight build-
@@ -6,6 +33,29 @@ cdbs (0.4.100) unstable; urgency=low
 
  -- Jonas Smedegaard <dr@jones.dk>  Tue, 29 Nov 2011 20:48:26 +0700
 
+cdbs (0.4.99ubuntu2) precise; urgency=low
+
+  * Drop build dependencies on python-support and python-central.
+  * Disable distutils pycentral and pysupport tests if the tools are
+    not present. LP: #904248.
+
+ -- Matthias Klose <doko@ubuntu.com>  Sat, 17 Dec 2011 21:26:57 +0100
+
+cdbs (0.4.99ubuntu1) precise; urgency=low
+
+  * Merge with Debian unstable. Remaining Ubuntu changes:
+    - 1/rules/utils.mk.in: add some text before listing missing file to make
+      it easier to see from the build log (LP #509249, Debian #565771)
+    - 1/class/gnome.mk.in: Call dh_translations.
+    - test/testsuite_functions: Set NO_PKG_MANGLE so that tests do not fail
+      with pkgstriptranslations installed. (Ubuntu specific)
+    - 1/rules/debhelper.mk.in: Call dh_scour. debian/control.in: Add scour
+      build and binary dependency (build dep for test suite).
+    - 1/class/python-distutils.mk.in, 1/class/python-module.mk.in: Add
+      --prefix support for pysupport by DEB_PYTHON_PREFIX_ARG (LP #625581)
+
+ -- Martin Pitt <martin.pitt@ubuntu.com>  Tue, 11 Oct 2011 07:32:03 +0200
+
 cdbs (0.4.99) unstable; urgency=low
 
   * Fix suppress accidental build-dependency on ourself.
diff -pruN 0.4.100/debian/control 0.4.100ubuntu2/debian/control
--- 0.4.100/debian/control	2011-09-16 19:51:13.000000000 +0000
+++ 0.4.100ubuntu2/debian/control	2012-02-07 03:38:11.000000000 +0000
@@ -1,7 +1,8 @@
 Source: cdbs
 Section: devel
 Priority: optional
-Maintainer: CDBS Hackers <build-common-hackers@lists.alioth.debian.org>
+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
+XSBC-Original-Maintainer: CDBS Hackers <build-common-hackers@lists.alioth.debian.org>
 Build-Depends-Indep: devscripts,
  debhelper,
  dh-buildinfo,
@@ -10,12 +11,11 @@ Build-Depends-Indep: devscripts,
  python-dev,
  python-all-dev,
  python3-all-dev,
- python-central,
- python-support,
  ant,
  default-jdk,
  sharutils,
  lzma,
+ python-scour,
  devscripts (>= 2.10.7)
 Uploaders: Jonas Smedegaard <dr@jones.dk>,
  Marc Dequènes (Duck) <Duck@DuckCorp.org>,
@@ -27,6 +27,8 @@ Vcs-Browser: http://git.debian.org/?p=co
 
 Package: cdbs
 Architecture: all
+Multi-Arch: foreign
+Depends: dh-translations, python-scour
 Recommends: autotools-dev
 Suggests: devscripts
 Description: common build system for Debian packages
diff -pruN 0.4.100/debian/control.in 0.4.100ubuntu2/debian/control.in
--- 0.4.100/debian/control.in	2011-09-16 18:43:31.000000000 +0000
+++ 0.4.100ubuntu2/debian/control.in	2012-02-07 03:38:01.000000000 +0000
@@ -1,19 +1,19 @@
 Source: cdbs
 Section: devel
 Priority: optional
-Maintainer: CDBS Hackers <build-common-hackers@lists.alioth.debian.org>
+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
+XSBC-Original-Maintainer: CDBS Hackers <build-common-hackers@lists.alioth.debian.org>
 Build-Depends-Indep: @cdbs@,
  realpath,
  fakeroot,
  python-dev,
  python-all-dev,
  python3-all-dev,
- python-central,
- python-support,
  ant,
  default-jdk,
  sharutils,
  lzma,
+ python-scour,
  devscripts (>= 2.10.7)
 Uploaders: Jonas Smedegaard <dr@jones.dk>,
  Marc Dequènes (Duck) <Duck@DuckCorp.org>,
@@ -25,6 +25,8 @@ Vcs-Browser: http://git.debian.org/?p=co
 
 Package: cdbs
 Architecture: all
+Multi-Arch: foreign
+Depends: dh-translations, python-scour
 Recommends: autotools-dev
 Suggests: devscripts
 Description: common build system for Debian packages
diff -pruN 0.4.100/Makefile.in 0.4.100ubuntu2/Makefile.in
--- 0.4.100/Makefile.in	2011-04-17 03:25:05.000000000 +0000
+++ 0.4.100ubuntu2/Makefile.in	2012-02-07 03:14:20.000000000 +0000
@@ -53,7 +53,7 @@ POST_UNINSTALL = :
 subdir = .
 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
 	$(top_srcdir)/configure $(am__configure_deps) mkinstalldirs \
-	mkinstalldirs $(dist_man_MANS)
+	$(dist_man_MANS)
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -137,6 +137,8 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
+PYCENTRAL = @PYCENTRAL@
+PYSUPPORT = @PYSUPPORT@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
diff -pruN 0.4.100/test/Makefile.am 0.4.100ubuntu2/test/Makefile.am
--- 0.4.100/test/Makefile.am	2010-12-26 23:15:14.000000000 +0000
+++ 0.4.100ubuntu2/test/Makefile.am	2012-02-07 03:14:20.000000000 +0000
@@ -20,6 +20,23 @@ TESTS_ENVIRONMENT = TESTS_SILENT=true
 
 EXTRA_DIST = testsuite_functions
 
+if HAVE_PYCENTRAL
+PYCENTRAL_TESTS = \
+	distutils-1.sh \
+	distutils-2.sh \
+	distutils-3.sh \
+	distutils-4.sh
+endif
+
+if HAVE_PYSUPPORT
+PYSUPPORT_TESTS = \
+	distutils-5.sh \
+	distutils-6.sh \
+	distutils-7.sh \
+	distutils-8.sh \
+	python-custom-prefix.sh
+endif
+	
 TESTS = autotools-1.sh \
 	autotools-2.sh \
 	autotools-3.sh \
@@ -38,14 +55,8 @@ TESTS = autotools-1.sh \
 	debhelper-7.sh \
 	patchsys-1.sh \
 	list-missing-1.sh \
-	distutils-1.sh \
-	distutils-2.sh \
-	distutils-3.sh \
-	distutils-4.sh \
-	distutils-5.sh \
-	distutils-6.sh \
-	distutils-7.sh \
-	distutils-8.sh \
+	$(PYCENTRAL_TESTS) \
+	$(PYSUPPORT_TESTS) \
 	distutils-9.sh \
 	distutils-10.sh \
 	distutils-11.sh \
diff -pruN 0.4.100/test/Makefile.in 0.4.100ubuntu2/test/Makefile.in
--- 0.4.100/test/Makefile.in	2011-04-17 03:25:05.000000000 +0000
+++ 0.4.100ubuntu2/test/Makefile.in	2012-02-07 03:14:20.000000000 +0000
@@ -75,6 +75,8 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
+PYCENTRAL = @PYCENTRAL@
+PYSUPPORT = @PYSUPPORT@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
@@ -122,6 +124,19 @@ top_srcdir = @top_srcdir@
 # Run these tests silently so we can see what fails
 TESTS_ENVIRONMENT = TESTS_SILENT=true
 EXTRA_DIST = testsuite_functions
+@HAVE_PYCENTRAL_TRUE@PYCENTRAL_TESTS = \
+@HAVE_PYCENTRAL_TRUE@	distutils-1.sh \
+@HAVE_PYCENTRAL_TRUE@	distutils-2.sh \
+@HAVE_PYCENTRAL_TRUE@	distutils-3.sh \
+@HAVE_PYCENTRAL_TRUE@	distutils-4.sh
+
+@HAVE_PYSUPPORT_TRUE@PYSUPPORT_TESTS = \
+@HAVE_PYSUPPORT_TRUE@	distutils-5.sh \
+@HAVE_PYSUPPORT_TRUE@	distutils-6.sh \
+@HAVE_PYSUPPORT_TRUE@	distutils-7.sh \
+@HAVE_PYSUPPORT_TRUE@	distutils-8.sh \
+@HAVE_PYSUPPORT_TRUE@	python-custom-prefix.sh
+
 TESTS = autotools-1.sh \
 	autotools-2.sh \
 	autotools-3.sh \
@@ -140,14 +155,8 @@ TESTS = autotools-1.sh \
 	debhelper-7.sh \
 	patchsys-1.sh \
 	list-missing-1.sh \
-	distutils-1.sh \
-	distutils-2.sh \
-	distutils-3.sh \
-	distutils-4.sh \
-	distutils-5.sh \
-	distutils-6.sh \
-	distutils-7.sh \
-	distutils-8.sh \
+	$(PYCENTRAL_TESTS) \
+	$(PYSUPPORT_TESTS) \
 	distutils-9.sh \
 	distutils-10.sh \
 	distutils-11.sh \
diff -pruN 0.4.100/test/python-custom-prefix.sh 0.4.100ubuntu2/test/python-custom-prefix.sh
--- 0.4.100/test/python-custom-prefix.sh	1970-01-01 00:00:00.000000000 +0000
+++ 0.4.100ubuntu2/test/python-custom-prefix.sh	2012-02-07 03:14:20.000000000 +0000
@@ -0,0 +1,50 @@
+#!/bin/bash
+# -*- mode: sh; coding: utf-8 -*-
+# Copyright © 2003 Jeff Bailey <jbailey@debian.org>
+# Copyright © 2009 Jonas Smedegaard <dr@jones.dk>
+#
+# 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, 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, see <http://www.gnu.org/licenses/>.
+
+# Test distutils indep package pysupport with custom prefix
+
+. testsuite_functions
+
+options $@
+setup_workdir
+set -e
+cat <<EOF >$WORKDIR/debian/rules
+#!/usr/bin/make -f
+DEB_PYTHON_SYSTEM = pysupport
+DEB_PYTHON_PREFIX_ARG = /opt/testpkg
+include debian/testsuite.mk
+include \$(_cdbs_package_root_dir)/1/rules/debhelper.mk.in
+include \$(_cdbs_package_root_dir)/1/class/python-distutils.mk.in
+EOF
+chmod +x $WORKDIR/debian/rules
+
+sed -i \
+	-e 's/Package: cdbs-testsuite/Package: python-cdbs-testsuite/' \
+	-e 's/Architecture: any/Architecture: all/' \
+	$WORKDIR/debian/control
+
+cp -R distutils/* $WORKDIR
+
+build_package
+
+dpkg -c $WORKDIR/../python-cdbs-testsuite_0.1_all.deb \
+	| grep -q '/opt/testpkg/share/py\(thon-support/python-cdbs-testsuite\|shared\)/testing/foo.py' \
+	|| return_fail
+
+clean_workdir
+return_pass
diff -pruN 0.4.100/test/testsuite_functions 0.4.100ubuntu2/test/testsuite_functions
--- 0.4.100/test/testsuite_functions	2010-05-22 20:52:01.000000000 +0000
+++ 0.4.100ubuntu2/test/testsuite_functions	2012-02-07 03:14:20.000000000 +0000
@@ -19,6 +19,8 @@ if test "$(basename $(pwd))" != 'test'; 
   exit 1
 fi
 
+export NO_PKG_MANGLE=1
+
 _cdbs_test_basedir=`pwd`/workdir
 WORKDIR=$_cdbs_test_basedir/cdbs-testsuite-0.1
 SRCDIR=$(realpath $(dirname $0)/../)

