X-Git-Url: http://git.sven.stormbind.net/?p=sven%2Fjava-package.git;a=blobdiff_plain;f=lib%2Foracle-j2re.sh;h=db287cd77e8f6aaa99e55fde3e706a1f2fa15d42;hp=f0c1635f7d2d440e072843979d7009fd05d18ae2;hb=d8cde9ed501f030194a66a7993523d43ab926084;hpb=828bf5f52ad35e98afecea3f2ab4673c809d087e diff --git a/lib/oracle-j2re.sh b/lib/oracle-j2re.sh index f0c1635..db287cd 100644 --- a/lib/oracle-j2re.sh +++ b/lib/oracle-j2re.sh @@ -2,7 +2,7 @@ j2se_detect_oracle_j2re=oracle_j2re_detect oracle_j2re_detect() { - if [[ $archive_name =~ jre-([0-9]+)u([0-9]+)-linux-(i586|x64)\.(bin|tar\.gz) ]] + if [[ $archive_name =~ jre-([0-9]+)u([0-9]+)-linux-(i586|x64|amd64)\.(bin|tar\.gz) ]] then j2se_release=${BASH_REMATCH[1]} j2se_update=${BASH_REMATCH[2]} @@ -19,7 +19,7 @@ oracle_j2re_detect() { if [[ "$j2se_arch" != "i586" ]]; then compatible=0; fi ;; amd64|x86_64-linux-gnu) - if [[ "$j2se_arch" != "x64" ]]; then compatible=0; fi + if [[ "$j2se_arch" != "x64" && "$j2se_arch" != "amd64" ]]; then compatible=0; fi ;; esac @@ -30,33 +30,33 @@ oracle_j2re_detect() { fi - cat << EOF + cat << EOF Detected product: Java(TM) Runtime Environment (JRE) Standard Edition, Version $j2se_release Update $j2se_update Oracle(TM) EOF - if read_yn "Is this correct [Y/n]: "; then - j2se_found=true - j2se_required_space=$(( $j2se_expected_min_size * 2 + 20 )) - j2se_vendor="oracle" - j2se_title="Java(TM) JRE, Standard Edition, Oracle(TM)" + if read_yn "Is this correct [Y/n]: "; then + j2se_found=true + j2se_required_space=$(( $j2se_expected_min_size * 2 + 20 )) + j2se_vendor="oracle" + j2se_title="Java(TM) JRE, Standard Edition, Oracle(TM)" - j2se_install=oracle_j2re_install - j2se_remove=oracle_j2re_remove - j2se_jinfo=oracle_j2re_jinfo - oracle_jre_bin_hl="java javaws keytool orbd pack200 rmid rmiregistry servertool tnameserv unpack200 policytool" - oracle_jre_bin_jre="javaws policytool" - oracle_no_man_jre_bin_jre="ControlPanel" - oracle_jre_lib_hl="jexec" - j2re_run - fi + j2se_install=oracle_j2re_install + j2se_remove=oracle_j2re_remove + j2se_jinfo=oracle_j2re_jinfo + oracle_jre_bin_hl="java javaws keytool orbd pack200 rmid rmiregistry servertool tnameserv unpack200 policytool" + oracle_jre_bin_jre="javaws policytool" + oracle_no_man_jre_bin_jre="ControlPanel" + oracle_jre_lib_hl="jexec" + j2re_run + fi fi } oracle_j2re_install() { - cat << EOF + cat << EOF if [ ! -e "$jvm_base$j2se_name/debian/info" ]; then exit 0 fi @@ -67,13 +67,14 @@ install_no_man_alternatives $jvm_base$j2se_name/bin $oracle_no_man_jre_bin_jre install_no_man_alternatives $jvm_base$j2se_name/lib $oracle_jre_lib_hl plugin_dir="$jvm_base$j2se_name/lib/$DEB_BUILD_ARCH" -install_browser_plugin "/usr/lib/iceweasel/plugins" "libjavaplugin.so" "iceweasel-javaplugin.so" "\$plugin_dir/libnpjp2.so" -install_browser_plugin "/usr/lib/chromium/plugins" "libjavaplugin.so" "chromium-javaplugin.so" "\$plugin_dir/libnpjp2.so" +for b in $browser_plugin_dirs;do + install_browser_plugin "/usr/lib/\$b/plugins" "libjavaplugin.so" "\$b-javaplugin.so" "\$plugin_dir/libnpjp2.so" +done EOF } oracle_j2re_remove() { - cat << EOF + cat << EOF if [ ! -e "$jvm_base$j2se_name/debian/info" ]; then exit 0 fi @@ -84,8 +85,9 @@ remove_alternatives $jvm_base$j2se_name/bin $oracle_no_man_jre_bin_jre remove_alternatives $jvm_base$j2se_name/lib $oracle_jre_lib_hl plugin_dir="$jvm_base$j2se_name/lib/$DEB_BUILD_ARCH" -remove_browser_plugin "iceweasel-javaplugin.so" "\$plugin_dir/libnpjp2.so" -remove_browser_plugin "chromium-javaplugin.so" "\$plugin_dir/libnpjp2.so" +for b in $browser_plugin_dirs;do + remove_browser_plugin "\$b-javaplugin.so" "\$plugin_dir/libnpjp2.so" +done EOF } @@ -99,7 +101,8 @@ EOF jinfos "jre" $jvm_base$j2se_name/bin/ $oracle_jre_bin_jre jinfos "jre" $jvm_base$j2se_name/bin/ $oracle_no_man_jre_bin_jre jinfos "hl" $jvm_base$j2se_name/lib/ $oracle_jre_lib_hl - echo "plugin iceweasel-javaplugin.so $jvm_base$j2se_name/lib/$DEB_BUILD_ARCH/libnpjp2.so" - echo "plugin chromium-javaplugin.so $jvm_base$j2se_name/lib/$DEB_BUILD_ARCH/libnpjp2.so" + for b in $browser_plugin_dirs;do + echo "plugin $b-javaplugin.so $jvm_base$j2se_name/lib/$DEB_BUILD_ARCH/libnpjp2.so" + done }