aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authormaximilian attems <max@stro.at>2009-04-22 19:11:20 -0400
committerSam Ravnborg <sam@ravnborg.org>2009-06-09 16:37:39 -0400
commitedec611db0474e90503d46428e4f196d5e30c091 (patch)
tree0fc16e80b28d450fe95ce1abdad2121d6fb7d7d4 /scripts
parent9461f666e42f2412e134a49e90ffd4a3340dfc0a (diff)
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 <max@stro.at> Signed-off-by: Frans Pop <elendil@planet.nl> Cc: Andres Salomon <dilinger@debian.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/package/builddeb22
1 files changed, 19 insertions, 3 deletions
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
95 chmod 755 "$tmpdir/DEBIAN/$script" 95 chmod 755 "$tmpdir/DEBIAN/$script"
96done 96done
97 97
98name="Kernel Compiler <$(id -nu)@$(hostname -f)>" 98# Try to determine maintainer and email values
99if [ -n "$DEBEMAIL" ]; then
100 email=$DEBEMAIL
101elif [ -n "$EMAIL" ]; then
102 email=$EMAIL
103else
104 email=$(id -nu)@$(hostname -f)
105fi
106if [ -n "$DEBFULLNAME" ]; then
107 name=$DEBFULLNAME
108elif [ -n "$NAME" ]; then
109 name=$NAME
110else
111 name="Anonymous"
112fi
113maintainer="$name <$email>"
114
99# Generate a simple changelog template 115# Generate a simple changelog template
100cat <<EOF > debian/changelog 116cat <<EOF > debian/changelog
101linux ($packageversion) unstable; urgency=low 117linux ($packageversion) unstable; urgency=low
102 118
103 * Custom built Linux kernel. 119 * Custom built Linux kernel.
104 120
105 -- $name $(date -R) 121 -- $maintainer $(date -R)
106EOF 122EOF
107 123
108# Generate copyright file 124# Generate copyright file
@@ -130,7 +146,7 @@ cat <<EOF > debian/control
130Source: linux 146Source: linux
131Section: base 147Section: base
132Priority: optional 148Priority: optional
133Maintainer: $name 149Maintainer: $maintainer
134Standards-Version: 3.6.1 150Standards-Version: 3.6.1
135EOF 151EOF
136 152