]> git.sven.stormbind.net Git - sven/java-package.git/commitdiff
Applying patch to fix plugin directories. Closes #686216
authorCédric Pineau <cedric.pineau@gmail.com>
Sat, 1 Sep 2012 14:59:23 +0000 (16:59 +0200)
committerCédric Pineau <cedric.pineau@gmail.com>
Sat, 1 Sep 2012 14:59:23 +0000 (16:59 +0200)
debian/changelog
lib/common.sh
lib/oracle-j2re.sh
lib/oracle-j2sdk.sh
make-jpkg

index 1cd4cc39652e467d0f8fd3ead2f6c7f1874a1567..1a3662c0527b647f83070ecdb18868d319439a43 100644 (file)
@@ -1,8 +1,10 @@
-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
 
index 4f9edd48bbd6cfbd3af9aa4a37c2a365e9402d9f..a9ed23104284fc283c53f32495ae7aa104c08ade 100644 (file)
@@ -192,3 +192,13 @@ get_architecture() {
     
     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
+}
+
index f371e179994810de2b93129376a0c563901c177b..db287cd77e8f6aaa99e55fde3e706a1f2fa15d42 100644 (file)
@@ -67,10 +67,9 @@ 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"
-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
 }
 
@@ -86,10 +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"
-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
 }
 
@@ -103,9 +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"
-    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
 }
 
index ff93d2a4322877c3cfcc5d2f2f850fb7f2ed4383..779138878713b213558c2a2f63e34dd8e0ecef1f 100644 (file)
@@ -69,10 +69,9 @@ install_no_man_alternatives $jvm_base$j2se_name/jre/lib $oracle_jre_lib_hl
 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
 }
 
@@ -89,10 +88,9 @@ remove_alternatives $jvm_base$j2se_name/jre/lib $oracle_jre_lib_hl
 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
 }
 
@@ -107,8 +105,7 @@ 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
 }
index 7173cb5ea7e2e219c7a1e32df8348b1ac7d28f39..101d697500414f5a191228c6cd69d2a58043a26f 100755 (executable)
--- a/make-jpkg
+++ b/make-jpkg
@@ -219,6 +219,9 @@ echo
 # get architecture information
 get_architecture
 
+# get browser plugin directories
+get_browser_plugin_dirs
+
 jvm_base="/usr/lib/jvm/"
 javadoc_base="/usr/share/doc/"