Please consider the attached patch for version 0.62 as a suggested
implementation.
https://github.com/TiagoTT/java-package/commit/7e64d46014e89d52f54d35e32b8839d92fbd9f15
I also attached a patch for version 0.56 which is available for Debian
8, which I am using currently.
https://github.com/TiagoTT/java-package/commit/d053c9e55d4e37e2a9a2c8dfef6361415c4c7031
diff --git a/lib/jdk-doc.sh b/lib/jdk-doc.sh
index a1891ba..bc382b3 100644
--- a/lib/jdk-doc.sh
+++ b/lib/jdk-doc.sh
@@ -36,8 +36,13 @@ j2sdk_doc_run() {
echo
diskfree "$j2se_required_space"
read_maintainer_info
- j2se_package="$j2se_vendor-java$j2se_release-doc"
- j2se_name="jdk$j2se_release-$j2se_vendor-doc"
+ if [ -n "$multi_package" ]; then
+ j2se_package="$j2se_vendor-java$j2se_version-doc"
+ j2se_name="jdk$j2se_version-$j2se_vendor-doc"
+ else
+ j2se_package="$j2se_vendor-java$j2se_release-doc"
+ j2se_name="jdk$j2se_release-$j2se_vendor-doc"
+ fi
local target="$package_dir/$j2se_name"
install -d -m 755 "$( dirname "$target" )"
extract_bin "$archive_path" "$j2se_expected_min_size" "$target"
diff --git a/lib/jdk.sh b/lib/jdk.sh
index 8858bb6..43473a8 100644
--- a/lib/jdk.sh
+++ b/lib/jdk.sh
@@ -39,8 +39,13 @@ j2sdk_run() {
echo
diskfree "$j2se_required_space"
read_maintainer_info
- j2se_package="$j2se_vendor-java$j2se_release-jdk"
- j2se_name="jdk-$j2se_release-$j2se_vendor-$j2se_arch"
+ if [ -n "$multi_package" ]; then
+ j2se_package="$j2se_vendor-java$j2se_version-jdk"
+ j2se_name="jdk-$j2se_version-$j2se_vendor-$j2se_arch"
+ else
+ j2se_package="$j2se_vendor-java$j2se_release-jdk"
+ j2se_name="jdk-$j2se_release-$j2se_vendor-$j2se_arch"
+ fi
local target="$package_dir/$j2se_name"
install -d -m 755 "$( dirname "$target" )"
extract_bin "$archive_path" "$j2se_expected_min_size" "$target"
diff --git a/lib/jre.sh b/lib/jre.sh
index b19e6ce..6866989 100644
--- a/lib/jre.sh
+++ b/lib/jre.sh
@@ -24,8 +24,13 @@ j2re_run() {
echo
diskfree "$j2se_required_space"
read_maintainer_info
- j2se_package="$j2se_vendor-java$j2se_release-jre"
- j2se_name="jre-$j2se_release-$j2se_vendor-$j2se_arch"
+ if [ -n "$multi_package" ]; then
+ j2se_package="$j2se_vendor-java$j2se_version-jre"
+ j2se_name="jre-$j2se_version-$j2se_vendor-$j2se_arch"
+ else
+ j2se_package="$j2se_vendor-java$j2se_release-jre"
+ j2se_name="jre-$j2se_release-$j2se_vendor-$j2se_arch"
+ fi
local target="$package_dir/$j2se_name"
install -d -m 755 "$( dirname "$target" )"
extract_bin "$archive_path" "$j2se_expected_min_size" "$target"
diff --git a/make-jpkg b/make-jpkg
index 826b2da..aaa05db 100755
--- a/make-jpkg
+++ b/make-jpkg
@@ -32,6 +32,7 @@ fi
genchanges=""
build_source=""
+multi_package=""
### check for run in fakeroot
@@ -84,6 +85,7 @@ The following options are recognized:
--changes create a .changes file
--revision add debian revision
--source build a source package instead of a binary deb package
+ --multi build distinct packages for each update of a release
--help display this help and exit
--version output version information and exit
@@ -131,6 +133,8 @@ while [[ $# -gt 0 && "x$1" == x--* ]]; do
genchanges="true"
elif [[ "x$1" == x--source ]]; then
build_source="true"
+ elif [[ "x$1" == x--multi ]]; then
+ multi_package="true"
else
unrecognized_option "$1"
fi
diff --git a/make-jpkg.1 b/make-jpkg.1
index bceec92..0b1f32f 100644
--- a/make-jpkg.1
+++ b/make-jpkg.1
@@ -52,6 +52,10 @@ add debian revision
.B --source
build a source package instead of a binary deb package
.TP
+.B --multi
+Build distinct packages for each update of a release by adding the Java update
+number to the package name and the installation directories.
+.TP
.B --help
display help text and exit
.TP
diff --git a/lib/jdk-doc.sh b/lib/jdk-doc.sh
index e6f94ea..faeacf7 100644
--- a/lib/jdk-doc.sh
+++ b/lib/jdk-doc.sh
@@ -38,8 +38,13 @@ j2sdk_doc_run() {
diskfree "$j2se_required_space"
read_maintainer_info
get_distribution
- j2se_package="$j2se_vendor-java$j2se_release-doc"
- j2se_name="$j2se_package"
+ if [ -n "$multi_package" ]; then
+ j2se_package="$j2se_vendor-java$j2se_version-doc"
+ j2se_name="jdk$j2se_version-$j2se_vendor-doc"
+ else
+ j2se_package="$j2se_vendor-java$j2se_release-doc"
+ j2se_name="jdk$j2se_release-$j2se_vendor-doc"
+ fi
local target="$package_dir/$j2se_name"
install -d -m 755 "$( dirname "$target" )"
extract_bin "$archive_path" "$j2se_expected_min_size" "$target"
diff --git a/lib/oracle-jdk.sh b/lib/oracle-jdk.sh
index 23ce971..ebba21a 100644
--- a/lib/oracle-jdk.sh
+++ b/lib/oracle-jdk.sh
@@ -106,7 +106,11 @@ EOF
fi
oracle_jre_lib_hl="jexec"
oracle_bin_jdk="appletviewer extcheck idlj jar jarsigner javac javadoc javah javap jcmd jconsole jdb jdeps jhat jinfo jmap jmc jps jrunscript jsadebugd jstack jstat jstatd jvisualvm native2ascii rmic schemagen serialver wsgen wsimport xjc"
- j2se_package="$j2se_vendor-java$j2se_release-jdk"
+ if [ -n "$multi_package" ]; then
+ j2se_package="$j2se_vendor-java$j2se_version-jdk"
+ else
+ j2se_package="$j2se_vendor-java$j2se_release-jdk"
+ fi
j2se_run
fi
fi
diff --git a/lib/oracle-jre.sh b/lib/oracle-jre.sh
index 94e3d5d..8858d34 100644
--- a/lib/oracle-jre.sh
+++ b/lib/oracle-jre.sh
@@ -81,7 +81,11 @@ EOF
oracle_jre_bin_jre="javaws policytool"
oracle_no_man_jre_bin_jre="ControlPanel jcontrol"
oracle_jre_lib_hl="jexec"
- j2se_package="$j2se_vendor-java$j2se_release-jre"
+ if [ -n "$multi_package" ]; then
+ j2se_package="$j2se_vendor-java$j2se_version-jre"
+ else
+ j2se_package="$j2se_vendor-java$j2se_release-jre"
+ fi
j2se_run
fi
fi
diff --git a/lib/oracle-server-jre.sh b/lib/oracle-server-jre.sh
index d901e31..56164f2 100644
--- a/lib/oracle-server-jre.sh
+++ b/lib/oracle-server-jre.sh
@@ -80,7 +80,11 @@ EOF
oracle_jre_bin_hl="java keytool orbd pack200 rmid rmiregistry servertool tnameserv unpack200 policytool"
oracle_jre_bin_jre="policytool"
oracle_jre_lib_hl="jexec"
- j2se_package="$j2se_vendor-java$j2se_release-server-jre"
+ if [ -n "$multi_package" ]; then
+ j2se_package="$j2se_vendor-java$j2se_version-server-jre"
+ else
+ j2se_package="$j2se_vendor-java$j2se_release-server-jre"
+ fi
exlude_libs="appletviewer libawt_xawt.so libsplashscreen.so policytool"
j2se_run
fi
diff --git a/make-jpkg b/make-jpkg
index 3db992c..ecda87a 100755
--- a/make-jpkg
+++ b/make-jpkg
@@ -87,6 +87,7 @@ The following options are recognized:
--changes create a .changes file
--revision add debian revision
--source build a source package instead of a binary deb package
+ --multi build distinct packages for each update of a release
--with-system-certs integrate with the system's keystore
--jce-policy FILE Replace cryptography files with versions from FILE
@@ -148,6 +149,8 @@ while [[ $# -gt 0 && "x$1" == x--* ]]; do
genchanges="true"
elif [[ "x$1" == x--source ]]; then
build_source="true"
+ elif [[ "x$1" == x--multi ]]; then
+ multi_package="true"
elif [[ "x$1" == x--with-system-certs ]]; then
create_cert_softlinks="true"
else
diff --git a/make-jpkg.1 b/make-jpkg.1
index 34a5462..ab743cc 100644
--- a/make-jpkg.1
+++ b/make-jpkg.1
@@ -61,6 +61,10 @@ add debian revision
.B --source
build a source package instead of a binary deb package
.TP
+.B --multi
+Build distinct packages for each update of a release by adding the Java update
+number to the package name and the installation directories.
+.TP
.B --with-system-certs
Replace the JVMs keystore with a softlink to the system's keystore,
(/etc/ssl/certs/java/cacerts) which is managed automatically by the