From patchwork Thu Apr 2 11:27:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 6147141 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id F3C24BF4A6 for ; Thu, 2 Apr 2015 11:27:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0EB5B2038C for ; Thu, 2 Apr 2015 11:27:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E332A20397 for ; Thu, 2 Apr 2015 11:27:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751566AbbDBL1x (ORCPT ); Thu, 2 Apr 2015 07:27:53 -0400 Received: from mail-la0-f52.google.com ([209.85.215.52]:36179 "EHLO mail-la0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750765AbbDBL1w (ORCPT ); Thu, 2 Apr 2015 07:27:52 -0400 Received: by labe2 with SMTP id e2so57795817lab.3 for ; Thu, 02 Apr 2015 04:27:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=PYw3GE8M+HGgZkxRt/3+Tf3NbNMsn4NHAxgyI2ieaao=; b=jG+GyxA9LR5is4NqibmzJ/Hd0GNWdkRebEtt1a1RFDqRFjal6kshTWq7SOy7jcmNgh flHxqun7Tw2cBjxVgFc7DvH4J2uVYzss6x8KClGCB9GJ1xm2A4S49ciW5CaDI+uitcyM WOE8NLqVSvceRrjy3qT6Qv0rhhTciRIr+hyUPPzbgPt+kblwJiiSOnGOl6LaaAAZTKsj sS8yud1YU+y+ntbO1XMR2J1oTZ/jViBp26N2nEhAgT/o6kE5vEaXqqkrTVtPh4v4Km3V PrcVdI8oMDKBbRcbV+vsrYUy1owwoaT2NqiBn163QgtWFgv3Wn6DUfbDhD/dLBm+h2Ru TEwQ== X-Gm-Message-State: ALoCoQlN83risv66soq2JGmLHCK2KsGclDOIv9Y2tK2ZpWhbMgs6J2W5KKEC5asPYVyqnb1zftmH X-Received: by 10.152.26.169 with SMTP id m9mr40327276lag.45.1427974071053; Thu, 02 Apr 2015 04:27:51 -0700 (PDT) Received: from localhost.localdomain (91-157-196-38.elisa-laajakaista.fi. [91.157.196.38]) by mx.google.com with ESMTPSA id k3sm979450lah.40.2015.04.02.04.27.50 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 02 Apr 2015 04:27:50 -0700 (PDT) From: riku.voipio@linaro.org To: linux-kbuild@vger.kernel.org, mmarek@suse.cz, debian-kernel@lists.debian.org Cc: Riku Voipio Subject: [PATCH 3/4] builddeb: simplify directory creation Date: Thu, 2 Apr 2015 14:27:29 +0300 Message-Id: <7afba8dbcecde56aaaa93d7ae38e6bd960380696.1427968988.git.riku.voipio@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Riku Voipio Every package needs /usr/share/doc/$package_name and DEBIAN directory, so create them as part of create_package function. Signed-off-by: Riku Voipio --- scripts/package/builddeb | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/scripts/package/builddeb b/scripts/package/builddeb index 147264e..36185d6 100755 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -15,6 +15,8 @@ set -e create_package() { local pname="$1" pdir="$2" + mkdir -m 755 -p "$pdir/DEBIAN" + mkdir -p "$pdir/usr/share/doc/$pname" cp debian/copyright "$pdir/usr/share/doc/$pname/" cp debian/changelog "$pdir/usr/share/doc/$pname/changelog.Debian" gzip -9 "$pdir/usr/share/doc/$pname/changelog.Debian" @@ -118,25 +120,13 @@ BUILD_DEBUG="$(grep -s '^CONFIG_DEBUG_INFO=y' $KCONFIG_CONFIG || true)" # Setup the directory structure rm -rf "$tmpdir" "$fwdir" "$kernel_headers_dir" "$libc_headers_dir" "$dbg_dir" -mkdir -m 755 -p "$tmpdir/DEBIAN" -mkdir -p "$tmpdir/lib" "$tmpdir/boot" "$tmpdir/usr/share/doc/$packagename" -mkdir -m 755 -p "$fwdir/DEBIAN" -mkdir -p "$fwdir/lib/firmware/$version/" "$fwdir/usr/share/doc/$fwpackagename" -mkdir -m 755 -p "$libc_headers_dir/DEBIAN" -mkdir -p "$libc_headers_dir/usr/share/doc/$libc_headers_packagename" -mkdir -m 755 -p "$kernel_headers_dir/DEBIAN" -mkdir -p "$kernel_headers_dir/usr/share/doc/$kernel_headers_packagename" +mkdir -p "$tmpdir/lib" "$tmpdir/boot" +mkdir -p "$fwdir/lib/firmware/$version/" mkdir -p "$kernel_headers_dir/lib/modules/$version/" -if [ "$ARCH" = "um" ] ; then - mkdir -p "$tmpdir/usr/lib/uml/modules/$version" "$tmpdir/usr/bin" -fi -if [ -n "$BUILD_DEBUG" ] ; then - mkdir -p "$dbg_dir/usr/share/doc/$dbg_packagename" - mkdir -m 755 -p "$dbg_dir/DEBIAN" -fi # Build and install the kernel if [ "$ARCH" = "um" ] ; then + mkdir -p "$tmpdir/usr/lib/uml/modules/$version" "$tmpdir/usr/bin" "$tmpdir/usr/share/doc/$packagename" $MAKE linux cp System.map "$tmpdir/usr/lib/uml/modules/$version/System.map" cp $KCONFIG_CONFIG "$tmpdir/usr/share/doc/$packagename/config" @@ -194,6 +184,7 @@ if grep -q '^CONFIG_BLK_DEV_INITRD=y' $KCONFIG_CONFIG; then else want_initrd=No fi +mkdir -m 755 -p "$tmpdir/DEBIAN" for script in postinst postrm preinst prerm ; do mkdir -p "$tmpdir$debhookdir/$script.d" cat < "$tmpdir/DEBIAN/$script"