diff -aur clean/eglibc-2.12/debian//rules.d/build.mk 0617-czwartek/eglibc-2.12/debian//rules.d/build.mk --- clean/eglibc-2.12/debian//rules.d/build.mk 2010-06-25 11:38:22.000000000 +0200 +++ 0617-czwartek/eglibc-2.12/debian//rules.d/build.mk 2010-06-17 18:03:54.710520009 +0200 @@ -18,6 +18,9 @@ test -d $(DEB_BUILDDIR) || mkdir -p $(DEB_BUILDDIR) touch $@ +ifneq (,$(STAGE)) + libc_extra_config_options = $(extra_config_options) --disable-sanity-checks +endif $(patsubst %,configure_%,$(EGLIBC_PASSES)) :: configure_% : $(stamp)configure_% $(stamp)configure_%: $(stamp)mkbuilddir_% @echo Configuring $(curpass) @@ -84,6 +87,10 @@ $(patsubst %,build_%,$(EGLIBC_PASSES)) :: build_% : $(stamp)build_% $(stamp)build_%: $(stamp)configure_% @echo Building $(curpass) + +ifneq (,$(STAGE)) + $(MAKE) cross-compiling=yes -C $(DEB_BUILDDIR) $(NJOBS) csu/subdir_lib +else $(call logme, -a $(log_build), $(MAKE) -C $(DEB_BUILDDIR) $(NJOBS)) $(call logme, -a $(log_build), echo "---------------" ; echo -n "Build ended: " ; date --rfc-2822) if [ $(curpass) = libc ]; then \ @@ -93,6 +100,7 @@ sync; \ tar --use-compress-program /usr/bin/lzma --owner root --group root -cf $(CURDIR)/build-tree/locales-all/supported.tar.lzma -C $(CURDIR)/build-tree/locales-all/usr/lib/locale .; \ fi +endif touch $@ $(patsubst %,check_%,$(EGLIBC_PASSES)) :: check_% : $(stamp)check_% @@ -135,6 +143,17 @@ $(stamp)install_%: $(stamp)check_% @echo Installing $(curpass) rm -rf $(CURDIR)/debian/tmp-$(curpass) + +ifneq (,$(STAGE)) + $(call logme, -a $(log_build), $(MAKE) -C $(DEB_BUILDDIR) $(NJOBS) \ + cross-compiling=yes install_root=$(CURDIR)/debian/tmp-$(curpass) \ + install-bootstrap-headers=yes install-headers ) + + install -d $(CURDIR)/debian/tmp-$(curpass)/lib + install -m 644 $(DEB_BUILDDIR)/csu/crt[1in].o $(CURDIR)/debian/tmp-$(curpass)/lib + ${CC} -nostdlib -nostartfiles -shared -x c /dev/null \ + -o $(CURDIR)/debian/tmp-$(curpass)/lib/libc.so +else $(MAKE) -C $(DEB_BUILDDIR) \ install_root=$(CURDIR)/debian/tmp-$(curpass) install @@ -166,6 +185,7 @@ fi $(call xx,extra_install) +endif touch $@ $(stamp)doc: $(stamp)patch @@ -174,9 +194,11 @@ $(stamp)source: $(stamp)patch mkdir -p $(build-tree) +ifeq (,$(STAGE)) tar -c -J -C .. \ -f $(build-tree)/eglibc-$(EGLIBC_VERSION).tar.xz \ $(EGLIBC_SOURCES) +endif touch $@ .NOTPARALLEL: $(patsubst %,check_%,$(EGLIBC_PASSES)) diff -aur clean/eglibc-2.12/debian//rules.d/debhelper.mk 0617-czwartek/eglibc-2.12/debian//rules.d/debhelper.mk --- clean/eglibc-2.12/debian//rules.d/debhelper.mk 2010-06-25 11:38:22.000000000 +0200 +++ 0617-czwartek/eglibc-2.12/debian//rules.d/debhelper.mk 2010-06-17 18:02:56.810520013 +0200 @@ -3,6 +3,7 @@ # Sarge releases we can consider breaking packages, but certainly not now. $(stamp)binaryinst_$(libc)-pic:: debhelper +ifeq (,$(STAGE)) @echo Running special kludge for $(libc)-pic dh_testroot dh_installdirs -p$(curpass) @@ -15,6 +16,7 @@ install --mode=0644 build-tree/$(DEB_HOST_ARCH)-libc/libm.map debian/$(libc)-pic/$(libdir)/libm_pic.map install --mode=0644 build-tree/$(DEB_HOST_ARCH)-libc/resolv/libresolv_pic.a debian/$(libc)-pic/$(libdir)/. install --mode=0644 build-tree/$(DEB_HOST_ARCH)-libc/libresolv.map debian/$(libc)-pic/$(libdir)/libresolv_pic.map +endif # Some per-package extra files to install. define libc-bin_extra_debhelper_pkg_install @@ -33,7 +35,10 @@ $(patsubst %,$(stamp)binaryinst_%,$(debug-packages)):: $(patsubst %,$(stamp)binaryinst_%,$(non-debug-packages)) $(patsubst %,$(stamp)binaryinst_%,$(DEB_ARCH_REGULAR_PACKAGES) $(DEB_INDEP_REGULAR_PACKAGES)):: $(patsubst %,$(stamp)install_%,$(EGLIBC_PASSES)) debhelper - @echo Running debhelper for $(curpass) + @echo Running debhelper1 for $(curpass) +ifeq (,$(STAGE)) + @echo "nie jest stage" + ifneq ( 'aalibc6', $(curpass)) dh_testroot dh_installdirs -p$(curpass) dh_install -p$(curpass) @@ -130,12 +135,15 @@ fi dh_md5sums -p$(curpass) dh_builddeb -p$(curpass) + endif +endif touch $@ $(patsubst %,binaryinst_%,$(DEB_UDEB_PACKAGES)) :: binaryinst_% : $(stamp)binaryinst_% $(patsubst %,$(stamp)binaryinst_%,$(DEB_UDEB_PACKAGES)): debhelper $(patsubst %,$(stamp)install_%,$(EGLIBC_PASSES)) - @echo Running debhelper for $(curpass) + @echo Running debhelper2 for $(curpass) +ifneq ($(STAGE)-$(curpass),stage1-libc6) dh_testroot dh_installdirs -p$(curpass) dh_install -p$(curpass) @@ -154,7 +162,7 @@ # dh_shlibdeps -p$(curpass) dh_gencontrol -p$(curpass) dh_builddeb -p$(curpass) - +endif touch $@ debhelper: $(stamp)debhelper-common $(patsubst %,$(stamp)debhelper_%,$(EGLIBC_PASSES)) @@ -193,6 +201,7 @@ $(patsubst %,debhelper_%,$(EGLIBC_PASSES)) :: debhelper_% : $(stamp)debhelper_% $(stamp)debhelper_%: $(stamp)debhelper-common $(stamp)install_% +ifeq (,$(STAGE)) libdir=$(call xx,libdir) ; \ slibdir=$(call xx,slibdir) ; \ curpass=$(curpass) ; \ @@ -237,6 +246,7 @@ sed -e "s#PTHREAD_SO#$$pthread_so#" -i $$t ; \ done ; \ done +endif touch $@