[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

r3798 - in glibc-package/branches/multiarch/debian: . rules.d



Author: aurel32
Date: 2009-09-04 19:45:40 +0000 (Fri, 04 Sep 2009)
New Revision: 3798

Modified:
   glibc-package/branches/multiarch/debian/rules
   glibc-package/branches/multiarch/debian/rules.d/debhelper.mk
Log:
Allow per pass debhelper target call


Modified: glibc-package/branches/multiarch/debian/rules
===================================================================
--- glibc-package/branches/multiarch/debian/rules	2009-09-04 12:30:13 UTC (rev 3797)
+++ glibc-package/branches/multiarch/debian/rules	2009-09-04 19:45:40 UTC (rev 3798)
@@ -154,7 +154,7 @@
 # And now the rules...
 include debian/rules.d/*.mk
 
-clean:: unpatch debhelper-clean
+clean:: unpatch
 	make -C $(CURDIR)/linuxthreads/man clean
 	rm -f $(CURDIR)/po/*.mo
 	rm -rf $(patsubst %,debian/tmp-%,$(EGLIBC_PASSES))

Modified: glibc-package/branches/multiarch/debian/rules.d/debhelper.mk
===================================================================
--- glibc-package/branches/multiarch/debian/rules.d/debhelper.mk	2009-09-04 12:30:13 UTC (rev 3797)
+++ glibc-package/branches/multiarch/debian/rules.d/debhelper.mk	2009-09-04 19:45:40 UTC (rev 3798)
@@ -2,7 +2,7 @@
 # renames.  There's very little we can do for now.  Maybe after
 # Sarge releases we can consider breaking packages, but certainly not now.
 
-$(stamp)binaryinst_$(libc)-pic:: $(stamp)debhelper
+$(stamp)binaryinst_$(libc)-pic:: debhelper
 	@echo Running special kludge for $(libc)-pic
 	dh_testroot
 	dh_installdirs -p$(curpass)
@@ -32,7 +32,7 @@
 non-debug-packages = $(filter-out %-dbg,$(DEB_ARCH_REGULAR_PACKAGES))
 $(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)) $(stamp)debhelper
+$(patsubst %,$(stamp)binaryinst_%,$(DEB_ARCH_REGULAR_PACKAGES) $(DEB_INDEP_REGULAR_PACKAGES)):: $(patsubst %,$(stamp)install_%,$(EGLIBC_PASSES)) debhelper
 	@echo Running debhelper for $(curpass)
 	dh_testroot
 	dh_installdirs -p$(curpass)
@@ -112,7 +112,7 @@
 	touch $@
 
 $(patsubst %,binaryinst_%,$(DEB_UDEB_PACKAGES)) :: binaryinst_% : $(stamp)binaryinst_%
-$(patsubst %,$(stamp)binaryinst_%,$(DEB_UDEB_PACKAGES)): $(stamp)debhelper $(patsubst %,$(stamp)install_%,$(EGLIBC_PASSES))
+$(patsubst %,$(stamp)binaryinst_%,$(DEB_UDEB_PACKAGES)): debhelper $(patsubst %,$(stamp)install_%,$(EGLIBC_PASSES))
 	@echo Running debhelper for $(curpass)
 	dh_testroot
 	dh_installdirs -p$(curpass)
@@ -135,66 +135,25 @@
 
 	touch $@
 
-OPT_PASSES = $(filter-out libc, $(EGLIBC_PASSES))
-OPT_DIRS = $(foreach pass,$(OPT_PASSES),$($(pass)_slibdir) $($(pass)_libdir))
-
-debhelper: $(stamp)debhelper
-$(stamp)debhelper: $(patsubst %,$(stamp)install_%,$(EGLIBC_PASSES))
+debhelper: $(stamp)debhelper-common $(patsubst %,$(stamp)debhelper_%,$(EGLIBC_PASSES))
+$(stamp)debhelper-common: 
 	for x in `find debian/debhelper.in -maxdepth 1 -type f`; do \
 	  y=debian/`basename $$x`; \
-	  z=`echo $$y | sed -e 's#libc\(\|-alt\|-dev\|-dev-alt\|-otherbuild\|-pic\|-prof\|-udeb\)\.#$(libc)\1.#g'`; \
-	  cp $$x $$z; \
-	  sed -e "s#BUILD-TREE#$(build-tree)#" -i $$z; \
-	  sed -e "/NSS_CHECK/r debian/script.in/nsscheck.sh" -i $$z; \
-	  sed -e "/NOHWCAP/r debian/script.in/nohwcap.sh" -i $$z; \
-	  sed -e "s#LIBC#$(libc)#" -i $$z; \
-	  sed -e "s#CURRENT_VER#$(DEB_VERSION)#" -i $$z; \
-	  sed -e "s#EXIT_CHECK##" -i $$z; \
-	  sed -e "s#DEB_HOST_ARCH#$(DEB_HOST_ARCH)#" -i $$z; \
-	  case $$z in \
+	  cp $$x $$y; \
+	  sed -e "s#BUILD-TREE#$(build-tree)#" -i $$y; \
+	  sed -e "s#LIBC#$(libc)#" -i $$y; \
+	  sed -e "s#CURRENT_VER#$(DEB_VERSION)#" -i $$y; \
+	  sed -e "s#EXIT_CHECK##" -i $$y; \
+	  sed -e "s#DEB_HOST_ARCH#$(DEB_HOST_ARCH)#" -i $$y; \
+	  sed -e "/NSS_CHECK/r debian/script.in/nsscheck.sh" -i $$y; \
+	  sed -e "/NOHWCAP/r debian/script.in/nohwcap.sh" -i $$y; \
+	  case $$y in \
 	    *.install) \
-	      sed -e "s/^#.*//" -i $$z ; \
+	      sed -e "s/^#.*//" -i $$y ; \
 	      ;; \
-	    debian/$(libc).preinst) \
-	      rtld=`LANG=C LC_ALL=C readelf -l debian/tmp-libc/usr/bin/iconv | grep "interpreter" | sed -e 's/.*interpreter: \(.*\)]/\1/g'`; \
-	      c_so=`ls debian/tmp-libc/$(slibdir) | grep "libc\.so\."` ; \
-	      m_so=`ls debian/tmp-libc/$(slibdir) | grep "libm\.so\."` ; \
-	      pthread_so=`ls debian/tmp-libc/$(slibdir) | grep "libpthread\.so\."` || true; \
-	      rt_so=`ls debian/tmp-libc/$(slibdir) | grep "librt\.so\."` ; \
-	      dl_so=`ls debian/tmp-libc/$(slibdir) | grep "libdl\.so\."` ; \
-	      sed -e "s#RTLD#$$rtld#" -e "s#C_SO#$$c_so#" -e "s#M_SO#$$m_so#" -e "s#PTHREAD_SO#$$pthread_so#" -e "s#RT_SO#$$rt_so#" -e "s#DL_SO#$$dl_so#" -i $$z ; \
-	      ;; \
 	  esac; \
 	done
 
