summaryrefslogtreecommitdiff
path: root/scripts/package
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/package')
-rwxr-xr-xscripts/package/builddeb13
1 files changed, 12 insertions, 1 deletions
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 2c68c8bf6c76..88dbf23b6970 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -217,9 +217,20 @@ else
fi
maintainer="$name <$email>"
+# Try to determine distribution
+if [ -n "$KDEB_CHANGELOG_DIST" ]; then
+ distribution=$KDEB_CHANGELOG_DIST
+elif distribution=$(lsb_release -cs 2>/dev/null) && [ -n "$distribution" ]; then
+ : # nothing to do in this case
+else
+ distribution="unstable"
+ echo >&2 "Using default distribution of 'unstable' in the changelog"
+ echo >&2 "Install lsb-release or set \$KDEB_CHANGELOG_DIST explicitly"
+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.