X-Git-Url: http://andersk.mit.edu/gitweb/nss_nonlocal.git/blobdiff_plain/21ca49e170d195bf58f9fb8feaa5ded54cb5f803..8e0165e329b95bc913ca86cd5616144584f7aef7:/debian/rules diff --git a/debian/rules b/debian/rules index d6a072e..c92070c 100755 --- a/debian/rules +++ b/debian/rules @@ -9,10 +9,15 @@ DEB_AUTO_UPDATE_LIBTOOL = pre include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/autotools.mk +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 @@ -22,6 +27,48 @@ debian/stamp-autotools-files: aclocal.m4 aclocal.m4: touch $@ +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 +cleanbuilddir/lib32nss-nonlocal:: clean/lib32nss-nonlocal +# 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 +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__ +# amd64_slibdir in eglibc/debian/sysdeps/i386.mk +configure/lib64nss-nonlocal:: DEB_CONFIGURE_EXTRA_FLAGS += --libdir="\$${prefix}/lib64" + +configure/lib32nss-nonlocal configure/lib64nss-nonlocal:: + $(DEB_CONFIGURE_INVOKE) $(cdbs_configure_flags) $(DEB_CONFIGURE_EXTRA_FLAGS) $(DEB_CONFIGURE_USER_FLAGS) + +build/lib32nss-nonlocal build/lib64nss-nonlocal:: + +$(DEB_MAKE_INVOKE) $(DEB_MAKE_BUILD_TARGET) + +install/lib32nss-nonlocal install/lib64nss-nonlocal:: + +$(DEB_MAKE_INVOKE) $(DEB_MAKE_INSTALL_TARGET) + +clean/lib32nss-nonlocal clean/lib64nss-nonlocal:: + +-$(DEB_MAKE_INVOKE) -k $(DEB_MAKE_CLEAN_TARGET) + clean:: rm -f aclocal.m4 config.guess config.sub install-sh ltmain.sh \ configure config.h.in missing depcomp Makefile.in