-	# Hack: special-case passes whose destdir is a biarch directory
-	# to use a different install template, which includes more
-	# libraries.  Also generate a -dev.  Other libraries get scripts
-	# to temporarily disable hwcap.  This needs some cleaning up.
-	set -- $(OPT_DIRS); \
-	for x in $(OPT_PASSES); do \
-	  slibdir=$$1; \
-	  shift; \
-	  case $$slibdir in \
-	  /lib32 | /lib64) \
-	    suffix="alt"; \
-	    libdir=$$1; \
-	    shift; \
-	    ;; \
-	  *) \
-	    suffix="otherbuild"; \
-	    ;; \
-	  esac; \
-	  for y in debian/$(libc)*-$$suffix.* ; do \
-	    z=`echo $$y | sed -e "s/$$suffix/$$x/"` ; \
-	    cp $$y $$z ; \
-	    sed -e "s#TMPDIR#debian/tmp-$$x#g" -i $$z; \
-	    sed -e "s#SLIBDIR#$$slibdir#g" -i $$z; \
-	    sed -e "s#LIBDIR#$$libdir#g" -i $$z; \
-	    sed -e "s#FLAVOR#$$x#g" -i $$z; \
-	  done ; \
-	done
-
 	# Substitute __PROVIDED_LOCALES__.
 	perl -i -pe 'BEGIN {undef $$/; open(IN, "debian/tmp-libc/usr/share/i18n/SUPPORTED"); $$j=<IN>;} s/__PROVIDED_LOCALES__/$$j/g;' debian/locales.config debian/locales.postinst
 
@@ -207,9 +166,44 @@
 	done
 	rm -f tmp.substvars
 
-	touch $(stamp)debhelper
+	touch $@
 
-debhelper-clean:
+$(patsubst %,debhelper_%,$(EGLIBC_PASSES)) :: debhelper_% : $(stamp)debhelper_%
+$(stamp)debhelper_%: $(stamp)debhelper-common $(stamp)install_%
+	libdir=$(call xx,libdir) ; \
+	slibdir=$(call xx,slibdir) ; \
+	curpass=$(curpass) ; \
+	case "$$curpass:$$slibdir" in \
+	  libc:*) \
+	    templates="libc libc-dev libc-pic libc-prof libc-udeb" \
+	    pass="" \
+	    suffix="" \
+	    ;; \
+	  *:/lib32 | *:lib64) \
+	    templates="libc libc-dev" \
+	    pass="-alt" \
+	    suffix="-$(curpass)" \
+	    ;; \
+	  *:*) \
+	    templates="libc" \
+	    pass="-otherbuild" \
+	    suffix="-$(curpass)" \
+	    ;; \
+	esac ; \
+	for t in $$templates ; do \
+	  for s in debian/$$t$$pass.* ; do \
+	    t=`echo $$s | sed -e "s#libc#$(libc)#"`$$suffx ; \
+	    cp $$s $$t ; \
+	    sed -e "s#TMPDIR#debian/tmp-$$curpass#g" -i $$t; \
+	    sed -e "s#SLIBDIR#$$slibdir#g" -i $$t; \
+	    sed -e "s#LIBDIR#$$libdir#g" -i $$t; \
+	    sed -e "s#FLAVOR#$$curpass#g" -i $$t; \
+	  done ; \
+	done
+
+	touch $@
+
+clean::
 	dh_clean 
 
 	rm -f debian/*.install*


Reply to: