DEB_AUTO_UPDATE_ACLOCAL = 1.10
DEB_AUTO_UPDATE_LIBTOOL = pre
+# dh_buildinfo fails at multiarch: http://bugs.debian.org/620104
+CDBS_BUILD_DEPENDS_rules_debhelper_buildinfo =
+
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk
DEB_DH_INSTALL_SOURCEDIR = $(DEB_DESTDIR)
DEB_CONFIGURE_PREFIX = /
+ifneq ($(DEB_HOST_MULTIARCH),)
+ export DH_COMPAT = 9
+ DEB_CONFIGURE_EXTRA_FLAGS += $(MULTIARCH_CONFIGURE_FLAGS)
+ MULTIARCH_CONFIGURE_FLAGS = --libdir='$${prefix}/lib/$(DEB_HOST_MULTIARCH)'
+ DEB_DH_GENCONTROL_ARGS_libnss-nonlocal += -- -DMulti-Arch=same
+endif
+
IS_UBUNTU := $(if $(filter Ubuntu,$(shell lsb_release -is)),y)
LIBC6_VERSION := $(shell dpkg-query --showformat='$${Version}' --show libc6)
libc6_ge = $(shell dpkg --compare-versions '$(LIBC6_VERSION)' ge '$(1)' && echo y)
DEB_BUILDDIR_lib32nss-nonlocal = debian/build_32
cleanbuilddir/lib32nss-nonlocal:: clean/lib32nss-nonlocal
+configure/lib32nss-nonlocal:: MULTIARCH_CONFIGURE_FLAGS =
configure/lib32nss-nonlocal:: cdbs_crossbuild =
# i386_configure_target in eglibc/debian/sysdeps/amd64.mk
ifeq ($(or $(IS_UBUNTU),$(call libc6_ge,2.8+20080809)),y)
DEB_BUILDDIR_lib64nss-nonlocal = debian/build_64
cleanbuilddir/lib64nss-nonlocal:: clean/lib64nss-nonlocal
+configure/lib64nss-nonlocal:: MULTIARCH_CONFIGURE_FLAGS =
configure/lib64nss-nonlocal:: cdbs_crossbuild =
# amd64_configure_target in eglibc/debian/sysdeps/i386.mk
configure/lib64nss-nonlocal:: DEB_BUILD_GNU_TYPE = x86_64-linux