-java-package (0.52) UNRELEASED; urgency=low
+java-package (0.52) unstable; urgency=low
+ [ Gabriele Giacone ]
* Add {mozilla,firefox}-javaplugin.so for update-java-alternatives.
+ * Fix plugin directories. Closes #686216
- -- Gabriele Giacone <1o5g4r8o@gmail.com> Wed, 29 Aug 2012 20:02:25 +0200
+ -- Cédric Pineau <cedric.pineau@gmail.com> Sat, 01 Sep 2012 16:57:08 +0200
java-package (0.51) unstable; urgency=low
echo "Detected Debian GNU type: ${DEB_BUILD_GNU_TYPE:-N/A}"
}
+
+# get browser plugin directories
+get_browser_plugin_dirs() {
+ if [ $(lsb_release --id --short) = Ubuntu ]; then
+ export browser_plugin_dirs="xulrunner-addons firefox iceape iceweasel mozilla midbrowser xulrunner"
+ else
+ export browser_plugin_dirs=mozilla
+ fi
+}
+
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"
-install_browser_plugin "/usr/lib/mozilla/plugins" "libjavaplugin.so" "mozilla-javaplugin.so" "\$plugin_dir/libnpjp2.so"
-install_browser_plugin "/usr/lib/firefox/plugins" "libjavaplugin.so" "firefox-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
}
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"
-remove_browser_plugin "mozilla-javaplugin.so" "\$plugin_dir/libnpjp2.so"
-remove_browser_plugin "firefox-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
}
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"
- echo "plugin mozilla-javaplugin.so $jvm_base$j2se_name/lib/$DEB_BUILD_ARCH/libnpjp2.so"
- echo "plugin firefox-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
}
install_alternatives $jvm_base$j2se_name/bin $oracle_bin_jdk
plugin_dir="$jvm_base$j2se_name/jre/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"
-install_browser_plugin "/usr/lib/mozilla/plugins" "libjavaplugin.so" "mozilla-javaplugin.so" "\$plugin_dir/libnpjp2.so"
-install_browser_plugin "/usr/lib/firefox/plugins" "libjavaplugin.so" "firefox-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
}
remove_alternatives $jvm_base$j2se_name/bin $oracle_bin_jdk
plugin_dir="$jvm_base$j2se_name/jre/lib/$DEB_BUILD_ARCH"
-remove_browser_plugin "iceweasel-javaplugin.so" "\$plugin_dir/libnpjp2.so"
-remove_browser_plugin "chromium-javaplugin.so" "\$plugin_dir/libnpjp2.so"
-remove_browser_plugin "mozilla-javaplugin.so" "\$plugin_dir/libnpjp2.so"
-remove_browser_plugin "firefox-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
}
jinfos "jre" $jvm_base$j2se_name/jre/bin/ $oracle_no_man_jre_bin_jre
jinfos "hl" $jvm_base$j2se_name/jre/lib/ $oracle_jre_lib_hl
jinfos "jdk" $jvm_base$j2se_name/bin/ $oracle_bin_jdk
- echo "plugin iceweasel-javaplugin.so $jvm_base$j2se_name/jre/lib/$DEB_BUILD_ARCH/libnpjp2.so"
- echo "plugin chromium-javaplugin.so $jvm_base$j2se_name/jre/lib/$DEB_BUILD_ARCH/libnpjp2.so"
- echo "plugin mozilla-javaplugin.so $jvm_base$j2se_name/jre/lib/$DEB_BUILD_ARCH/libnpjp2.so"
- echo "plugin firefox-javaplugin.so $jvm_base$j2se_name/jre/lib/$DEB_BUILD_ARCH/libnpjp2.so"
+ for b in $browser_plugin_dirs;do
+ echo "plugin iceweasel-javaplugin.so $jvm_base$j2se_name/jre/lib/$DEB_BUILD_ARCH/libnpjp2.so"
+ done
}
# get architecture information
get_architecture
+# get browser plugin directories
+get_browser_plugin_dirs
+
jvm_base="/usr/lib/jvm/"
javadoc_base="/usr/share/doc/"