From 5eedad0d3949b1acad42e918d010c98392bf21d2 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Tue, 29 Mar 2011 02:05:53 -0400 Subject: [PATCH] Add multiarch support for distros from the future Signed-off-by: Anders Kaseorg --- debian/changelog | 1 + debian/control.in | 3 +++ debian/rules | 9 +++++++++ 3 files changed, 13 insertions(+) diff --git a/debian/changelog b/debian/changelog index 7b12592..8a0eb25 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,7 @@ libnss-nonlocal (2.0-0debathena1) UNRELEASED; urgency=low * Create magic ‘nss-nonlocal-users’ user. * Remove obsolete exclusion of glibc-private dependency. * Use automake 1.10 and autoconf 2.61. + * Add multiarch support for distros from the future. -- Anders Kaseorg Tue, 29 Mar 2011 00:45:31 -0400 diff --git a/debian/control.in b/debian/control.in index 36fd458..759fba5 100644 --- a/debian/control.in +++ b/debian/control.in @@ -9,6 +9,7 @@ Build-Depends: @cdbs@, gcc-multilib [amd64 i386] | gcc-4.1 (<< 4.1.2) [amd64 i38 Package: libnss-nonlocal Architecture: any +Pre-Depends: ${misc:Pre-Depends} Depends: ${shlibs:Depends}, ${misc:Depends} Description: nsswitch proxy module to prevent local account spoofing This nsswitch module acts as a proxy for other nsswitch modules like @@ -17,6 +18,7 @@ Description: nsswitch proxy module to prevent local account spoofing Package: lib32nss-nonlocal Architecture: amd64 +Pre-Depends: ${misc:Pre-Depends} Depends: ${shlibs:Depends}, ${misc:Depends} Description: nsswitch proxy module to prevent local account spoofing (32-bit library) This nsswitch module acts as a proxy for other nsswitch modules like @@ -28,6 +30,7 @@ Description: nsswitch proxy module to prevent local account spoofing (32-bit lib Package: lib64nss-nonlocal Architecture: i386 +Pre-Depends: ${misc:Pre-Depends} Depends: ${shlibs:Depends}, ${misc:Depends} Description: nsswitch proxy module to prevent local account spoofing (64-bit library) This nsswitch module acts as a proxy for other nsswitch modules like diff --git a/debian/rules b/debian/rules index 7868536..310099c 100755 --- a/debian/rules +++ b/debian/rules @@ -13,6 +13,13 @@ DEB_DESTDIR = $(CURDIR)/debian/tmp/ 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) @@ -29,6 +36,7 @@ REAL_DEB_HOST_GNU_TYPE := $(DEB_HOST_GNU_TYPE) 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) @@ -49,6 +57,7 @@ endif 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 -- 2.44.0