From: maximilian attems Date: Wed, 22 Apr 2009 23:11:20 +0000 (+0200) Subject: kbuild, deb-pkg: improve maintainer identification X-Git-Tag: v2.6.31-rc1~335^2~43 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=edec611db0474e90503d46428e4f196d5e30c091;p=linux.git kbuild, deb-pkg: improve maintainer identification 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" sounds nicer then "Kernel Compiler" if no name is found. Signed-off-by: maximilian attems Signed-off-by: Frans Pop Cc: Andres Salomon Signed-off-by: Sam Ravnborg --- diff --git a/scripts/package/builddeb b/scripts/package/builddeb index 122becc9cef7..9d464fde0df4 100644 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -95,14 +95,30 @@ 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" +fi +maintainer="$name <$email>" + # Generate a simple changelog template cat < debian/changelog linux ($packageversion) unstable; urgency=low * Custom built Linux kernel. - -- $name $(date -R) + -- $maintainer $(date -R) EOF # Generate copyright file @@ -130,7 +146,7 @@ cat < debian/control Source: linux Section: base Priority: optional -Maintainer: $name +Maintainer: $maintainer Standards-Version: 3.6.1 EOF