Linux-KBuild Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 1/7] deb-pkg: Beautify changelog
@ 2009-03-31 15:19 maximilian attems
  2009-03-31 15:19 ` [PATCH 2/7] deb-pkg: Fix Provides field maximilian attems
  0 siblings, 1 reply; 7+ messages in thread
From: maximilian attems @ 2009-03-31 15:19 UTC (permalink / raw)
  To: linux-kbuild; +Cc: sam, akpm, maximilian attems, Andres Salomon

Try harder to find email and maintainer name.
Debian's own devscripts all use DEBEMAIL or DEBFULLNAME
prior to an eventual EMAIL or NAME environment variable.
Match their logic.

"Anonymous Maintainer" sounds nicer then Kernel compiler
if no name is found. As bonus add more descriptive changelog
entry.

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

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 1264b8e..dd61591 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -66,14 +66,29 @@ EOF
 	chmod 755 "$tmpdir/DEBIAN/$script"
 done
 
-name="Kernel Compiler <$(id -nu)@$(hostname -f)>"
+# Try to determine maintainer and email values
+if [ -n "${DEBEMAIL}" ]; then
+	email=${DEBEMAIL}
+elif [ -n "${EMAIL}" ]; then
+	email=${EMAIL}
+else
+	email=$(id -nu)@$(hostname -f)
+fi
+if [ -n "${DEBFULLNAME}" ]; then
+	name=${DEBFULLNAME}
+elif [ -n "${NAME}" ]; then
+	name=${NAME}
+else
+	name="Anonymous Maintainer"
+fi
+maintainer="${name} <${email}>"
 # Generate a simple changelog template
 cat <<EOF > debian/changelog
 linux ($version-$revision) unstable; urgency=low
 
-  * A standard release
+  * New upstream release
 
- -- $name  $(date -R)
+ -- ${maintainer}  $(date -R)
 EOF
 
 # Generate a control file
@@ -83,7 +98,7 @@ cat <<EOF > debian/control
 Source: linux
 Section: base
 Priority: optional
-Maintainer: $name
+Maintainer: $maintainer
 Standards-Version: 3.6.1
 
 Package: $packagename
@@ -105,7 +120,7 @@ cat <<EOF > debian/control
 Source: linux
 Section: base
 Priority: optional
-Maintainer: $name
+Maintainer: $maintainer
 Standards-Version: 3.6.1
 
 Package: $packagename
-- 
1.6.2.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, back to index

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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           ` [PATCH 7/7] deb-pkg: generate changelog, copyright and control on demand maximilian attems

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