From patchwork Tue Aug 3 12:46:27 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Whitcroft X-Patchwork-Id: 60732 X-Patchwork-Delegate: leann.ogasawara@canonical.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 70A2DB6F11 for ; Tue, 3 Aug 2010 22:46:38 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1OgGt7-0001vC-6X; Tue, 03 Aug 2010 13:46:33 +0100 Received: from adelie.canonical.com ([91.189.90.139]) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1OgGt6-0001ut-2h for kernel-team@lists.ubuntu.com; Tue, 03 Aug 2010 13:46:32 +0100 Received: from hutte.canonical.com ([91.189.90.181]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1OgGt3-00053j-Q5 for ; Tue, 03 Aug 2010 13:46:30 +0100 Received: from [85.210.148.55] (helo=localhost.localdomain) by hutte.canonical.com with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1OgGt3-0005Oo-Lm for kernel-team@lists.ubuntu.com; Tue, 03 Aug 2010 13:46:29 +0100 From: Andy Whitcroft To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/1] UBUNTU: debian -- include the debian packaging in the -source package Date: Tue, 3 Aug 2010 13:46:27 +0100 Message-Id: <1280839587-4780-2-git-send-email-apw@canonical.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1280839587-4780-1-git-send-email-apw@canonical.com> References: <1280839587-4780-1-git-send-email-apw@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com BugLink: http://bugs.launchpad.net/bugs/608674 The -source package is a bootstrap package allowing other packages which need the kernel source as part of their build process. This allows them to build depend on this package and have the source available. Currently this only includes the actual kernel source which we built from. In order to bootstrap compilers we consumers also need the rules used to build the kernel. Make a source version specific directory in /usr/src and add the debian and debian.master contents. Move the tarball into this directory as well to better match other packages. Finally include a symlink from the original tarball name for backwards compatibility. Signed-off-by: Andy Whitcroft --- debian/rules.d/3-binary-indep.mk | 17 ++++++++++++++--- 1 files changed, 14 insertions(+), 3 deletions(-) diff --git a/debian/rules.d/3-binary-indep.mk b/debian/rules.d/3-binary-indep.mk index c670e5f..d8f2407 100644 --- a/debian/rules.d/3-binary-indep.mk +++ b/debian/rules.d/3-binary-indep.mk @@ -47,6 +47,7 @@ install-headers: srcpkg = $(src_pkg_name)-source-$(release) srcdir = $(CURDIR)/debian/$(srcpkg)/usr/src/$(srcpkg) +balldir = $(CURDIR)/debian/$(srcpkg)/usr/src/$(srcpkg)/$(srcpkg) install-source: dh_testdir dh_testroot @@ -56,10 +57,20 @@ install-source: ifeq ($(do_source_package_content),true) find . -path './debian' -prune -o -path './$(DEBIAN)' -prune -o \ -path './.*' -prune -o -print | \ + cpio -pd --preserve-modification-time $(balldir) + (cd $(srcdir); tar cf - $(srcpkg)) | bzip2 -9c > \ + $(srcdir)/$(srcpkg).tar.bz2 + rm -rf $(balldir) + find './debian' './$(DEBIAN)' \ + -path './debian/linux-*' -prune -o \ + -path './debian/$(src_pkg_name)-*' -prune -o \ + -path './debian/build' -prune -o \ + -path './debian/files' -prune -o \ + -path './debian/stamps' -prune -o \ + -path './debian/tmp' -prune -o \ + -print | \ cpio -pd --preserve-modification-time $(srcdir) - (cd $(srcdir)/..; tar cf - $(srcpkg)) | bzip2 -9c > \ - $(srcdir).tar.bz2 - rm -rf $(srcdir) + ln -s $(srcpkg)/$(srcpkg).tar.bz2 $(srcdir)/.. endif install-tools: toolspkg = $(tools_common_pkg_name)