From patchwork Thu May 28 09:11:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 6496851 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6F7049F1CC for ; Thu, 28 May 2015 09:11:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8EC8D20693 for ; Thu, 28 May 2015 09:11:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 92ED120644 for ; Thu, 28 May 2015 09:11:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753684AbbE1JL2 (ORCPT ); Thu, 28 May 2015 05:11:28 -0400 Received: from mail-lb0-f173.google.com ([209.85.217.173]:34110 "EHLO mail-lb0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753631AbbE1JLV (ORCPT ); Thu, 28 May 2015 05:11:21 -0400 Received: by lbcmx3 with SMTP id mx3so23950485lbc.1 for ; Thu, 28 May 2015 02:11:20 -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; bh=5hvG+LAtWUhwNZ1l0nR/nqsgVh1VQotQH+VSG5jn3x4=; b=GBoPPemORtACc0eMb7tUisT4W8I2IwWw4MuorkmT8WjBTdE46rve8ctUzThxTstb6C CNtUVd1hP8h6QnNWVicikBvLLfUt2Qzvokz46RW7iICG9HhOlpi6KYpzOnbEQs4A1uTp sphBmBtJVVBFrdEE7iWnnMrTRwGmmm8x4dIw65Yqpv74SnUpJKsUKj1WKiaKhe2Za23h Q/UVgzUPEPqUBvg5io17T/gTupq0i8FE3ZOFALIR6b5j8rygm5ViBOybnLEdosaiaUzY mbhG2PkFY93NEvE+QSlG/4sw71PaWsfoSs+fz0vY2iN5COPtSbIC6EfuOs/CcUjCnlvY L4jg== X-Gm-Message-State: ALoCoQmNE8qc2YBYleIHKw7aDh833MnPB8gDOF8rdtUdKQqQjaVCedJxwxFogkPnKvF34oohs8sD X-Received: by 10.152.29.34 with SMTP id g2mr1713127lah.73.1432804280073; Thu, 28 May 2015 02:11:20 -0700 (PDT) Received: from localhost.localdomain (91-157-196-38.elisa-laajakaista.fi. [91.157.196.38]) by mx.google.com with ESMTPSA id am7sm373090lbc.3.2015.05.28.02.11.18 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 May 2015 02:11:19 -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 1/2] deb-pkg: simplify directory creation Date: Thu, 28 May 2015 12:11:14 +0300 Message-Id: <1432804275-13187-2-git-send-email-riku.voipio@linaro.org> X-Mailer: git-send-email 2.1.4 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 | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/scripts/package/builddeb b/scripts/package/builddeb index d30116b..0ccd7ee 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" @@ -114,24 +116,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"