]> andersk Git - nss_nonlocal.git/blobdiff - debian/rules
Update build flags for biarch packages.
[nss_nonlocal.git] / debian / rules
index 53bd2c1515c9386abb1171e98311b714a22e6c41..c92070ce365f715ff2fadcd5b9a15ccd6916d323 100755 (executable)
@@ -13,8 +13,11 @@ DEB_DESTDIR = $(CURDIR)/debian/tmp/
 DEB_DH_INSTALL_SOURCEDIR = $(DEB_DESTDIR)
 DEB_CONFIGURE_PREFIX = /
 
+IS_UBUNTU := $(if $(filter Ubuntu, $(shell lsb_release -is)), y)
 LIBC6_VERSION := $(shell dpkg-query --showformat='$${Version}' --show libc6)
-ifeq ($(shell dpkg --compare-versions '$(LIBC6_VERSION)' '>=' '2.8+20080809' && echo y),y)
+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
 
@@ -29,20 +32,29 @@ DEB_BUILDDIR = $(or $(DEB_BUILDDIR_$(cdbs_curpkg)),debian/build)
 REAL_DEB_HOST_GNU_TYPE := $(DEB_HOST_GNU_TYPE)
 
 DEB_BUILDDIR_lib32nss-nonlocal = debian/build_32
-configure/lib32nss-nonlocal:: CC += -m32
 cleanbuilddir/lib32nss-nonlocal:: clean/lib32nss-nonlocal
-ifeq ($(shell lsb_release -is), Ubuntu)
+# i386_configure_target in eglibc/debian/sysdeps/amd64.mk
+ifeq ($(or $(IS_UBUNTU), $(call libc6_ge, 2.8+20080809)), y)
 configure/lib32nss-nonlocal:: DEB_BUILD_GNU_TYPE = i686-linux
-configure/lib32nss-nonlocal:: DEB_CONFIGURE_EXTRA_FLAGS += --libdir="\$${prefix}/lib32"
 else
 configure/lib32nss-nonlocal:: DEB_BUILD_GNU_TYPE = i486-linux
+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)
+configure/lib32nss-nonlocal:: DEB_CONFIGURE_EXTRA_FLAGS += --libdir="\$${prefix}/lib32"
+else
 configure/lib32nss-nonlocal:: DEB_CONFIGURE_PREFIX = /emul/ia32-linux
 endif
 
 DEB_BUILDDIR_lib64nss-nonlocal = debian/build_64
+cleanbuilddir/lib64nss-nonlocal:: clean/lib64nss-nonlocal
+# 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
 configure/lib64nss-nonlocal:: CC += -m64 -D__x86_64__
-cleanbuilddir/lib64nss-nonlocal:: clean/lib64nss-nonlocal
+# amd64_slibdir in eglibc/debian/sysdeps/i386.mk
 configure/lib64nss-nonlocal:: DEB_CONFIGURE_EXTRA_FLAGS += --libdir="\$${prefix}/lib64"
 
 configure/lib32nss-nonlocal configure/lib64nss-nonlocal::
This page took 0.026844 seconds and 4 git commands to generate.