1 | #!/usr/bin/make -f |
---|
2 | |
---|
3 | DEB_AUTO_UPDATE_AUTOCONF = 2.61 |
---|
4 | DEB_AUTO_UPDATE_AUTOHEADER = 2.61 |
---|
5 | DEB_AUTO_UPDATE_AUTOMAKE = 1.10 |
---|
6 | DEB_AUTO_UPDATE_ACLOCAL = 1.10 |
---|
7 | DEB_AUTO_UPDATE_LIBTOOL = pre |
---|
8 | |
---|
9 | # dh_buildinfo fails at multiarch: http://bugs.debian.org/620104 |
---|
10 | CDBS_BUILD_DEPENDS_rules_debhelper_buildinfo = |
---|
11 | |
---|
12 | include /usr/share/cdbs/1/rules/debhelper.mk |
---|
13 | include /usr/share/cdbs/1/class/autotools.mk |
---|
14 | |
---|
15 | DEB_DESTDIR = $(CURDIR)/debian/tmp/ |
---|
16 | DEB_DH_INSTALL_SOURCEDIR = $(DEB_DESTDIR) |
---|
17 | DEB_CONFIGURE_PREFIX = / |
---|
18 | |
---|
19 | ifneq ($(DEB_HOST_MULTIARCH),) |
---|
20 | export DH_COMPAT = 9 |
---|
21 | DEB_CONFIGURE_EXTRA_FLAGS += $(MULTIARCH_CONFIGURE_FLAGS) |
---|
22 | MULTIARCH_CONFIGURE_FLAGS = --libdir='$${prefix}/lib/$(DEB_HOST_MULTIARCH)' |
---|
23 | DEB_DH_GENCONTROL_ARGS_libnss-nonlocal += -- -DMulti-Arch=same |
---|
24 | endif |
---|
25 | |
---|
26 | IS_UBUNTU := $(if $(filter Ubuntu,$(shell lsb_release -is)),y) |
---|
27 | LIBC6_VERSION := $(shell dpkg-query --showformat='$${Version}' --show libc6) |
---|
28 | libc6_ge = $(shell dpkg --compare-versions '$(LIBC6_VERSION)' ge '$(1)' && echo y) |
---|
29 | |
---|
30 | debian/stamp-autotools-files: DEB_AUTO_UPDATE_AUTOMAKE += --foreign --add-missing |
---|
31 | |
---|
32 | debian/stamp-autotools-files: aclocal.m4 |
---|
33 | aclocal.m4: |
---|
34 | touch $@ |
---|
35 | |
---|
36 | DEB_BUILDDIR = $(or $(DEB_BUILDDIR_$(cdbs_curpkg)),debian/build) |
---|
37 | |
---|
38 | REAL_DEB_HOST_GNU_TYPE := $(DEB_HOST_GNU_TYPE) |
---|
39 | |
---|
40 | DEB_BUILDDIR_lib32nss-nonlocal = debian/build_32 |
---|
41 | cleanbuilddir/lib32nss-nonlocal:: clean/lib32nss-nonlocal |
---|
42 | configure/lib32nss-nonlocal:: MULTIARCH_CONFIGURE_FLAGS = |
---|
43 | configure/lib32nss-nonlocal:: cdbs_crossbuild = |
---|
44 | # i386_configure_target in eglibc/debian/sysdeps/amd64.mk |
---|
45 | ifeq ($(or $(IS_UBUNTU),$(call libc6_ge,2.8+20080809)),y) |
---|
46 | configure/lib32nss-nonlocal:: DEB_BUILD_GNU_TYPE = i686-linux |
---|
47 | else |
---|
48 | configure/lib32nss-nonlocal:: DEB_BUILD_GNU_TYPE = i486-linux |
---|
49 | endif |
---|
50 | # i386_CC in eglibc/debian/sysdeps/amd64.mk |
---|
51 | configure/lib32nss-nonlocal:: CC += -m32 |
---|
52 | # i386_slibdir in eglibc/debian/sysdeps/amd64.mk |
---|
53 | ifeq ($(or $(IS_UBUNTU),$(call libc6_ge,2.9-14~)),y) |
---|
54 | configure/lib32nss-nonlocal:: DEB_CONFIGURE_EXTRA_FLAGS += --libdir="\$${prefix}/lib32" |
---|
55 | binary-install/lib32nss-nonlocal:: DEB_DH_INSTALL_ARGS = 'lib32/*' |
---|
56 | else |
---|
57 | configure/lib32nss-nonlocal:: DEB_CONFIGURE_PREFIX = /emul/ia32-linux |
---|
58 | binary-install/lib32nss-nonlocal:: DEB_DH_INSTALL_ARGS = 'emul/ia32-linux/lib/*' |
---|
59 | endif |
---|
60 | |
---|
61 | DEB_BUILDDIR_lib64nss-nonlocal = debian/build_64 |
---|
62 | cleanbuilddir/lib64nss-nonlocal:: clean/lib64nss-nonlocal |
---|
63 | configure/lib64nss-nonlocal:: MULTIARCH_CONFIGURE_FLAGS = |
---|
64 | configure/lib64nss-nonlocal:: cdbs_crossbuild = |
---|
65 | # amd64_configure_target in eglibc/debian/sysdeps/i386.mk |
---|
66 | configure/lib64nss-nonlocal:: DEB_BUILD_GNU_TYPE = x86_64-linux |
---|
67 | # amd64_CC in eglibc/debian/sysdeps/i386.mk |
---|
68 | configure/lib64nss-nonlocal:: CC += -m64 -D__x86_64__ |
---|
69 | # amd64_slibdir in eglibc/debian/sysdeps/i386.mk |
---|
70 | configure/lib64nss-nonlocal:: DEB_CONFIGURE_EXTRA_FLAGS += --libdir="\$${prefix}/lib64" |
---|
71 | |
---|
72 | # Fix for CDBS ≥ 0.4.59ubuntu4, < 0.4.83ubuntu1 (karmic and lucid). |
---|
73 | configure/lib32nss-nonlocal configure/lib64nss-nonlocal:: DEB_CONFIGURE_SCRIPT_ENV += CC="$(CC)" |
---|
74 | |
---|
75 | configure/lib32nss-nonlocal configure/lib64nss-nonlocal:: |
---|
76 | $(DEB_CONFIGURE_INVOKE) $(cdbs_configure_flags) $(DEB_CONFIGURE_EXTRA_FLAGS) $(DEB_CONFIGURE_USER_FLAGS) |
---|
77 | |
---|
78 | build/lib32nss-nonlocal build/lib64nss-nonlocal:: |
---|
79 | +$(DEB_MAKE_INVOKE) $(DEB_MAKE_BUILD_TARGET) |
---|
80 | |
---|
81 | install/lib32nss-nonlocal install/lib64nss-nonlocal:: |
---|
82 | +$(DEB_MAKE_INVOKE) $(DEB_MAKE_INSTALL_TARGET) |
---|
83 | |
---|
84 | clean/lib32nss-nonlocal clean/lib64nss-nonlocal:: |
---|
85 | +-$(DEB_MAKE_INVOKE) -k $(DEB_MAKE_CLEAN_TARGET) |
---|
86 | |
---|
87 | clean:: |
---|
88 | rm -f aclocal.m4 config.guess config.sub install-sh ltmain.sh \ |
---|
89 | configure config.h.in missing depcomp Makefile.in |
---|