Add Java 10 Server JRE support now that it's released.
[sven/java-package.git] / lib / oracle-server-jre.sh
index c5195f6..bcbde29 100644 (file)
@@ -3,8 +3,31 @@ j2se_detect_oracle_server_j2re=oracle_server_j2re_detect
 oracle_server_j2re_detect() {
   j2se_release=0
 
+  # JRE 10 GA release (serverjre-10_linux-x64_bin.tar.gz)
+  if [[ $archive_name =~ ^serverjre-10(\.([0-9]+)\.([0-9]+))?_linux-x64_bin\.tar\.gz ]]
+  then
+      j2se_release=10
+      j2se_update=${BASH_REMATCH[1]:-.0.0}
+      j2se_arch=x64
+      j2se_version_name="${j2se_release} version ${j2se_release}${j2se_update}"
+      j2se_version=${j2se_release}${j2se_update}${revision}
+      oracle_jre_bin_hl="jdb rmid jmap java javac xjc jstat jarsigner jinfo wsimport rmiregistry jstack wsgen jps keytool jar serialver jcmd jrunscript jstatd schemagen"
+      oracle_jre_bin_jre=" "
+      oracle_jre_lib_hl=" "
+  fi
+
+  # JRE 9 GA release (serverjre-9.0.1_linux-x64_bin.tar.gz)
+  if [[ $archive_name =~ ^serverjre-9(\.([0-9]+)\.([0-9]+))?_linux-x64_bin\.tar\.gz ]]
+  then
+      j2se_release=9
+      j2se_update=${BASH_REMATCH[1]:-.0.0}
+      j2se_arch=x64
+      j2se_version_name="${j2se_release} version ${j2se_release}${j2se_update}"
+      j2se_version=${j2se_release}${j2se_update}${revision}
+  fi
+
   # Update or GA release (server-jre-8u74-linux-x64.tar.gz)
-  if [[ $archive_name =~ server-jre-([0-9]+)(u([0-9]+))?-linux-(i586|x64|amd64)\.(bin|tar\.gz) ]]
+  if [[ $archive_name =~ server-jre-([0-8]+)(u([0-9]+))?-linux-(i586|x64|amd64)\.(bin|tar\.gz) ]]
   then
     j2se_release=${BASH_REMATCH[1]}
     j2se_update=${BASH_REMATCH[3]}
@@ -20,7 +43,7 @@ oracle_server_j2re_detect() {
   fi
 
   # Early Access Release (jre-8-ea-bin-b103-linux-x64-15_aug_2013.tar.gz)
-  if [[ $archive_name =~ server-jre-([0-9]+)(u([0-9]+))?-(ea|fcs)-bin-(b[0-9]+)-linux-(i586|x64|amd64).*\.(bin|tar\.gz) ]]
+  if [[ $archive_name =~ server-jre-([0-8]+)(u([0-9]+))?-(ea|fcs)-bin-(b[0-9]+)-linux-(i586|x64|amd64).*\.(bin|tar\.gz) ]]
   then
     j2se_release=${BASH_REMATCH[1]}
     j2se_update=${BASH_REMATCH[3]}
@@ -77,9 +100,9 @@ EOF
       j2se_remove=oracle_server_j2re_remove
       j2se_jinfo=oracle_server_j2re_jinfo
       j2se_control=oracle_server_j2re_control
-      oracle_jre_bin_hl="java keytool orbd pack200 rmid rmiregistry servertool tnameserv unpack200 policytool"
-      oracle_jre_bin_jre="policytool"
-      oracle_jre_lib_hl="jexec"
+      oracle_jre_bin_hl="${oracle_jre_bin_hl:-java keytool orbd pack200 rmid rmiregistry servertool tnameserv unpack200 policytool}"
+      oracle_jre_bin_jre="${oracle_jre_bin_jre:-policytool}"
+      oracle_jre_lib_hl="${oracle_jre_lib_hl:-jexec}"
       j2se_package="$j2se_vendor-java$j2se_release-server-jre"
       exlude_libs="appletviewer libawt_xawt.so libsplashscreen.so policytool"
       j2se_run
@@ -134,7 +157,7 @@ oracle_server_j2re_control() {
     cat << EOF
 Package: $j2se_package
 Architecture: $j2se_debian_arch
-Depends: \${misc:Depends}, \${shlibs:Depends}, $depends
+Depends: \${misc:Depends}, \${shlibs:Depends}, java-common, $depends
 Recommends: netbase
 Provides: java-runtime-headless, java2-runtime-headless, $provides_headless
 Description: $j2se_title