diff -Nru sbuild-0.63.2/debian/changelog sbuild-0.63.2/debian/changelog
--- sbuild-0.63.2/debian/changelog	2013-01-17 14:00:53.000000000 +0000
+++ sbuild-0.63.2/debian/changelog	2013-01-30 12:42:26.000000000 +0000
@@ -1,3 +1,10 @@
+sbuild (0.63.2-1.1ubuntu2~profile1) precise; urgency=low
+
+  [ P. J. McDermott ]
+  * Add support for build profiles. 
+
+ -- Wookey <wookey@wookware.org>  Wed, 30 Jan 2013 12:17:27 +0000
+
 sbuild (0.63.2-1.1ubuntu1) raring; urgency=low
 
   * Merge from Debian unstable. Remaining changes:
diff -Nru sbuild-0.63.2/debian/control sbuild-0.63.2/debian/control
--- sbuild-0.63.2/debian/control	2012-11-28 12:42:59.000000000 +0000
+++ sbuild-0.63.2/debian/control	2013-01-30 12:47:45.000000000 +0000
@@ -4,7 +4,7 @@
 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
 XSBC-Original-Maintainer: Debian buildd-tools Developers <buildd-tools-devel@lists.alioth.debian.org>
 Uploaders: Michael Banck <mbanck@debian.org>, Roger Leigh <rleigh@debian.org>, Francesco Paolo Lovergine <frankie@debian.org>
-Build-Depends: debhelper (>> 7.0.0), groff-base, perl-modules, libexception-class-perl, libfilesys-df-perl, libio-zlib-perl, libmime-lite-perl, libdpkg-perl (>= 1.15.5)
+Build-Depends: debhelper (>> 7.0.0), groff-base, perl-modules, libexception-class-perl, libfilesys-df-perl, libio-zlib-perl, libmime-lite-perl, libdpkg-perl (>= 1.16.7+nmu1)
 Standards-Version: 3.9.1
 Vcs-Browser: http://git.debian.org/?p=buildd-tools/sbuild.git
 Vcs-Git: git://git.debian.org/git/buildd-tools/sbuild
diff -Nru sbuild-0.63.2/debian/patches/build-profile-support.patch sbuild-0.63.2/debian/patches/build-profile-support.patch
--- sbuild-0.63.2/debian/patches/build-profile-support.patch	1970-01-01 01:00:00.000000000 +0100
+++ sbuild-0.63.2/debian/patches/build-profile-support.patch	2013-01-30 13:07:52.000000000 +0000
@@ -0,0 +1,173 @@
+Description: Add support for build-profiles
+ Allow a build profile to be specified by setting DEB_BUILD_PROFILE
+ or --profile which is then passed on to apt for the cross 
+ build-depends step. Native build-depends support is missing in this
+ patch.
+ .
+ sbuild (0.63.2-1.1ubuntu2) precise; urgency=low
+ .
+   [ P. J. McDermott ]
+   * Add support for build profiles.
+Author: Wookey <wookey@wookware.org>
+
+Origin: other, http://bootstrap.pehjota.net/sbuild/sbuild-build-profiles.debdiff.r4 
+Reviewed-By: Wookey
+Last-Update: 2013-01-30
+
+Index: sbuild-0.63.2/bin/sbuild
+===================================================================
+--- sbuild-0.63.2.orig/bin/sbuild	2013-01-30 12:36:01.000000000 +0000
++++ sbuild-0.63.2/bin/sbuild	2013-01-30 12:36:01.000000000 +0000
+@@ -107,6 +107,8 @@
+ 	    if $conf->get('DEBUG' && defined($conf->get('HOST_ARCH')));
+ 	print "Selected build architecture " . $conf->get('BUILD_ARCH') . "\n"
+ 	    if $conf->get('DEBUG' && defined($conf->get('BUILD_ARCH')));
++	print "Selected build profile " . $conf->get('BUILD_PROFILE') . "\n"
++	    if $conf->get('DEBUG' && defined($conf->get('BUILD_PROFILE')));
+ 
+ 	$job = Sbuild::Build->new($jobname, $conf);
+ 	$job->set('Pkg Status Trigger', \&status_trigger);
+Index: sbuild-0.63.2/lib/Sbuild/ConfBase.pm
+===================================================================
+--- sbuild-0.63.2.orig/lib/Sbuild/ConfBase.pm	2013-01-30 12:36:01.000000000 +0000
++++ sbuild-0.63.2/lib/Sbuild/ConfBase.pm	2013-01-30 12:36:01.000000000 +0000
+@@ -168,6 +168,13 @@
+ 	    DEFAULT => $native_arch,
+ 	    HELP => 'Build architecture (Arch we are building on).'
+ 	},
++	'BUILD_PROFILE'				=> {
++	    TYPE => 'STRING',
++	    VARNAME => 'build_profile',
++	    GROUP => 'Build options',
++	    DEFAULT => (defined($ENV{'DEB_BUILD_PROFILE'}) ? $ENV{'DEB_BUILD_PROFILE'} : ''),
++	    HELP => 'Build profile.'
++	},
+ 	'HOSTNAME'				=> {
+ 	    TYPE => 'STRING',
+ 	    GROUP => '__INTERNAL',
+Index: sbuild-0.63.2/lib/Sbuild/ResolverBase.pm
+===================================================================
+--- sbuild-0.63.2.orig/lib/Sbuild/ResolverBase.pm	2013-01-30 12:36:01.000000000 +0000
++++ sbuild-0.63.2/lib/Sbuild/ResolverBase.pm	2013-01-30 12:36:01.000000000 +0000
+@@ -58,6 +58,7 @@
+     # Typically set by Sbuild::Build, but not outside a build context.
+     $self->set('Host Arch', $self->get_conf('HOST_ARCH'));
+     $self->set('Build Arch', $self->get_conf('BUILD_ARCH'));
++    $self->set('Build Profile', $self->get_conf('BUILD_PROFILE'));
+ 
+     my $dummy_archive_list_file = $session->get('Location') .
+         '/etc/apt/sources.list.d/sbuild-build-depends-archive.list';
+@@ -721,11 +722,15 @@
+     my $positive = deps_parse(join(", ", @positive,
+ 				   @positive_arch, @positive_indep),
+ 			      reduce_arch => 1,
+-			      host_arch => $self->get('Host Arch'));
++			      host_arch => $self->get('Host Arch'),
++			      reduce_profile => 1,
++			      build_profile => $self->get('Build Profile'));
+     my $negative = deps_parse(join(", ", @negative,
+ 				   @negative_arch, @negative_indep),
+ 			      reduce_arch => 1,
+-			      host_arch => $self->get('Host Arch'));
++			      host_arch => $self->get('Host Arch'),
++			      reduce_profile => 1,
++			      build_profile => $self->get('Build Profile'));
+ 
+     $self->log("Merged Build-Depends: $positive\n") if $positive;
+     $self->log("Merged Build-Conflicts: $negative\n") if $negative;
+Index: sbuild-0.63.2/lib/Sbuild/Options.pm
+===================================================================
+--- sbuild-0.63.2.orig/lib/Sbuild/Options.pm	2013-01-30 12:36:01.000000000 +0000
++++ sbuild-0.63.2/lib/Sbuild/Options.pm	2013-01-30 12:36:01.000000000 +0000
+@@ -55,6 +55,9 @@
+ 		       "no-arch-all" => sub {
+ 			   $self->set_conf('BUILD_ARCH_ALL', 0);
+ 		       },
++		       "profile=s" => sub {
++			   $self->set_conf('BUILD_PROFILE', $_[1]);
++		       },
+ 		       "add-depends=s" => sub {
+ 			   push(@{$self->get_conf('MANUAL_DEPENDS')}, $_[1]);
+ 		       },
+Index: sbuild-0.63.2/lib/Sbuild/Build.pm
+===================================================================
+--- sbuild-0.63.2.orig/lib/Sbuild/Build.pm	2013-01-30 12:36:01.000000000 +0000
++++ sbuild-0.63.2/lib/Sbuild/Build.pm	2013-01-30 13:07:26.000000000 +0000
+@@ -271,6 +271,7 @@
+ 	# Acquire the architectures we're building for and on.
+ 	$self->set('Host Arch', $self->get_conf('HOST_ARCH'));
+ 	$self->set('Build Arch', $self->get_conf('BUILD_ARCH'));
++	$self->set('Build Profile', $self->get_conf('BUILD_PROFILE'));
+ 
+ 	my $dist = $self->get_conf('DISTRIBUTION');
+ 	if (!defined($dist) || !$dist) {
+@@ -468,6 +469,7 @@
+ 	$resolver->set('Arch', $self->get_conf('ARCH'));
+ 	$resolver->set('Host Arch', $self->get_conf('HOST_ARCH'));
+ 	$resolver->set('Build Arch', $self->get_conf('BUILD_ARCH'));
++	$resolver->set('Build Profile', $self->get_conf('BUILD_PROFILE'));
+ 	$resolver->set('Chroot Build Dir', $self->get('Chroot Build Dir'));
+ 	$self->set('Dependency Resolver', $resolver);
+ 
+@@ -604,6 +606,7 @@
+     eval {
+ 	my $session = $self->get('Session');
+ 	my $resolver = $self->get('Dependency Resolver');
++	my $build_profile = $self->get('Build Profile');
+ 
+ 	$self->check_abort();
+ 	if (!$self->fetch_source_files()) {
+@@ -676,11 +679,15 @@
+ 							failstage => "install-deps");
+ 						}
+ 	} else { # cross-building
+-		# install cross-deps. Hacked for now - need to generate dummy package
++		my $profile_opt="";
++		# install cross-deps. Hacked for now - better to generate dummy package
+ 		$self->log_subsection('Install cross build-dependencies (apt-get -a)');
+-		$self->log('Cross-deps: Running apt-get -a' . $self->get('Host Arch') . ' build-dep ' . $self->get('Package') . "\n");
++		if ($build_profile) {
++			$profile_opt=" -o APT::Build-Profile=$build_profile"
++		}
++		$self->log('Cross-deps: Running apt-get -a' . $self->get('Host Arch') . $profile_opt . ' build-dep ' . $self->get('Package') . "\n");
+ 		$resolver->run_apt_command(
+-			{ COMMAND => [$self->get_conf('APT_GET'),  '-a' . $self->get('Host Arch'), 'build-dep', '-yf', $self->get('Package')],
++			{ COMMAND => [$self->get_conf('APT_GET'),  '-a' . $self->get('Host Arch'), $profile_opt, 'build-dep', '-yf', $self->get('Package')],
+ 			ENV => {'DEBIAN_FRONTEND' => 'noninteractive'},
+ 			USER => 'root',
+ 			DIR => '/' });
+@@ -1230,6 +1237,7 @@
+     my $build_dir = $self->get('Chroot Build Dir');
+     my $host_arch = $self->get('Host Arch');
+     my $build_arch = $self->get('Build Arch');
++    my $build_profile = $self->get('Build Profile');
+ 
+     my( $rv, $changes );
+     local( *PIPE, *F, *F2 );
+@@ -1449,6 +1457,10 @@
+ 	push (@{$buildcmd}, '-a' . $host_arch);
+     }
+ 
++    if ($build_profile) {
++	push (@{$buildcmd}, '-P' . $build_profile);
++    }
++
+     if (defined($self->get_conf('PGP_OPTIONS')) &&
+ 	$self->get_conf('PGP_OPTIONS')) {
+ 	if (ref($self->get_conf('PGP_OPTIONS')) eq 'ARRAY') {
+@@ -1916,6 +1928,7 @@
+     $self->add_stat('Machine Architecture', $self->get_conf('ARCH'));
+     $self->add_stat('Host Architecture', $self->get('Host Arch'));
+     $self->add_stat('Build Architecture', $self->get('Build Arch'));
++    $self->add_stat('Build Profile', $self->get('Build Profile'));
+     $self->add_stat('Distribution', $self->get_conf('DISTRIBUTION'));
+     $self->add_stat('Space', $self->get('This Space'));
+     $self->add_stat('Build-Time',
+@@ -2186,6 +2199,7 @@
+     $self->log("Machine Architecture: " . $self->get_conf('ARCH') . "\n");
+     $self->log("Host Architecture: " . $self->get('Host Arch') . "\n");
+     $self->log("Build Architecture: " . $self->get('Build Arch') . "\n");
++    $self->log("Build Profile: " . $self->get('Build Profile') . "\n");
+     $self->log("\n");
+ }
+ 
diff -Nru sbuild-0.63.2/debian/patches/series sbuild-0.63.2/debian/patches/series
--- sbuild-0.63.2/debian/patches/series	2013-01-17 13:58:33.000000000 +0000
+++ sbuild-0.63.2/debian/patches/series	2013-01-30 12:36:01.000000000 +0000
@@ -1,3 +1,4 @@
 do-not-install-debfoster-into-chroots.patch
 run-pre-build-hooks-as-root.patch
 fix-rev-0.patch
+build-profile-support.patch
