Whamcloud - gitweb
debian: fix cross build support
authorTheodore Ts'o <tytso@mit.edu>
Sat, 28 Dec 2013 22:21:17 +0000 (17:21 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 28 Dec 2013 22:21:17 +0000 (17:21 -0500)
We need to explicitly specify the $DEB_BUILD_HOST when querying for
the version of the libblkid1 package.

Addresses-Debian-Bug: #721365

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
debian/rules

index de7d614..245cf50 100755 (executable)
 # be paranoid
 export LC_ALL ?= C
 
-# Allow distro-specific behaviour
-DISTRO :=$(shell sed -ne '/DISTRIB_ID/s/.*=//p' /etc/lsb-release 2>/dev/null || echo Debian)
-SYS_BLKID_VER := $(shell dpkg-query -W libblkid1 | cut -f 2 | cut -b 1)
-ifeq ($(SYS_BLKID_VER),2)
-UTIL_LINUX_NG ?= yes
-endif
-
 # These are used for cross-compiling and for saving the configure script
 # from having to guess our platform (since we know it already)
 DEB_HOST_ARCH          ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
@@ -28,6 +21,13 @@ DEB_HOST_GNU_TYPE    ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE     ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 DEB_HOST_MULTIARCH     ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH 2>/dev/null)
 
+# Allow distro-specific behaviour
+DISTRO :=$(shell sed -ne '/DISTRIB_ID/s/.*=//p' /etc/lsb-release 2>/dev/null || echo Debian)
+SYS_BLKID_VER := $(shell dpkg-query -W libblkid1:$(DEB_HOST_ARCH) | cut -f 2 | cut -b 1)
+ifeq ($(SYS_BLKID_VER),2)
+UTIL_LINUX_NG ?= yes
+endif
+
 # find the version for the main package, from changelog file
 MAIN_VERSION = $(shell head -n 1 debian/changelog | cut '-d ' -f 2 | sed 's/[()]//g')
 # find versions for libraries going into their own packages, from their Makefile.in's,