--- tmp/binutils-2.21.0.20110302/debian/rules	2011-03-07 00:17:58.000000000 -0500
+++ binutils-2.21.0.20110302/debian/rules	2011-03-07 00:30:33.000000000 -0500
@@ -667,7 +667,6 @@
 		infodir=$(pwd)/$(d_hppa64)/$(PF)/share/info install
 
 	: # move shared libs to the standard path
-	mv $(d_hppa64)/$(PF)/hppa-linux-gnu/hppa64-linux-gnu/lib/lib*-*.so \
 	mv $(d_hppa64)/$(PF)/$(DEB_HOST_GNU_TYPE)/hppa64-linux-gnu/lib/lib*-*.so \
 		$(d_hppa64)/$(PF)/lib/.
 
@@ -755,26 +754,6 @@
 
 ################################################################################
 
-binary-hppa64-stamp: install-hppa64-stamp
-	$(checkdir)
-
-	$(install_file) -D debian/$(p_hppa64).overrides \
-		$(d_hppa64)/$(PF)/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)/$(PF)/share/doc/
-	ln -sf $(p_bin) $(d_hppa64)/$(PF)/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 #
 #######################
@@ -840,12 +819,8 @@
 #######################
 # binary-arch target  #
 #######################
-binary_stamps = 
-ifeq ($(DEB_HOST_ARCH),hppa)
-       binary_stamps += binary-hppa64-stamp
-endif
 
-binary-arch: checkroot build install $(binary_stamps)
+binary-arch: checkroot build install
 	$(checkdir)
 
 ifneq ($(BACKPORT),true)
@@ -905,6 +880,10 @@
 	$(install_file) -D debian/$(p_spu).overrides \
 		$(d_spu)/$(PF)/share/lintian/overrides/$(p_spu)
 endif
+ifeq ($(DEB_HOST_ARCH),hppa)
+	$(install_file) -D debian/$(p_hppa64).overrides \
+		$(d_hppa64)/$(PF)/share/lintian/overrides/$(p_hppa64)
+endif
 
 	: # install maintainer scrtips
 	$(install_dir) $(d_bin)/DEBIAN
@@ -936,6 +915,13 @@
 	$(install_file) debian/binutils-spu.shlibs $(d_spu)/DEBIAN/shlibs
 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
+
 	: # install docs
 	$(install_dir) $(d_bin)/$(PF)/share/doc/$(p_bin)/
 	$(install_file)	debian/changelog $(d_bin)/$(PF)/share/doc/$(p_bin)/changelog.Debian
@@ -955,6 +941,10 @@
 	$(install_dir) $(d_spu)/$(PF)/share/doc/
 	ln -sf $(p_bin) $(d_spu)/$(PF)/share/doc/$(p_spu)
 endif
+ifeq ($(DEB_HOST_ARCH),hppa)
+	$(install_dir) $(d_hppa64)/$(PF)/share/doc/
+	ln -sf $(p_bin) $(d_hppa64)/$(PF)/share/doc/$(p_hppa64)
+endif
 
 ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
 ifeq ($(with_check),yes)
@@ -1015,6 +1005,11 @@
 	find $(d_spu) -type f | xargs file | grep ELF | cut -d: -f 1 | xargs dpkg-shlibdeps
 	dpkg-gencontrol -isp -P$(d_spu) -p$(p_spu)
 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
 
 	chown -R root:root $(d_bin) $(d_dev)
 	chmod -R go=rX  $(d_bin) $(d_dev)
@@ -1035,6 +1030,11 @@
 	chmod -R go=rX  $(d_spu)
 	dpkg --build $(d_spu) ..
 endif
+ifeq ($(DEB_HOST_ARCH),hppa)
+	chown -R root:root $(d_hppa64)
+	chmod -R go=rX  $(d_hppa64)
+	dpkg --build $(d_hppa64) ..
+endif
 
 endif # Process the following only if $(TARGET) is set
 endif # ifndef BACKPORT
