Package: net-tools
Version: 1.60-17.2
Severity: wishlist
Tags: patch
User: [EMAIL PROTECTED]
Usertags: crossbuilt

--- Please enter the report below this line. ---

As part of the long term mass bug filing for cross building support,
(http://lists.debian.org/debian-devel/2007/11/msg00116.html), I've
prepared this patch for debian/rules.

The cross building support in Debian has been recently rewritten -
particularly in respect of how environment variables and overrides are
handled - so this patch is now needed to allow net-tools to correctly
identify the cross compiler.

--- net-tools-1.60/debian/rules 
+++ net-tools.new/debian/rules 
@@ -7,6 +7,14 @@
 
 # This is the debhelper compatability version to use.
 export DH_COMPAT=1
+
+DEB_HOST_GNU_TYPE=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE=$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
+CROSS=CC=$(DEB_HOST_GNU_TYPE)-gcc
+else
+CROSS=
+endif
 
 configure: configure-stamp
 configure-stamp:
@@ -18,7 +26,7 @@
        dh_testdir
        cp debian/config.h config.h
        cp debian/config.make config.make
-       $(MAKE)
+       $(MAKE) $(CROSS)
        touch build-stamp
 
 clean:
@@ -33,7 +41,7 @@
        dh_testroot
        dh_clean -k
        dh_installdirs
-       $(MAKE) update BASEDIR=`pwd`/debian/tmp
+       $(MAKE) update BASEDIR=`pwd`/debian/tmp $(CROSS)
        mv debian/tmp/sbin/arp debian/tmp/usr/sbin/arp
        # we don't want man pages for domainname and friends... (yet)
        rm -rf debian/tmp/usr/share/man/*/man1/ debian/tmp/usr/share/man/man1/


--- System information. ---
Architecture: amd64
Kernel:       Linux 2.6.22-2-amd64

Debian Release: lenny/sid
  500 unstable        www.linux.codehelp.co.uk 
  500 unstable        www.emdebian.org 
  500 unstable        ftp.uk.debian.org 

--- Package information. ---
Depends         (Version) | Installed
=========================-+-=============
libc6        (>= 2.6.1-1) | 2.6.1-6


-- 


Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/

Attachment: pgp0C8d2XqoES.pgp
Description: PGP signature

Reply via email to