Skip to content

Commit

Permalink
kbuild, deb-pkg: improve maintainer identification
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Frans Pop <[email protected]>
Cc: Andres Salomon <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
  • Loading branch information
brainflux authored and sravnborg committed Jun 9, 2009
1 parent 9461f66 commit edec611
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions scripts/package/builddeb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -130,7 +146,7 @@ cat <<EOF > debian/control
Source: linux
Section: base
Priority: optional
Maintainer: $name
Maintainer: $maintainer
Standards-Version: 3.6.1
EOF

Expand Down

0 comments on commit edec611

Please sign in to comment.