]> git.sven.stormbind.net Git - sven/java-package.git/commitdiff
add --distribution patch (Closes: #819537)
authortony mancill <tmancill@debian.org>
Sat, 10 Sep 2016 17:03:36 +0000 (10:03 -0700)
committertony mancill <tmancill@debian.org>
Sat, 10 Sep 2016 17:09:47 +0000 (10:09 -0700)
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.

lib/common.sh
lib/javase.sh
lib/jdk-doc.sh
make-jpkg
make-jpkg.1

index 73d729f0e4a14d7d0e103754e8ec8fd867618d19..268c458085765822d722241835f3bff1a27cfa22 100644 (file)
@@ -202,3 +202,10 @@ get_browser_plugin_dirs() {
     fi
 }
 
     fi
 }
 
+get_distribution() {
+    if [ -n "$distribution" ]; then
+      target_distribution="$distribution"
+    else
+      target_distribution="unstable"
+    fi
+}
index ed0745c02bf8ef8228ce924f2ffce8ad7abb2d33..8955c92055df20c8c5f6e3cb9b661d9e0c9aab6b 100644 (file)
@@ -12,7 +12,7 @@ EOF
 
 j2se_changelog() {
     cat << 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).
 
 
   * This package was created with java-package ($version).
 
@@ -281,6 +281,7 @@ j2se_run() {
     echo
     diskfree "$j2se_required_space"
     read_maintainer_info
     echo
     diskfree "$j2se_required_space"
     read_maintainer_info
+    get_distribution
     case "${j2se_arch}" in
       i586)
         j2se_debian_arch=i386
     case "${j2se_arch}" in
       i586)
         j2se_debian_arch=i386
index 9d27ae4251963544f31382d91a24e80403485382..e6f94eac7add378171c376c39875cad0777fb044 100644 (file)
@@ -37,6 +37,7 @@ j2sdk_doc_run() {
     echo
     diskfree "$j2se_required_space"
     read_maintainer_info
     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"
     j2se_package="$j2se_vendor-java$j2se_release-doc"
     j2se_name="$j2se_package"
     local target="$package_dir/$j2se_name"
index 6e53003436a718e94b6f174eb039e5439e942e09..6ec655ae6df2827ceb33e9c66027b5db82a4a332 100755 (executable)
--- 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
   --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
 
   --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"
     [ $# -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
     elif [[ "x$1" == x--revision ]]; then
     [ $# -le 1 ] && missing_argument "$1"
     shift
index ba1d000c0c8ec10c84d4f2f25def334cdd54864a..a3f35f39f116d9d16db4b252ab2268d081dcb446 100644 (file)
@@ -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 --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
 .B --changes
 create a .changes file
 .TP