X-Git-Url: http://andersk.mit.edu/gitweb/nss_nonlocal.git/blobdiff_plain/8e0165e329b95bc913ca86cd5616144584f7aef7..407b359ffd190f9f7c27fc445d6c2662d8b77f18:/debian/rules diff --git a/debian/rules b/debian/rules index c92070c..c94a527 100755 --- a/debian/rules +++ b/debian/rules @@ -1,11 +1,14 @@ #!/usr/bin/make -f -DEB_AUTO_UPDATE_AUTOCONF = 2.50 -DEB_AUTO_UPDATE_AUTOHEADER = 2.50 -DEB_AUTO_UPDATE_AUTOMAKE = 1.9 -DEB_AUTO_UPDATE_ACLOCAL = 1.9 +DEB_AUTO_UPDATE_AUTOCONF = 2.61 +DEB_AUTO_UPDATE_AUTOHEADER = 2.61 +DEB_AUTO_UPDATE_AUTOMAKE = 1.10 +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 @@ -13,14 +16,17 @@ DEB_DESTDIR = $(CURDIR)/debian/tmp/ DEB_DH_INSTALL_SOURCEDIR = $(DEB_DESTDIR) DEB_CONFIGURE_PREFIX = / -IS_UBUNTU := $(if $(filter Ubuntu, $(shell lsb_release -is)), y) +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) -ifeq ($(call libc6_ge, 2.8+20080809), y) - DEB_DH_SHLIBDEPS_ARGS = -- -xglibc-private -endif - debian/stamp-autotools-files: DEB_AUTO_UPDATE_AUTOMAKE += --foreign --add-missing debian/stamp-autotools-files: aclocal.m4 @@ -33,8 +39,10 @@ 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) +ifeq ($(or $(IS_UBUNTU),$(call libc6_ge,2.8+20080809)),y) configure/lib32nss-nonlocal:: DEB_BUILD_GNU_TYPE = i686-linux else configure/lib32nss-nonlocal:: DEB_BUILD_GNU_TYPE = i486-linux @@ -42,14 +50,18 @@ endif # i386_CC in eglibc/debian/sysdeps/amd64.mk configure/lib32nss-nonlocal:: CC += -m32 # i386_slibdir in eglibc/debian/sysdeps/amd64.mk -ifeq ($(or $(IS_UBUNTU), $(call libc6_ge, 2.9-14~)), y) +ifeq ($(or $(IS_UBUNTU),$(call libc6_ge,2.9-14~)),y) configure/lib32nss-nonlocal:: DEB_CONFIGURE_EXTRA_FLAGS += --libdir="\$${prefix}/lib32" +binary-install/lib32nss-nonlocal:: DEB_DH_INSTALL_ARGS = 'lib32/*' else configure/lib32nss-nonlocal:: DEB_CONFIGURE_PREFIX = /emul/ia32-linux +binary-install/lib32nss-nonlocal:: DEB_DH_INSTALL_ARGS = 'emul/ia32-linux/lib/*' 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 # amd64_CC in eglibc/debian/sysdeps/i386.mk @@ -57,6 +69,9 @@ configure/lib64nss-nonlocal:: CC += -m64 -D__x86_64__ # amd64_slibdir in eglibc/debian/sysdeps/i386.mk configure/lib64nss-nonlocal:: DEB_CONFIGURE_EXTRA_FLAGS += --libdir="\$${prefix}/lib64" +# Fix for CDBS ≥ 0.4.59ubuntu4, < 0.4.83ubuntu1 (karmic and lucid). +configure/lib32nss-nonlocal configure/lib64nss-nonlocal:: DEB_CONFIGURE_SCRIPT_ENV += CC="$(CC)" + configure/lib32nss-nonlocal configure/lib64nss-nonlocal:: $(DEB_CONFIGURE_INVOKE) $(cdbs_configure_flags) $(DEB_CONFIGURE_EXTRA_FLAGS) $(DEB_CONFIGURE_USER_FLAGS)