diff -urN binutils-2.20.1/debian/control binutils-hppa64/debian/control --- binutils-2.20.1/debian/control 2010-08-31 22:11:11.000000000 -0400 +++ binutils-hppa64/debian/control 2010-08-31 23:32:35.000000000 -0400 @@ -62,7 +62,7 @@ linker. Package: binutils-hppa64 -Architecture: hppa +Architecture: any Depends: ${shlibs:Depends}, binutils (= ${binary:Version}) Recommends: libc6-dev Suggests: binutils-doc (>= ${source:Version}) diff -urN binutils-2.20.1/debian/rules binutils-hppa64/debian/rules --- binutils-2.20.1/debian/rules 2010-08-31 22:11:11.000000000 -0400 +++ binutils-hppa64/debian/rules 2010-08-31 23:04:39.000000000 -0400 @@ -330,7 +330,7 @@ --enable-shared \ --prefix=/usr \ --build=$(DEB_BUILD_GNU_TYPE) \ - --host=$(DEB_BUILD_GNU_TYPE) \ + --host=$(DEB_HOST_GNU_TYPE) \ --target=hppa64-linux-gnu $(MAKE) -C builddir-hppa64 configure-host touch configure-hppa64-stamp @@ -552,7 +552,7 @@ infodir=$(pwd)/$(d_hppa64)/usr/share/info install : # move shared libs to the standard path - mv $(d_hppa64)/usr/hppa-linux-gnu/hppa64-linux-gnu/lib/lib*-*.so \ + mv $(d_hppa64)/usr/$(DEB_HOST_GNU_TYPE)/hppa64-linux-gnu/lib/lib*-*.so \ $(d_hppa64)/usr/lib/. : # Now get rid of just about everything in binutils-hppa64 @@ -620,6 +620,26 @@ touch install-spu-stamp ################################################################################ + +binary-hppa64-stamp: install-hppa64-stamp + $(checkdir) + + $(install_file) -D debian/$(p_hppa64).overrides \ + $(d_hppa64)/usr/share/lintian/overrides/$(p_hppa64) + $(install_dir) $(d_hppa64)/DEBIAN + $(install_script) debian/binutils-hppa64.postinst $(d_hppa64)/DEBIAN/postinst + $(install_script) debian/binutils-hppa64.postrm $(d_hppa64)/DEBIAN/postrm + $(install_file) debian/binutils-hppa64.shlibs $(d_hppa64)/DEBIAN/shlibs + $(install_dir) $(d_hppa64)/usr/share/doc/ + ln -sf $(p_bin) $(d_hppa64)/usr/share/doc/$(p_hppa64) + rm -f debian/substvars + find $(d_hppa64) -type f | xargs file | grep ELF | cut -d: -f 1 | xargs dpkg-shlibdeps + dpkg-gencontrol -isp -P$(d_hppa64) -p$(p_hppa64) + chown -R root:root $(d_hppa64) + chmod -R go=rX $(d_hppa64) + dpkg --build $(d_hppa64) .. + + touch binary-hppa64-stamp ####################### # binary-indep target # @@ -670,8 +690,12 @@ ####################### # binary-arch target # ####################### +binary_stamps = +ifeq ($(DEB_HOST_ARCH),hppa) + binary_stamps += binary-hppa64-stamp +endif -binary-arch: checkroot build install +binary-arch: checkroot build install $(binary_stamps) $(checkdir) : # make lintian happy @@ -681,10 +705,6 @@ $(install_file) -D debian/$(p_mul).overrides \ $(d_mul)/usr/share/lintian/overrides/$(p_mul) endif -ifeq ($(DEB_HOST_ARCH),hppa) - $(install_file) -D debian/$(p_hppa64).overrides \ - $(d_hppa64)/usr/share/lintian/overrides/$(p_hppa64) -endif ifeq ($(with_gold),yes) $(install_file) -D debian/$(p_gold).overrides \ $(d_gold)/usr/share/lintian/overrides/$(p_gold) @@ -716,12 +736,6 @@ $(install_script) debian/binutils-gold.preinst $(d_gold)/DEBIAN/preinst endif -ifeq ($(DEB_HOST_ARCH),hppa) - $(install_dir) $(d_hppa64)/DEBIAN - $(install_script) debian/binutils-hppa64.postinst $(d_hppa64)/DEBIAN/postinst - $(install_script) debian/binutils-hppa64.postrm $(d_hppa64)/DEBIAN/postrm - $(install_file) debian/binutils-hppa64.shlibs $(d_hppa64)/DEBIAN/shlibs -endif ifneq (,$(filter $(DEB_HOST_ARCH),powerpc ppc64)) $(install_dir) $(d_spu)/DEBIAN $(install_script) debian/binutils-spu.postinst $(d_spu)/DEBIAN/postinst @@ -744,10 +758,6 @@ $(install_dir) $(d_gold)/usr/share/doc/ ln -sf $(p_bin) $(d_gold)/usr/share/doc/$(p_gold) endif -ifeq ($(DEB_HOST_ARCH),hppa) - $(install_dir) $(d_hppa64)/usr/share/doc/ - ln -sf $(p_bin) $(d_hppa64)/usr/share/doc/$(p_hppa64) -endif ifneq (,$(filter $(DEB_HOST_ARCH),powerpc ppc64)) $(install_dir) $(d_spu)/usr/share/doc/ ln -sf $(p_bin) $(d_spu)/usr/share/doc/$(p_spu) @@ -806,11 +816,6 @@ # find $(d_gold) -type f | xargs file | grep ELF | cut -d: -f 1 | xargs dpkg-shlibdeps dpkg-gencontrol -isp -P$(d_gold) -p$(p_gold) endif -ifeq ($(DEB_HOST_ARCH),hppa) - rm -f debian/substvars - find $(d_hppa64) -type f | xargs file | grep ELF | cut -d: -f 1 | xargs dpkg-shlibdeps - dpkg-gencontrol -isp -P$(d_hppa64) -p$(p_hppa64) -endif ifneq (,$(filter $(DEB_HOST_ARCH),powerpc ppc64)) rm -f debian/substvars find $(d_spu) -type f | xargs file | grep ELF | cut -d: -f 1 | xargs dpkg-shlibdeps @@ -831,11 +836,6 @@ chmod -R go=rX $(d_gold) dpkg --build $(d_gold) .. endif -ifeq ($(DEB_HOST_ARCH),hppa) - chown -R root:root $(d_hppa64) - chmod -R go=rX $(d_hppa64) - dpkg --build $(d_hppa64) .. -endif ifneq (,$(filter $(DEB_HOST_ARCH),powerpc ppc64)) chown -R root:root $(d_spu) chmod -R go=rX $(d_spu) @@ -941,7 +941,14 @@ gzip -9 $(d_cross)/usr/share/man/man1/* touch $@ -binary-cross: checkroot install-$(TARGET)-stamp +cross_binary_stamps = +ifeq ($(TARGET),hppa-linux-gnu) +ifneq ($(DEB_HOST_ARCH), hppa) + cross_binary_stamps += binary-hppa64-stamp +endif +endif + +binary-cross: checkroot install-$(TARGET)-stamp $(cross_binary_stamps) $(checkdir) test "" != "$(TARGET)"