lkml.org 
[lkml]   [2012]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/3] kbuild, deb-pkg: Try to determine distribution
Date

Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
---
scripts/package/builddeb | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index eee5f8e..f5b56ac 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -172,9 +172,22 @@ else
fi
maintainer="$name <$email>"

+# Try to determine distribution
+if [ -e $(which lsb_release) ]; then
+ codename=$(lsb_release --codename --short)
+ if [ "$codename" != "" ]; then
+ distribution=$codename
+ else
+ distribution="UNRELEASED"
+ echo "WARNING: The distribution could NOT be determined!"
+ fi
+else
+ echo "HINT: Install lsb_release binary, this helps to identify your distribution!"
+fi
+
# Generate a simple changelog template
cat <<EOF > debian/changelog
-linux-upstream ($packageversion) unstable; urgency=low
+linux-upstream ($packageversion) $distribution; urgency=low

* Custom built Linux kernel.

--
1.7.9.5


\
 
 \ /
  Last update: 2012-04-24 00:19    [W:0.893 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site