mkdeb: correctly map package architectures for x86 and ARM
authorClark Laughlin <clark.laughlin@linaro.org>
Wed, 12 Nov 2014 15:38:48 +0000 (09:38 -0600)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 20 Nov 2014 15:34:53 +0000 (15:34 +0000)
mkdeb previously set the package architecture to be 'amd64' for anything other than
XEN_TARGET_ARCH=x86_32.  This patch attempts to correctly map the architecture
from XEN_TARGET_ARCH to the Debian architecture names for x86 and ARM
architectures.

Signed-off-by: Clark Laughlin <clark.laughlin@linaro.org>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
tools/misc/mkdeb

index 3bbf881f5d1c3fd65634f370ddb778323f1afe0d..67b91cc1e54e0be386c509c6847eacdbacdcdc4e 100644 (file)
@@ -13,11 +13,17 @@ fi
 
 cd $1
 version=$2
-if test "$XEN_TARGET_ARCH" = "x86_32"; then
-  arch=i386
-else
-  arch=amd64
-fi
+
+# map the architecture, if necessary
+case "$XEN_TARGET_ARCH" in
+  x86_32|x86_32p)  arch=i386 ;;
+  x86_64)  arch=amd64 ;;
+  arm32)   arch=armhf ;;
+  arm64)   arch=$XEN_TARGET_ARCH;;
+  *) echo "Unknown XEN_TARGET_ARCH $XEN_TARGET_ARCH" >&2
+     exit 1
+     ;;
+esac
 
 # Prepare the directory to package
 cd dist