[kernel] r15237 - dists/trunk/linux-kbuild-2.6/debian

Ben Hutchings benh at alioth.debian.org
Sat Feb 20 05:01:44 UTC 2010


Author: benh
Date: Sat Feb 20 05:01:37 2010
New Revision: 15237

Log:
Allow for inclusion of arch scripts

Modified:
   dists/trunk/linux-kbuild-2.6/debian/rules.real

Modified: dists/trunk/linux-kbuild-2.6/debian/rules.real
==============================================================================
--- dists/trunk/linux-kbuild-2.6/debian/rules.real	Sat Feb 20 04:31:28 2010	(r15236)
+++ dists/trunk/linux-kbuild-2.6/debian/rules.real	Sat Feb 20 05:01:37 2010	(r15237)
@@ -1,5 +1,20 @@
 export DH_OPTIONS
 
+DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH)
+KERNEL_ARCH := $(DEB_BUILD_ARCH)
+ifneq ($(filter amd64 i386,$(DEB_BUILD_ARCH)),)
+	KERNEL_ARCH := x86
+endif
+ifneq ($(filter armeb armel,$(DEB_BUILD_ARCH)),)
+	KERNEL_ARCH := arm
+endif
+ifeq (hppa,$(DEB_BUILD_ARCH))
+	KERNEL_ARCH := parisc
+endif
+ifeq (mipsel,$(DEB_BUILD_ARCH))
+	KERNEL_ARCH := mips
+endif
+
 include debian/rules.defs
 
 binary-arch: install-kbuild
@@ -12,7 +27,7 @@
 	rm -rf '$(DIR)'
 	mkdir -p '$(DIR)'
 	cp -al $(SOURCE_FILES) '$(DIR)'
-	$(MAKE) -C $(DIR) top_srcdir=$(CURDIR)
+	$(MAKE) -C $(DIR) top_srcdir=$(CURDIR) SRCARCH=$(KERNEL_ARCH)
 	touch '$@'
 
 install-kbuild: PACKAGE_NAME = linux-kbuild-$(VERSION)
@@ -24,7 +39,7 @@
 	dh_testdir
 	dh_testroot
 	dh_clean -k -d
-	$(MAKE) -C $(SOURCE_DIR) install prefix=$(DIR) top_srcdir=$(CURDIR)
+	$(MAKE) -C $(SOURCE_DIR) install prefix=$(DIR) top_srcdir=$(CURDIR) SRCARCH=$(KERNEL_ARCH)
 	dh_link $(BASE_DIR) /usr/src/$(PACKAGE_NAME)
 	dh_installchangelogs
 	dh_installdocs



More information about the Kernel-svn-changes mailing list