Commit 3507a234 authored by Tony Mancill's avatar Tony Mancill

add --distribution patch (Closes: #819537)

Author: Martin Gerhard Loschwitz <m.loschwitz@syseleven.de>
Date:   Wed Mar 30 10:18:20 2016 +0200

Add the "--distribution" parameter

This commit adds the "--distribution" paramater, effectively allowing to
specify the target distribution in the changelog of the resulting java
package. This feature is particularly helpful when dealing with local
repositories maintained by software such as reprepro and organized based
on different distributions.
parent fef30c38
......@@ -202,3 +202,10 @@ get_browser_plugin_dirs() {
fi
}
get_distribution() {
if [ -n "$distribution" ]; then
target_distribution="$distribution"
else
target_distribution="unstable"
fi
}
......@@ -12,7 +12,7 @@ EOF
j2se_changelog() {
cat << EOF
$j2se_package ($j2se_version) unstable; urgency=medium
$j2se_package ($j2se_version) $target_distribution; urgency=medium
* This package was created with java-package ($version).
......@@ -281,6 +281,7 @@ j2se_run() {
echo
diskfree "$j2se_required_space"
read_maintainer_info
get_distribution
case "${j2se_arch}" in
i586)
j2se_debian_arch=i386
......
......@@ -37,6 +37,7 @@ j2sdk_doc_run() {
echo
diskfree "$j2se_required_space"
read_maintainer_info
get_distribution
j2se_package="$j2se_vendor-java$j2se_release-doc"
j2se_name="$j2se_package"
local target="$package_dir/$j2se_name"
......
......@@ -85,6 +85,7 @@ The following options are recognized:
--revision add debian revision
--source build a source package instead of a binary deb package
--with-system-certs integrate with the system's keystore
--distribution Define the distribution to use in the changelog
--help display this help and exit
--version output version information and exit
......@@ -124,6 +125,10 @@ while [[ $# -gt 0 && "x$1" == x--* ]]; do
[ $# -le 1 ] && missing_argument "$1"
shift
maintainer_email="$1"
elif [[ "x$1" == x--distribution ]]; then
[ $# -le 1 ] && missing_argument "$1"
shift
distribution="$1"
elif [[ "x$1" == x--revision ]]; then
[ $# -le 1 ] && missing_argument "$1"
shift
......
......@@ -43,6 +43,9 @@ full name used in the maintainer field of the package
.B --email \fIEMAIL\fR
email address used in the maintainer field of the package
.TP
.B --distribution \fIDISTRIBUTION\fR
distribution to use in the debian changelog for the resulting package
.TP
.B --changes
create a .changes file
.TP
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment