提交 edec611d 编写于 作者: M maximilian attems 提交者: Sam Ravnborg

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: Nmaximilian attems <max@stro.at>
Signed-off-by: NFrans Pop <elendil@planet.nl>
Cc: Andres Salomon <dilinger@debian.org>
Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
上级 9461f666
...@@ -95,14 +95,30 @@ EOF ...@@ -95,14 +95,30 @@ EOF
chmod 755 "$tmpdir/DEBIAN/$script" chmod 755 "$tmpdir/DEBIAN/$script"
done 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 # Generate a simple changelog template
cat <<EOF > debian/changelog cat <<EOF > debian/changelog
linux ($packageversion) unstable; urgency=low linux ($packageversion) unstable; urgency=low
* Custom built Linux kernel. * Custom built Linux kernel.
-- $name $(date -R) -- $maintainer $(date -R)
EOF EOF
# Generate copyright file # Generate copyright file
...@@ -130,7 +146,7 @@ cat <<EOF > debian/control ...@@ -130,7 +146,7 @@ cat <<EOF > debian/control
Source: linux Source: linux
Section: base Section: base
Priority: optional Priority: optional
Maintainer: $name Maintainer: $maintainer
Standards-Version: 3.6.1 Standards-Version: 3.6.1
EOF EOF
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册