summaryrefslogtreecommitdiff
path: root/scripts/package/builddeb
diff options
context:
space:
mode:
authormaximilian attems <max@stro.at>2009-04-23 01:11:20 +0200
committerSam Ravnborg <sam@ravnborg.org>2009-05-01 13:36:54 +0200
commit0303a37db4b9c6fdde916b70bdddbfb029c6b55b (patch)
treefe007398651b2c9ef91d497f4446ec6ef4f9723e /scripts/package/builddeb
parent7947660745d8b223748c86cfdf59af9c5eee53d1 (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/package/builddeb')
-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
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 <<EOF > 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 <<EOF > debian/control
Source: linux
Section: base
Priority: optional
-Maintainer: $name
+Maintainer: $maintainer
Standards-Version: 3.6.1
EOF