[java-package] 01/03: add --distribution patch (Closes: #819537)

Tony Mancill tmancill at moszumanska.debian.org
Sat Sep 10 17:10:09 UTC 2016


This is an automated email from the git hooks/post-receive script.

tmancill pushed a commit to branch master
in repository java-package.

commit 3507a234b95476fe4ed3e6d7be685e4ffb2df576
Author: tony mancill <tmancill at debian.org>
Date:   Sat Sep 10 10:03:36 2016 -0700

    add --distribution patch (Closes: #819537)
    
    Author: Martin Gerhard Loschwitz <m.loschwitz at 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.
---
 lib/common.sh  | 7 +++++++
 lib/javase.sh  | 3 ++-
 lib/jdk-doc.sh | 1 +
 make-jpkg      | 5 +++++
 make-jpkg.1    | 3 +++
 5 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/lib/common.sh b/lib/common.sh
index 73d729f..268c458 100644
--- a/lib/common.sh
+++ b/lib/common.sh
@@ -202,3 +202,10 @@ get_browser_plugin_dirs() {
     fi
 }
 
+get_distribution() {
+    if [ -n "$distribution" ]; then
+      target_distribution="$distribution"
+    else
+      target_distribution="unstable"
+    fi
+}
diff --git a/lib/javase.sh b/lib/javase.sh
index ed0745c..8955c92 100644
--- a/lib/javase.sh
+++ b/lib/javase.sh
@@ -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
diff --git a/lib/jdk-doc.sh b/lib/jdk-doc.sh
index 9d27ae4..e6f94ea 100644
--- a/lib/jdk-doc.sh
+++ b/lib/jdk-doc.sh
@@ -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"
diff --git a/make-jpkg b/make-jpkg
index 6e53003..6ec655a 100755
--- a/make-jpkg
+++ b/make-jpkg
@@ -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
diff --git a/make-jpkg.1 b/make-jpkg.1
index ba1d000..a3f35f3 100644
--- a/make-jpkg.1
+++ b/make-jpkg.1
@@ -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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/java-package.git



More information about the pkg-java-commits mailing list