diff mbox

0002-Sbuild-Build-Add-dpkg-buildpackage-a-option-when-cro.patch

Message ID 20111214175952.GQ28260@dream.aleph1.co.uk
State Accepted
Headers show

Commit Message

Wookey Dec. 14, 2011, 5:59 p.m. UTC
From fb087412f62965f622aa7eb30e7e9743928bfb45 Mon Sep 17 00:00:00 2001
From: Roger Leigh <rleigh@debian.org>
Date: Mon, 12 Dec 2011 19:21:28 +0000
Subject: [PATCH 02/17] Sbuild::Build: Add dpkg-buildpackage -a option when
 cross building

---
 lib/Sbuild/Build.pm |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/lib/Sbuild/Build.pm b/lib/Sbuild/Build.pm
index 4b1a017..88367ee 100644
--- a/lib/Sbuild/Build.pm
+++ b/lib/Sbuild/Build.pm
@@ -1413,6 +1413,10 @@  sub build {
 	    $self->get_conf('BUILD_ENV_CMND'));
     push (@{$buildcmd}, 'dpkg-buildpackage');
 
+    if ($self->get_conf('BUILD_ARCH') != $self->get_conf('BUILD_ARCH')) {
+	push (@{$buildcmd}, '-a' . $self->get_conf('BUILD_ARCH'));
+    }
+
     if (defined($self->get_conf('PGP_OPTIONS')) &&
 	$self->get_conf('PGP_OPTIONS')) {
 	if (ref($self->get_conf('PGP_OPTIONS')) eq 'ARRAY') {