Linux-KBuild Archive on lore.kernel.org
 help / color / Atom feed
From: maximilian attems <max@stro.at>
To: linux-kbuild@vger.kernel.org
Cc: sam@ravnborg.org, akpm@linux-foundation.org,
	maximilian attems <max@stro.at>,
	Andres Salomon <dilinger@debian.org>
Subject: [PATCH 7/7] deb-pkg: generate changelog, copyright and control on demand
Date: Tue, 31 Mar 2009 17:19:32 +0200
Message-ID: <1238512772-21180-7-git-send-email-max@stro.at> (raw)
In-Reply-To: <1238512772-21180-6-git-send-email-max@stro.at>

if one those files are already in place don't overwrite it.

Cc: Andres Salomon <dilinger@debian.org>
Signed-off-by: maximilian attems <max@stro.at>
---
 scripts/package/builddeb |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 5be141a..3d833a0 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -66,6 +66,10 @@ EOF
 	chmod 755 "$tmpdir/DEBIAN/$script"
 done
 
+[ -f debian/changelog ] || gen_changelog
+[ -f debian/copyright ] || gen_copyright
+[ -f debian/control ] || gen_control
+
 # Try to determine maintainer and email values
 if [ -n "${DEBEMAIL}" ]; then
 	email=${DEBEMAIL}
@@ -82,7 +86,10 @@ else
 	name="Anonymous Maintainer"
 fi
 maintainer="${name} <${email}>"
+
 # Generate a simple changelog template
+gen_changelog()
+{
 cat <<EOF > debian/changelog
 linux-2.6 ($version-$revision) unstable; urgency=low
 
@@ -90,8 +97,11 @@ linux-2.6 ($version-$revision) unstable; urgency=low
 
  -- ${maintainer}  $(date -R)
 EOF
+}
 
 # Generate copyright file
+gen_copyright()
+{
 cat <<EOF > debian/copyright
 This is a packacked upstream version of the Linux kernel.
 
@@ -110,8 +120,11 @@ git://git.eu.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
 On Debian GNU/Linux systems, the complete text of the GNU General Public
 License version 2 can be found in \`/usr/share/common-licenses/GPL-2'.
 EOF
+}
 
 # Generate a control file
+gen_control()
+{
 if [ "$ARCH" == "um" ]; then
 
 cat <<EOF > debian/control
@@ -152,6 +165,7 @@ Description: Linux kernel, version $version
  files version $version
 EOF
 fi
+}
 
 # Fix some ownership and permissions
 chown -R root:root "$tmpdir"
-- 
1.6.2.1


      reply index

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-31 15:19 [PATCH 1/7] deb-pkg: Beautify changelog maximilian attems
2009-03-31 15:19 ` [PATCH 2/7] deb-pkg: Fix Provides field maximilian attems
2009-03-31 15:19   ` [PATCH 3/7] deb-pkg: bump standards version maximilian attems
2009-03-31 15:19     ` [PATCH 4/7] deb-pkg: Fix Section and Source field maximilian attems
2009-03-31 15:19       ` [PATCH 5/7] deb-pkg: Generate a debian/copyright maximilian attems
2009-03-31 15:19         ` [PATCH 6/7] deb-pkg: Fix generated packagename maximilian attems
2009-03-31 15:19           ` maximilian attems [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1238512772-21180-7-git-send-email-max@stro.at \
    --to=max@stro.at \
    --cc=akpm@linux-foundation.org \
    --cc=dilinger@debian.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=sam@ravnborg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-KBuild Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-kbuild/0 linux-kbuild/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-kbuild linux-kbuild/ https://lore.kernel.org/linux-kbuild \
		linux-kbuild@vger.kernel.org
	public-inbox-index linux-kbuild

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kbuild


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git