]> git.sven.stormbind.net Git - sven/java-package.git/commitdiff
Support of .jinfo for udpate-java-alternatives tool
authorCédric Pineau <cedric.pineau@gmail.com>
Thu, 19 Jan 2012 21:36:49 +0000 (22:36 +0100)
committerCédric Pineau <cedric.pineau@gmail.com>
Fri, 20 Jan 2012 21:07:47 +0000 (22:07 +0100)
Use jdk included jre binaries (jdk/jre/bin/*)
Global refactor to reduce duplication of code and data

27 files changed:
README [new file with mode: 0644]
TODO [deleted file]
debian/changelog
debian/rules
lib/common.sh
lib/install-common [deleted file]
lib/j2re.sh
lib/j2sdk-doc.sh
lib/j2sdk.sh
lib/j2se.sh
lib/oracle-j2re.sh
lib/oracle-j2sdk-doc.sh
lib/oracle-j2sdk.sh
lib/remove-common [deleted file]
make-jpkg
oracle-j2re1.6/install [deleted file]
oracle-j2re1.6/remove [deleted file]
oracle-j2re1.7/install [deleted file]
oracle-j2re1.7/remove [deleted file]
oracle-j2sdk1.6-doc/install [deleted file]
oracle-j2sdk1.6-doc/remove [deleted file]
oracle-j2sdk1.6/install [deleted file]
oracle-j2sdk1.6/remove [deleted file]
oracle-j2sdk1.7-doc/install [deleted file]
oracle-j2sdk1.7-doc/remove [deleted file]
oracle-j2sdk1.7/install [deleted file]
oracle-j2sdk1.7/remove [deleted file]

diff --git a/README b/README
new file mode 100644 (file)
index 0000000..7a5553a
--- /dev/null
+++ b/README
@@ -0,0 +1,37 @@
+
+* To be done : 
+
+(from java-pakage-0.42)
+- remove use of dpkg --print-architecture from plugin alternatives installation in install/remove scripts.
+- kinit, klist, and ktab not installed; handling of /etc/krb5.conf not addressed
+
+(from Matthias Klose <doko@ubuntu.com>)
+- install into a multiarch location to allow installing the i386 client vm on amd64 and ia64. 
+
+(else)
+- make symbolic links for j2se/jre/bin/* in j2se/bin/ to avoid duplication
+- make symbolic links for j2se/jre/man/man1/* in j2se/man/man1 to avoid duplication
+- make symbolic links for j2se/jre/man/ja_JP.UTF-8 in j2se/man/ja to avoid duplication
+
+
+
+
+* Main variables used in the scripts :
+
+debian_dir : debian files dir during packaging, set by make-jpkg
+install_dir : package files dir during packaging, set by make-jpkg
+DEB_BUILD_ARCH = amd64, .., set by common.sh/get_architecture
+DEB_BUILD_GNU_TYPE = x86_64-linux-gnu, .., set by common.sh/get_architecture
+jvm_base : jvm package installation dir, set by make-jpkg
+javadoc_base : javadoc package installation dir, set by make-jpkg
+j2se_package : final package name, set by j2re/j2sdk/j2sdk-doc.sh
+j2se_name : name of installed package within jvm_base, set by j2re/j2sdk/j2sdk-doc.sh
+
+j2se_install : name of function generating postinst script content, set by each_provider*-j2re/j2sdk/j2sdk-doc.sh
+j2se_remove : name of function generating prerm script content, set by each_provider*-j2re/j2sdk/j2sdk-doc.sh
+j2se_jinfo : name of function generating .jinfo file content, set by each_provider*-j2re/j2sdk/j2sdk-doc.sh
+
+
+
+
+
diff --git a/TODO b/TODO
deleted file mode 100644 (file)
index 121db83..0000000
--- a/TODO
+++ /dev/null
@@ -1,11 +0,0 @@
-
-From old java-pakage :
-Move repeated code in install/remove scripts to a single point; apply the DRY (don't repeat yourself) principle.
-Change handling of alternatives to allow for multiple directories, i.e. when you have executables in both bin and jre/bin in a JDK.
-Remove use of dpkg --print-architecture from plugin alternatives installation in install/remove scripts.
-
-From Matthias Klose <doko@ubuntu.com> :
-
-Support the .jinfo files (update-java-alternatives)
-Install into a multiarch location to allow installing the i386 client vm on amd64 and ia64. 
-
index 2ad6cdb597aa3a28282b87b872e5d257dd9c8567..89b37b7bedbeeaf0e08e44c33e64263f0f52a6c2 100644 (file)
@@ -1,9 +1,11 @@
 java-package (0.50) UNRELEASED; urgency=low
 
   * Java-package reset for reintroduction in debian (removal of all
-    previously supported jvm).
+    previously supported jvm, global refactoring).
   * Add support for Oracle Java 6 (update >= 10)
   * Add support for Oracle Java 7
+  * Add support for .jinfo file (update-java-alternatives tool)
+  * Use jdk included jre binaries (jdk/jre/bin/*)
 
  -- Cédric Pineau <cedric.pineau@gmail.com>  Thu, 22 Dec 2011 11:42:13 +0100
 
index c6f6e22b6a5a1d1ca8c169c5f64de4001f21b5e4..9e6a0ad1a4b7831a32e762efa169debf4be763e0 100755 (executable)
@@ -29,10 +29,7 @@ install: build
        dh_installdirs
 
        install -m 755 make-jpkg.out $(B)/usr/bin/make-jpkg
-       cp lib/*.sh lib/*-common $(B)/usr/share/java-package/
-       for dir in $(wildcard oracle-j2*); do \
-               cp -a $$dir $(B)/usr/share/java-package/; \
-       done
+       cp lib/*.sh $(B)/usr/share/java-package/
        find $(B) -type d -name .svn | xargs -r rm -r
 
 # Generate SUPPORTED
index 60c28522fe669a957361fa0ca2fae948732de99a..64f5810b8f9bff9d61c22c2b037bf98da7f5d348 100644 (file)
@@ -1,5 +1,5 @@
 # read_yn <prompt>
-function read_yn() {
+read_yn() {
     local prompt="$1"
     while true; do
        read -e -n 1 -p "$prompt" reply
@@ -16,7 +16,7 @@ function read_yn() {
 
 
 # diskusage <path>: prints size in MB
-function diskusage() {
+diskusage() {
     local path="$1"
     read size dummy < <( du -sm "$path" )
     echo "$size"
@@ -24,7 +24,7 @@ function diskusage() {
 
 
 # diskfree <minimum size in MB>
-function diskfree() {
+diskfree() {
     local size="$1"
     echo -n "Checking free diskspace:"
        (( free = `stat -f -c '%a / 2048 * ( %s / 512 )' $tmp ` ))
@@ -51,7 +51,7 @@ EOF
 
 
 # extract_bin <file> <expected_min_size> <dest>
-function extract_bin() {
+extract_bin() {
     local file="$1"
     local expected_min_size="$2"
     local dest="$3"
@@ -129,7 +129,7 @@ EOF
 }
 
 
-function read_maintainer_info() {
+read_maintainer_info() {
     if [ -z "$maintainer_name" ]; then
        if [ -n "$DEBFULLNAME" ]; then
                maintainer_name="$DEBFULLNAME"
@@ -181,7 +181,7 @@ EOF
 }
 
 # provide the architecture for evaluation by plugins
-function get_architecture() {
+get_architecture() {
     echo
 
     export DEB_BUILD_ARCH=$(dpkg-architecture -qDEB_BUILD_ARCH)
diff --git a/lib/install-common b/lib/install-common
deleted file mode 100644 (file)
index 5819844..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-    # Common functions for all install scripts
-
-    # install_alternative -- add an alternative
-    #
-    # install_alternative program
-    function install_alternative() {
-        local program="$1"
-        update-alternatives \
-           --install "/usr/bin/$program" "$program" \
-           "$j2se_base/bin/$program" "$priority" \
-           --slave "/usr/share/man/man1/$program.1.gz" "$program.1.gz" \
-           "$j2se_base/man/man1/$program.1.gz"
-    }
-
-    # install_java_plugin -- add an alternative for a browser plugin
-    #
-    # install_java_plugin browser_plugin_path java_plugin_path priority
-    function install_java_plugin() {
-        [ -d "$1" ] || install -d -m 755 "$1"
-        update-alternatives \
-           --install "$1/$2" "$3" "$4" "$5"
-    }
index bbeb10d601a14fd0dd22c631860a15fbd0ea313b..94ce4a73977c5aea2d790e79c87bfb26587a74e5 100644 (file)
@@ -1,12 +1,5 @@
-function j2re_readme() {
-    j2se_readme
-}
-
-function j2re_changelog() {
-    j2se_changelog
-}
 
-function j2re_control() {
+j2re_control() {
     j2se_control
     cat << EOF
 Package: $j2se_package
@@ -28,39 +21,24 @@ Description: $j2se_title
 EOF
 }
 
-function j2re_copyright() {
-    j2se_copyright
-}
-
-function j2re_install_scripts() {
-    j2se_install_scripts
-}
-
-function j2re_info() {
-    j2se_info
-}
-
-function j2re_build() {
-    j2se_build
-}
-
 # build debian package
-function j2re_run() {
+j2re_run() {
     echo
     diskfree "$j2se_required_space"
     read_maintainer_info
     j2se_package="$j2se_vendor-j2re$j2se_release"
-    j2se_base="/usr/lib/jvm/j2re$j2se_release-$j2se_vendor"
-    local target="$install_dir$j2se_base"
+    j2se_name="j2re$j2se_release-$j2se_vendor"
+    local target="$install_dir$jvm_base$j2se_name"
     install -d -m 755 "$( dirname "$target" )"
     extract_bin "$archive_path" "$j2se_expected_min_size" "$target"
     rm -rf "$target/.systemPrefs"
-    j2re_readme > "$debian_dir/README.Debian"
-    j2re_changelog > "$debian_dir/changelog"
+    j2se_readme > "$debian_dir/README.Debian"
+    j2se_changelog > "$debian_dir/changelog"
     j2re_control > "$debian_dir/control"
-    j2re_copyright > "$debian_dir/copyright"
-    j2re_install_scripts
+    j2se_copyright > "$debian_dir/copyright"
+    j2se_install_scripts
     install -d "$target/debian"
-    j2re_info > "$target/debian/info"
-    j2re_build
+    j2se_info > "$target/debian/info"
+    eval "$j2se_jinfo" > "$install_dir$jvm_base.$j2se_name.jinfo"
+    j2se_build
 }
index 42b723ba1587baa52a303baf2cbc36dee52bead1..8130ed79dea9677b111dc302e08bed1ddac2c7a8 100644 (file)
@@ -1,12 +1,4 @@
-function j2sdk_doc_readme() {
-    j2se_readme
-}
-
-function j2sdk_doc_changelog() {
-    j2se_changelog
-}
-
-function j2sdk_doc_control() {
+j2sdk_doc_control() {
     j2se_control
     cat << EOF
 Package: $j2se_package
@@ -27,19 +19,7 @@ Description: $j2se_title
 EOF
 }
 
-function j2sdk_doc_copyright() {
-    j2se_copyright
-}
-
-function j2sdk_doc_install_scripts() {
-    j2se_install_scripts
-}
-
-function j2sdk_doc_info() {
-    j2se_info
-}
-
-function j2sdk_doc_doc-base() {
+j2sdk_doc_doc-base() {
     cat << EOF
 Document: $j2se_package
 Title: $j2se_title
@@ -54,28 +34,24 @@ Files: /usr/share/doc/j2sdk$j2se_release-$j2se_vendor-doc/*.html
 EOF
 }
 
-function j2sdk_doc_build() {
-    j2se_build
-}
-
 # build debian package
-function j2sdk_doc_run() {
+j2sdk_doc_run() {
     echo
     diskfree "$j2se_required_space"
     read_maintainer_info
     j2se_package="$j2se_vendor-j2sdk$j2se_release-doc"
-    j2se_base="/usr/share/doc/j2sdk$j2se_release-$j2se_vendor-doc"
-    local target="$install_dir$j2se_base"
+    j2se_name="j2sdk$j2se_release-$j2se_vendor-doc"
+    local target="$install_dir$javadoc_base$j2se_name"
     install -d -m 755 "$( dirname "$target" )"
     extract_bin "$archive_path" "$j2se_expected_min_size" "$target"
     rm -rf "$target/.systemPrefs"
-    j2sdk_doc_readme > "$debian_dir/README.Debian"
-    j2sdk_doc_changelog > "$debian_dir/changelog"
+    j2se_readme > "$debian_dir/README.Debian"
+    j2se_changelog > "$debian_dir/changelog"
     j2sdk_doc_control > "$debian_dir/control"
-    j2sdk_doc_copyright > "$debian_dir/copyright"
+    j2se_copyright > "$debian_dir/copyright"
     j2sdk_doc_doc-base > "$debian_dir/$j2se_package.doc-base"
-    j2sdk_doc_install_scripts
+    j2se_install_scripts
     install -d "$target/debian"
-    j2sdk_doc_info > "$target/debian/info"
-    j2sdk_doc_build
+    j2se_info > "$target/debian/info"
+    j2se_build
 }
index 0947c25ccba3e675313e4a77245e037b8865720f..0a918390d91956ca7870226a411f23d8dee8c1d7 100644 (file)
@@ -1,12 +1,5 @@
-function j2sdk_readme() {
-    j2se_readme
-}
-
-function j2sdk_changelog() {
-    j2se_changelog
-}
 
-function j2sdk_control() {
+j2sdk_control() {
     j2se_control
     cat << EOF
 Package: $j2se_package
@@ -30,39 +23,24 @@ Description: $j2se_title
 EOF
 }
 
-function j2sdk_copyright() {
-    j2se_copyright
-}
-
-function j2sdk_install_scripts() {
-    j2se_install_scripts
-}
-
-function j2sdk_info() {
-    j2se_info
-}
-
-function j2sdk_build() {
-    j2se_build
-}
-
 # build debian package
-function j2sdk_run() {
+j2sdk_run() {
     echo
     diskfree "$j2se_required_space"
     read_maintainer_info
     j2se_package="$j2se_vendor-j2sdk$j2se_release"
-    j2se_base="/usr/lib/jvm/j2sdk$j2se_release-$j2se_vendor"
-    local target="$install_dir$j2se_base"
+    j2se_name="j2sdk$j2se_release-$j2se_vendor"
+    local target="$install_dir$jvm_base$j2se_name"
     install -d -m 755 "$( dirname "$target" )"
     extract_bin "$archive_path" "$j2se_expected_min_size" "$target"
     rm -rf "$target/.systemPrefs"
-    j2sdk_readme > "$debian_dir/README.Debian"
-    j2sdk_changelog > "$debian_dir/changelog"
+    j2se_readme > "$debian_dir/README.Debian"
+    j2se_changelog > "$debian_dir/changelog"
     j2sdk_control > "$debian_dir/control"
-    j2sdk_copyright > "$debian_dir/copyright"
-    j2sdk_install_scripts
+    j2se_copyright > "$debian_dir/copyright"
+    j2se_install_scripts
     install -d "$target/debian"
-    j2sdk_info > "$target/debian/info"
-    j2sdk_build
+    j2se_info > "$target/debian/info"
+    eval "$j2se_jinfo" > "$install_dir$jvm_base.$j2se_name.jinfo"
+    j2se_build
 }
index a02a11799ce9220d416c0a02668176ee95e644eb..b57c23404e1395f0cb5a2edf760f443498b75449 100644 (file)
@@ -1,17 +1,17 @@
-function j2se_readme() {
+j2se_readme() {
     cat << EOF
 Package for $j2se_title
 ---
 
 This package has been automatically created with java-package ($version). 
 All files from the original distribution should have been installed in
-the directory $j2se_base. Please take a look at this directory for
+the directory $jvm_base$j2se_name. Please take a look at this directory for
 further information.
 
 EOF
 }
 
-function j2se_changelog() {
+j2se_changelog() {
     cat << EOF
 $j2se_package ($j2se_version) unstable; urgency=low
 
@@ -22,7 +22,7 @@ $j2se_package ($j2se_version) unstable; urgency=low
 EOF
 }
 
-function j2se_control() {
+j2se_control() {
     cat << EOF
 Source: $j2se_package
 Section: non-free/devel
@@ -34,13 +34,13 @@ Standards-Version: 3.7.2
 EOF
 }
 
-function j2se_copyright() {
+j2se_copyright() {
     cat << EOF
 ----------------------------------------------------------------------
 
 This file contains a copy of all copyright files found in the original
 distribution. The original copyright files and further information can
-be found in the directory $j2se_base and its
+be found in the directory $jvm_base$j2se_name and its
 subdirectories.
 
 ----------------------------------------------------------------------
@@ -65,17 +65,48 @@ EOF
     )
 }
 
-function j2se_install_scripts() {
+j2se_install_scripts() {
     cat > "$debian_dir/postinst" << EOF
 #!/bin/bash
 
 set -e
 
 if [ "\$1" = configure ]; then
-EOF
-    cat "$lib_dir/install-common" >> "$debian_dir/postinst"
 
-    cat "$lib_dir/$j2se_package/install" >> "$debian_dir/postinst"
+    # Common functions for all install scripts
+
+    # install_alternatives program_base programs
+    install_alternatives() {
+        program_base="\$1"
+        shift
+        for program in \$*; do
+          update-alternatives \\
+             --install "/usr/bin/\$program" "\$program" "\$program_base/\$program" $j2se_priority \\
+             --slave "/usr/share/man/man1/\$program.1.gz" "\$program.1.gz" "$jvm_base$j2se_name/man/man1/\$program.1.gz"
+        done
+    }
+
+    # install_alternatives_no_man program_base programs
+    install_no_man_alternatives() {
+        program_base="\$1"
+        shift
+        for program in \$*; do
+          update-alternatives --install "/usr/bin/\$program" "\$program" "\$program_base/\$program" $j2se_priority
+        done
+    }
+
+    # install_browser_plugin link_path link_name plugin_name plugin
+    install_browser_plugin() {
+        local link_path="\$1"
+        local link_name="\$2"
+        local plugin_name="\$3"
+        local plugin="\$4"
+        [ -d "\$link_path" ] || install -d -m 755 "\$link_path"
+        update-alternatives --install "\$link_path/\$link_name" "\$plugin_name" "\$plugin" $j2se_priority
+    }
+
+EOF
+    eval "$j2se_install" >> "$debian_dir/postinst"
 
     cat >> "$debian_dir/postinst" << EOF
 fi
@@ -93,10 +124,27 @@ set -e
 
 case "\$1" in
     remove | deconfigure)
-EOF
-    cat "$lib_dir/remove-common" >> "$debian_dir/prerm"
 
-    cat "$lib_dir/$j2se_package/remove" >> "$debian_dir/prerm"
+    # Common functions for all remove scripts
+
+    # remove_alternatives program_base programs
+    remove_alternatives() {
+        program_base="\$1"
+        shift
+        for program in \$*; do
+          update-alternatives --remove "\$program" "\$program_base/\$program"
+        done
+    }
+
+    # remove_browser_plugin plugin_name plugin
+    remove_browser_plugin() {
+        local plugin_name="\$1"
+        local plugin="\$2"
+        update-alternatives --remove "\$plugin_name" "\$plugin"
+    }
+
+EOF
+    eval "$j2se_remove" >> "$debian_dir/prerm"
 
     cat >> "$debian_dir/prerm" << EOF
     ;;
@@ -109,7 +157,7 @@ EOF
     chmod 755 "$debian_dir/prerm"
 }
 
-function j2se_info() {
+j2se_info() {
     cat << EOF
 version="$version"
 j2se_version="$j2se_version"
@@ -119,7 +167,17 @@ date="$( date +%Y/%m/%d )"
 EOF
 }
 
-function j2se_build() {
+# jinfos prefix program_base programs
+jinfos() {
+    prefix="$1"
+    program_base="$2"
+    shift ; shift
+    for program in $*; do
+      echo "$prefix $program $program_base$program" 
+    done
+}
+
+j2se_build() {
     cd "$tmp"
     echo "Create debian package:"
     
@@ -139,9 +197,9 @@ function j2se_build() {
     # dh_install
     # dh_link
     # Conditionally wrapping this as not all JRE/JDKs have man directories
-    if [ -e "$install_dir/$j2se_base/man" ]; then
+    if [ -e "$install_dir/$jvm_base$j2se_name/man" ]; then
         echo "    dh_compress"
-        dh_compress $( find "$install_dir/$j2se_base/man" -type f ! -name "*.gz" )
+        dh_compress $( find "$install_dir/$jvm_base$j2se_name/man" -type f ! -name "*.gz" )
     fi
     echo "    dh_fixperms"
     dh_fixperms
index 5b4480e99ba974af9b31a288facc549cb9350601..4ee450ea7d8d99a2c738944e554921ff5e3b73aa 100644 (file)
@@ -1,5 +1,6 @@
 # Detect product
-function oracle_j2re_detect() {
+j2se_detect_oracle_j2re=oracle_j2re_detect
+oracle_j2re_detect() {
   local found=
   
   case "${DEB_BUILD_ARCH:-$DEB_BUILD_GNU_TYPE}" in
@@ -8,11 +9,13 @@ function oracle_j2re_detect() {
        "jre-6u"[0-9][0-9]"-linux-i586.bin") # SUPPORTED
            j2se_version=1.6.0+update${archive_name:6:2}${revision}
            j2se_expected_min_size=16 #Mb
+           j2se_priority=314
            found=true
            ;;
        "jre-7u"[0-9]"-linux-i586.tar.gz") # SUPPORTED
            j2se_version=1.7.0+update${archive_name:6:1}${revision}
            j2se_expected_min_size=94 #Mb
+           j2se_priority=316
            found=true
            ;;
       esac
@@ -22,11 +25,13 @@ function oracle_j2re_detect() {
        "jre-6u"[0-9][0-9]"-linux-x64.bin") # SUPPORTED
            j2se_version=1.6.0+update${archive_name:6:2}${revision}
            j2se_expected_min_size=16 #Mb
+           j2se_priority=314
            found=true
            ;;
        "jre-7u"[0-9]"-linux-x64.tar.gz") # SUPPORTED
            j2se_version=1.7.0+update${archive_name:6:1}${revision}
            j2se_expected_min_size=88 #Mb
+           j2se_priority=316
            found=true
            ;;
       esac
@@ -46,9 +51,64 @@ EOF
            j2se_required_space=$(( $j2se_expected_min_size * 2 + 20 ))
            j2se_vendor="oracle"
            j2se_title="Java(TM) JRE, Standard Edition, Oracle Microsystems(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
     fi
 }
 
-j2se_detect_oracle_j2re=oracle_j2re_detect
+oracle_j2re_install() {
+       cat << EOF
+if [ ! -e "$jvm_base$j2se_name/debian/info" ]; then
+    exit 0
+fi
+
+install_alternatives $jvm_base$j2se_name/bin $oracle_jre_bin_hl
+install_alternatives $jvm_base$j2se_name/bin $oracle_jre_bin_jre
+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"
+EOF
+}
+
+oracle_j2re_remove() {
+       cat << EOF
+if [ ! -e "$jvm_base$j2se_name/debian/info" ]; then
+    exit 0
+fi
+
+remove_alternatives $jvm_base$j2se_name/bin $oracle_jre_bin_hl
+remove_alternatives $jvm_base$j2se_name/bin $oracle_jre_bin_jre
+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"
+EOF
+}
+
+oracle_j2re_jinfo() {
+    cat << EOF
+name=$j2se_name
+priority=$j2se_priority
+section=main
+EOF
+    jinfos "hl" $jvm_base$j2se_name/bin/ $oracle_jre_bin_hl
+    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"
+}
+
index 5fa802658fa3f332b7aba83704d1a47ce02ef32b..8ac8d1717f78b6c98cb54486b37d61b69542398f 100644 (file)
@@ -1,5 +1,5 @@
 # Detect product
-function oracle_j2sdk_doc_detect() {
+oracle_j2sdk_doc_detect() {
   local found=
       case "$archive_name" in
        "jdk-6u"[0-9][0-9]"-apidocs.zip") # SUPPORTED
@@ -27,9 +27,43 @@ EOF
            j2se_required_space=$(( $j2se_expected_min_size * 2 + 20 ))
            j2se_vendor="oracle"
            j2se_title="Java(TM) JDK, Standard Edition, Oracle(TM) Documentation"
+
+           j2se_install=oracle_j2sdk_doc_install
+           j2se_remove=oracle_j2sdk_doc_remove
            j2sdk_doc_run
        fi
     fi
 }
 
 j2se_detect_j2sdk_doc_oracle=oracle_j2sdk_doc_detect
+
+oracle_j2sdk_doc_install() {
+       cat << EOF
+if [ ! -e "$javadoc_base$j2se_name" ]; then
+    exit 0
+fi
+
+# Register the documentation in the various documentation systems, i.e. dhelp and dwww.
+if [ "\$1" = configure ] ; then
+    if which install-docs >/dev/null 2>&1; then
+        install-docs -i $javadoc_base$j2se_name
+    fi
+fi
+EOF
+}
+
+oracle_j2sdk_doc_remove() {
+       cat << EOF
+if [ ! -e "$javadoc_base$j2se_name" ]; then
+    exit 0
+fi
+
+# Unregister documentation from the various documentation systems, i.e. dhelp and dwww.
+if [ "\$1" = configure ] ; then
+    if which install-docs >/dev/null 2>&1; then
+        install-docs -r $javadoc_base$j2se_name
+    fi
+fi
+EOF
+}
+
index 1e525e3cac6271bd7a55d64526abb34f1bdd951f..18b272f85e91b62d820694a7845af5bc565cf732 100644 (file)
@@ -1,5 +1,6 @@
 # Detect product
-function oracle_j2sdk_detect() {
+j2se_detect_oracle_j2sdk=oracle_j2sdk_detect
+oracle_j2sdk_detect() {
   local found=
   
   case "${DEB_BUILD_ARCH:-$DEB_BUILD_GNU_TYPE}" in
@@ -8,11 +9,13 @@ function oracle_j2sdk_detect() {
        "jdk-6u"[0-9][0-9]"-linux-i586.bin") # SUPPORTED
            j2se_version=1.6.0+update${archive_name:6:2}${revision}
            j2se_expected_min_size=130 #Mb
+           j2se_priority=315
            found=true
            ;;
        "jdk-7u"[0-9]"-linux-i586.tar.gz") # SUPPORTED
            j2se_version=1.7.0+update${archive_name:6:1}${revision}
            j2se_expected_min_size=190 #Mb
+           j2se_priority=317
            found=true
            ;;
       esac
@@ -22,11 +25,13 @@ function oracle_j2sdk_detect() {
        "jdk-6u"[0-9][0-9]"-linux-x64.bin") # SUPPORTED
            j2se_version=1.6.0+update${archive_name:6:2}${revision}
            j2se_expected_min_size=130 #Mb
+           j2se_priority=315
            found=true
            ;;
        "jdk-7u"[0-9]"-linux-x64.tar.gz") # SUPPORTED
            j2se_version=1.7.0+update${archive_name:6:1}${revision}
            j2se_expected_min_size=180 #Mb
+           j2se_priority=317
            found=true
            ;;
       esac
@@ -46,9 +51,67 @@ EOF
            j2se_required_space=$(( $j2se_expected_min_size * 2 + 20 ))
            j2se_vendor="oracle"
            j2se_title="Java(TM) JDK, Standard Edition, Oracle(TM)"
+
+           j2se_install=oracle_j2sdk_install
+           j2se_remove=oracle_j2sdk_remove
+           j2se_jinfo=oracle_j2sdk_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"
+           oracle_bin_jdk="appletviewer extcheck idlj jar jarsigner javac javadoc javah javap jconsole jdb jinfo jmap jps jsadebugd jstack jstat jstatd native2ascii rmic serialver"
            j2sdk_run
        fi
     fi
 }
 
-j2se_detect_oracle_j2sdk=oracle_j2sdk_detect
+oracle_j2sdk_install() {
+       cat << EOF
+if [ ! -e "$jvm_base$j2se_name/debian/info" ]; then
+    exit 0
+fi
+
+install_alternatives $jvm_base$j2se_name/jre/bin $oracle_jre_bin_hl
+install_alternatives $jvm_base$j2se_name/jre/bin $oracle_jre_bin_jre
+install_no_man_alternatives $jvm_base$j2se_name/jre/bin $oracle_no_man_jre_bin_jre
+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"
+EOF
+}
+
+oracle_j2sdk_remove() {
+       cat << EOF
+if [ ! -e "$jvm_base$j2se_name/debian/info" ]; then
+    exit 0
+fi
+
+remove_alternatives $jvm_base$j2se_name/jre/bin $oracle_jre_bin_hl
+remove_alternatives $jvm_base$j2se_name/jre/bin $oracle_jre_bin_jre
+remove_alternatives $jvm_base$j2se_name/jre/bin $oracle_no_man_jre_bin_jre
+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"
+EOF
+}
+
+oracle_j2sdk_jinfo() {
+    cat << EOF
+name=$j2se_name
+priority=$j2se_priority
+section=main
+EOF
+    jinfos "hl" $jvm_base$j2se_name/jre/bin/ $oracle_jre_bin_hl
+    jinfos "jre" $jvm_base$j2se_name/jre/bin/ $oracle_jre_bin_jre
+    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"
+}
diff --git a/lib/remove-common b/lib/remove-common
deleted file mode 100644 (file)
index f775324..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-    # Common functions for all install scripts
-
-    # remove_alternative -- remove an alternative
-    #
-    # remove_alternative program
-    function remove_alternative() {
-        local program="$1"
-        update-alternatives \
-            --remove "$program" "/usr/bin/$program-$suffix"
-        rm "/usr/bin/$program-$suffix"
-    }
-
-    # remove_java_plugin -- add an alternative for a browser plugin
-    #
-    # remove_java_plugin plugins_path
-    function remove_java_plugin() {
-        local program="$1"
-        update-alternatives \
-            --remove "$program" "$plugin_dir/libjavaplugin_oji.so"
-    }
index 2c829629e8e8494be6a8a153bf3a10a791404010..64c37635f7e34254130e7902cfdff326b4c7430d 100755 (executable)
--- a/make-jpkg
+++ b/make-jpkg
@@ -63,7 +63,7 @@ fi
 
 ### Parse options
 
-function print_usage() {
+print_usage() {
        cat << EOF
 Usage: $program_name [OPTION]... FILE
 
@@ -80,7 +80,7 @@ $program_name builds Debian packages from Java(TM) 2 binary distributions.
 EOF
 }
 
-function unrecognized_option() {
+unrecognized_option() {
     cat >&2 << EOF
 $program_name: unrecognized option \`$1'
 Try \`$program_name --help' for more information.
@@ -88,7 +88,7 @@ EOF
     exit 1
 }
 
-function missing_argument() {
+missing_argument() {
     cat >&2 << EOF
 $program_name: missing argument for option \`$1'
 Try \`$program_name --help' for more information.
@@ -154,7 +154,7 @@ failed=
 tmp=
 
 # function is called when script terminates
-function on_exit() {
+on_exit() {
     lastcmd="$_"
     if [[ -z "$success" && -z "$failed" ]]; then
        cat >&2 << EOF
@@ -173,7 +173,7 @@ EOF
 trap on_exit EXIT
 
 # print error message and terminate
-function error_exit() {
+error_exit() {
     cat >&2 << EOF
 
 Aborted.
@@ -211,6 +211,9 @@ echo
 # get architecture information
 get_architecture
 
+jvm_base="/usr/lib/jvm/"
+javadoc_base="/usr/share/doc/"
+
 j2se_found=
 for var in ${!j2se_detect_*}; do 
     eval "\$$var"
diff --git a/oracle-j2re1.6/install b/oracle-j2re1.6/install
deleted file mode 100644 (file)
index fa9151e..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-suffix=j2re1.6-oracle
-j2se_base="/usr/lib/jvm/$suffix"
-priority=316
-
-if [ ! -e "$j2se_base/debian/info" ]; then
-    exit 0
-fi
-
-# alternative <program>
-function program_alternative() {
-    local program="$1"
-    update-alternatives \
-       --install "/usr/bin/$program" "$program" \
-       "$j2se_base/bin/$program" "$priority" \
-       --slave "/usr/share/man/man1/$program.1.gz" "$program.1.gz" \
-       "$j2se_base/man/man1/$program.1.gz"
-}
-
-# kinit, klist, and ktab not installed at this
-# time; handling of /etc/krb5.conf not addressed
-program_alternative ControlPanel
-program_alternative java
-program_alternative javaws
-program_alternative keytool
-program_alternative orbd
-program_alternative pack200
-program_alternative policytool
-program_alternative rmid
-program_alternative rmiregistry
-program_alternative servertool
-program_alternative tnameserv
-program_alternative unpack200
-
-# derive the architecture-specific 
-# directory for the plugin
-arch_dir="$(dpkg --print-architecture)"
-
-# assemble the plugin path
-plugin_dir="$j2se_base/lib/$arch_dir"
-
-# iceweasel
-iceweasel_dir="/usr/lib/iceweasel/plugins"
-[ -d "$iceweasel_dir" ] || install -d -m 755 "$iceweasel_dir"
-update-alternatives \
-    --install "$iceweasel_dir/libjavaplugin.so" \
-       "iceweasel-javaplugin.so" \
-       "$plugin_dir/libnpjp2.so" "$priority"
-
-# chromium
-chromium_dir="/usr/lib/chromium/plugins"
-[ -d "$chromium_dir" ] || install -d -m 755 "$chromium_dir"
-update-alternatives \
-    --install "$chromium_dir/libjavaplugin.so" \
-       "chromium-javaplugin.so" \
-       "$plugin_dir/libnpjp2.so" "$priority"
-
diff --git a/oracle-j2re1.6/remove b/oracle-j2re1.6/remove
deleted file mode 100644 (file)
index 889ce94..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-suffix=j2re1.6-oracle
-j2se_base="/usr/lib/jre/$suffix"
-
-if [ ! -e "$j2se_base/debian/info" ]; then
-    exit 0
-fi
-
-# alternative <program>
-function program_alternative() {
-    local program="$1"
-    update-alternatives \
-       --remove "$program" "$j2se_base/bin/$program"
-}
-
-program_alternative ControlPanel
-program_alternative java
-program_alternative javaws
-program_alternative keytool
-program_alternative orbd
-program_alternative pack200
-program_alternative policytool
-program_alternative rmid
-program_alternative rmiregistry
-program_alternative servertool
-program_alternative tnameserv
-program_alternative unpack200
-
-# derive the architecture-specific 
-# directory for the plugin
-arch_dir="$(dpkg --print-architecture)"
-
-# assemble the plugin path
-plugin_dir="$j2se_base/lib/$arch_dir"
-
-# iceweasel
-update-alternatives \
-    --remove "iceweasel-javaplugin.so" "$plugin_dir/libnpjp2.so"
-
-# chromium
-update-alternatives \
-    --remove "chromium-javaplugin.so" "$plugin_dir/libnpjp2.so"
diff --git a/oracle-j2re1.7/install b/oracle-j2re1.7/install
deleted file mode 100644 (file)
index 6e74e7c..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-suffix=j2re1.7-oracle
-j2se_base="/usr/lib/jvm/$suffix"
-priority=318
-
-if [ ! -e "$j2se_base/debian/info" ]; then
-    exit 0
-fi
-
-# alternative <program>
-function program_alternative() {
-    local program="$1"
-    update-alternatives \
-       --install "/usr/bin/$program" "$program" \
-       "$j2se_base/bin/$program" "$priority" \
-       --slave "/usr/share/man/man1/$program.1.gz" "$program.1.gz" \
-       "$j2se_base/man/man1/$program.1.gz"
-}
-
-# kinit, klist, and ktab not installed at this
-# time; handling of /etc/krb5.conf not addressed
-program_alternative ControlPanel
-program_alternative java
-program_alternative javaws
-program_alternative keytool
-program_alternative orbd
-program_alternative pack200
-program_alternative policytool
-program_alternative rmid
-program_alternative rmiregistry
-program_alternative servertool
-program_alternative tnameserv
-program_alternative unpack200
-
-# derive the architecture-specific 
-# directory for the plugin
-arch_dir="$(dpkg --print-architecture)"
-
-# assemble the plugin path
-plugin_dir="$j2se_base/lib/$arch_dir"
-
-# iceweasel
-iceweasel_dir="/usr/lib/iceweasel/plugins"
-[ -d "$iceweasel_dir" ] || install -d -m 755 "$iceweasel_dir"
-update-alternatives \
-    --install "$iceweasel_dir/libjavaplugin.so" \
-       "iceweasel-javaplugin.so" \
-       "$plugin_dir/libnpjp2.so" "$priority"
-
-# chromium
-chromium_dir="/usr/lib/chromium/plugins"
-[ -d "$chromium_dir" ] || install -d -m 755 "$chromium_dir"
-update-alternatives \
-    --install "$chromium_dir/libjavaplugin.so" \
-       "chromium-javaplugin.so" \
-       "$plugin_dir/libnpjp2.so" "$priority"
-
diff --git a/oracle-j2re1.7/remove b/oracle-j2re1.7/remove
deleted file mode 100644 (file)
index d0526c8..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-suffix=j2re1.7-oracle
-j2se_base="/usr/lib/jre/$suffix"
-
-if [ ! -e "$j2se_base/debian/info" ]; then
-    exit 0
-fi
-
-# alternative <program>
-function program_alternative() {
-    local program="$1"
-    update-alternatives \
-       --remove "$program" "$j2se_base/bin/$program"
-}
-
-program_alternative ControlPanel
-program_alternative java
-program_alternative javaws
-program_alternative keytool
-program_alternative orbd
-program_alternative pack200
-program_alternative policytool
-program_alternative rmid
-program_alternative rmiregistry
-program_alternative servertool
-program_alternative tnameserv
-program_alternative unpack200
-
-# derive the architecture-specific 
-# directory for the plugin
-arch_dir="$(dpkg --print-architecture)"
-
-# assemble the plugin path
-plugin_dir="$j2se_base/lib/$arch_dir"
-
-# iceweasel
-update-alternatives \
-    --remove "iceweasel-javaplugin.so" "$plugin_dir/libnpjp2.so"
-
-# chromium
-update-alternatives \
-    --remove "chromium-javaplugin.so" "$plugin_dir/libnpjp2.so"
diff --git a/oracle-j2sdk1.6-doc/install b/oracle-j2sdk1.6-doc/install
deleted file mode 100644 (file)
index f4d1134..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-j2se_base="/usr/share/doc/j2sdk1.6-oracle-doc"
-priority=316
-
-if [ ! -e "$j2se_base/debian/info" ]; then
-    exit 0
-fi
-
-# Register the documentation with the various 
-# documentation systems, i.e. dhelp and dwww.
-
-if [ "$1" = configure ] ; then
-    if which install-docs >/dev/null 2>&1; then
-        install-docs -i /usr/share/doc-base/oracle-j2sdk1.6-doc
-    fi
-fi
-
diff --git a/oracle-j2sdk1.6-doc/remove b/oracle-j2sdk1.6-doc/remove
deleted file mode 100644 (file)
index a1e2e9d..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-j2se_base="/usr/share/doc/j2sdk1.6-oracle-doc"
-
-if [ ! -e "$j2se_base/debian/info" ]; then
-    exit 0
-fi
-
-
diff --git a/oracle-j2sdk1.6/install b/oracle-j2sdk1.6/install
deleted file mode 100644 (file)
index 8cf335f..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-suffix=j2sdk1.6-oracle
-j2se_base="/usr/lib/jvm/$suffix"
-priority=315
-
-if [ ! -e "$j2se_base/debian/info" ]; then
-    exit 0
-fi
-
-# alternative <program>
-function program_alternative() {
-    local program="$1"
-    update-alternatives \
-       --install "/usr/bin/$program" "$program" \
-       "$j2se_base/bin/$program" "$priority" \
-       --slave "/usr/share/man/man1/$program.1.gz" "$program.1.gz" \
-       "$j2se_base/man/man1/$program.1.gz"
-}
-
-# alternative <program> without man page
-function program_alternative_no_man() {
-    local program="$1"
-    update-alternatives \
-        --install "/usr/bin/$program" "$program" \
-        "$j2se_base/bin/$program" "$priority"
-}
-
-# kinit, klist, and ktab not installed at this
-# time; handling of /etc/krb5.conf not addressed
-# JRE-specific alternatives with JDKs cannot be 
-# handled by our current approach
-program_alternative appletviewer
-program_alternative_no_man ControlPanel
-program_alternative extcheck
-program_alternative idlj
-program_alternative jar
-program_alternative jarsigner
-program_alternative java
-program_alternative javac
-program_alternative javadoc
-program_alternative javah
-program_alternative javap
-program_alternative javaws
-program_alternative jconsole
-program_alternative jdb
-program_alternative jinfo
-program_alternative jmap
-program_alternative jps
-program_alternative jsadebugd
-program_alternative jstack
-program_alternative jstat
-program_alternative jstatd
-program_alternative keytool
-program_alternative native2ascii
-program_alternative orbd
-program_alternative pack200
-program_alternative policytool
-program_alternative rmic
-program_alternative rmid
-program_alternative rmiregistry
-program_alternative serialver
-program_alternative servertool
-program_alternative tnameserv
-program_alternative unpack200
-
-# derive the architecture-specific 
-# directory for the plugin
-arch_dir="$(dpkg --print-architecture)"
-
-# assemble the plugin path
-plugin_dir="$j2se_base/jre/lib/$arch_dir"
-
-# iceweasel
-iceweasel_dir="/usr/lib/iceweasel/plugins"
-[ -d "$iceweasel_dir" ] || install -d -m 755 "$iceweasel_dir"
-update-alternatives \
-    --install "$iceweasel_dir/libjavaplugin.so" \
-       "iceweasel-javaplugin.so" \
-       "$plugin_dir/libnpjp2.so" "$priority"
-
-# chromium
-chromium_dir="/usr/lib/chromium/plugins"
-[ -d "$chromium_dir" ] || install -d -m 755 "$chromium_dir"
-update-alternatives \
-    --install "$chromium_dir/libjavaplugin.so" \
-       "chromium-javaplugin.so" \
-       "$plugin_dir/libnpjp2.so" "$priority"
-
diff --git a/oracle-j2sdk1.6/remove b/oracle-j2sdk1.6/remove
deleted file mode 100644 (file)
index 02badc3..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-suffix=j2sdk1.6-oracle
-j2se_base="/usr/lib/jvm/$suffix"
-
-if [ ! -e "$j2se_base/debian/info" ]; then
-    exit 0
-fi
-
-# alternative <program>
-function program_alternative() {
-    local program="$1"
-    update-alternatives \
-       --remove "$program" "$j2se_base/bin/$program"
-}
-
-program_alternative appletviewer
-program_alternative ControlPanel
-program_alternative extcheck
-program_alternative idlj
-program_alternative jar
-program_alternative jarsigner
-program_alternative java
-program_alternative javac
-program_alternative javadoc
-program_alternative javah
-program_alternative javap
-program_alternative java-rmi.cgi
-program_alternative javaws
-program_alternative jconsole
-program_alternative jdb
-program_alternative jinfo
-program_alternative jmap
-program_alternative jps
-program_alternative jsadebugd
-program_alternative jstack
-program_alternative jstat
-program_alternative jstatd
-program_alternative keytool
-program_alternative native2ascii
-program_alternative orbd
-program_alternative pack200
-program_alternative policytool
-program_alternative rmic
-program_alternative rmid
-program_alternative rmiregistry
-program_alternative serialver
-program_alternative servertool
-program_alternative tnameserv
-program_alternative unpack200
-
-# derive the architecture-specific 
-# directory for the plugin
-arch_dir="$(dpkg --print-architecture)"
-
-# assemble the plugin path
-plugin_dir="$j2se_base/jre/lib/$arch_dir"
-
-# iceweasel
-update-alternatives \
-    --remove "iceweasel-javaplugin.so" "$plugin_dir/libnpjp2.so"
-
-# chromium
-update-alternatives \
-    --remove "chromium-javaplugin.so" "$plugin_dir/libnpjp2.so"
diff --git a/oracle-j2sdk1.7-doc/install b/oracle-j2sdk1.7-doc/install
deleted file mode 100644 (file)
index d2602c3..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-j2se_base="/usr/share/doc/j2sdk1.7-oracle-doc"
-priority=318
-
-if [ ! -e "$j2se_base/debian/info" ]; then
-    exit 0
-fi
-
-# Register the documentation with the various 
-# documentation systems, i.e. dhelp and dwww.
-
-if [ "$1" = configure ] ; then
-    if which install-docs >/dev/null 2>&1; then
-        install-docs -i /usr/share/doc-base/oracle-j2sdk1.7-doc
-    fi
-fi
-
diff --git a/oracle-j2sdk1.7-doc/remove b/oracle-j2sdk1.7-doc/remove
deleted file mode 100644 (file)
index 0119a79..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-j2se_base="/usr/share/doc/j2sdk1.7-oracle-doc"
-
-if [ ! -e "$j2se_base/debian/info" ]; then
-    exit 0
-fi
-
-
diff --git a/oracle-j2sdk1.7/install b/oracle-j2sdk1.7/install
deleted file mode 100644 (file)
index 10c7a7a..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-suffix=j2sdk1.7-oracle
-j2se_base="/usr/lib/jvm/$suffix"
-priority=317
-
-if [ ! -e "$j2se_base/debian/info" ]; then
-    exit 0
-fi
-
-# alternative <program>
-function program_alternative() {
-    local program="$1"
-    update-alternatives \
-       --install "/usr/bin/$program" "$program" \
-       "$j2se_base/bin/$program" "$priority" \
-       --slave "/usr/share/man/man1/$program.1.gz" "$program.1.gz" \
-       "$j2se_base/man/man1/$program.1.gz"
-}
-
-# alternative <program> without man page
-function program_alternative_no_man() {
-    local program="$1"
-    update-alternatives \
-        --install "/usr/bin/$program" "$program" \
-        "$j2se_base/bin/$program" "$priority"
-}
-
-# kinit, klist, and ktab not installed at this
-# time; handling of /etc/krb5.conf not addressed
-# JRE-specific alternatives with JDKs cannot be 
-# handled by our current approach
-program_alternative appletviewer
-program_alternative_no_man ControlPanel
-program_alternative extcheck
-program_alternative idlj
-program_alternative jar
-program_alternative jarsigner
-program_alternative java
-program_alternative javac
-program_alternative javadoc
-program_alternative javah
-program_alternative javap
-program_alternative_no_man java-rmi.cgi
-program_alternative javaws
-program_alternative jconsole
-program_alternative jdb
-program_alternative jinfo
-program_alternative jmap
-program_alternative jps
-program_alternative jsadebugd
-program_alternative jstack
-program_alternative jstat
-program_alternative jstatd
-program_alternative keytool
-program_alternative native2ascii
-program_alternative orbd
-program_alternative pack200
-program_alternative policytool
-program_alternative rmic
-program_alternative rmid
-program_alternative rmiregistry
-program_alternative serialver
-program_alternative servertool
-program_alternative tnameserv
-program_alternative unpack200
-
-# derive the architecture-specific 
-# directory for the plugin
-arch_dir="$(dpkg --print-architecture)"
-
-# assemble the plugin path
-plugin_dir="$j2se_base/jre/lib/$arch_dir"
-
-# iceweasel
-iceweasel_dir="/usr/lib/iceweasel/plugins"
-[ -d "$iceweasel_dir" ] || install -d -m 755 "$iceweasel_dir"
-update-alternatives \
-    --install "$iceweasel_dir/libjavaplugin.so" \
-       "iceweasel-javaplugin.so" \
-       "$plugin_dir/libnpjp2.so" "$priority"
-
-# chromium
-chromium_dir="/usr/lib/chromium/plugins"
-[ -d "$chromium_dir" ] || install -d -m 755 "$chromium_dir"
-update-alternatives \
-    --install "$chromium_dir/libjavaplugin.so" \
-       "chromium-javaplugin.so" \
-       "$plugin_dir/libnpjp2.so" "$priority"
-
diff --git a/oracle-j2sdk1.7/remove b/oracle-j2sdk1.7/remove
deleted file mode 100644 (file)
index 5e23e7c..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-suffix=j2sdk1.7-oracle
-j2se_base="/usr/lib/jvm/$suffix"
-
-if [ ! -e "$j2se_base/debian/info" ]; then
-    exit 0
-fi
-
-# alternative <program>
-function program_alternative() {
-    local program="$1"
-    update-alternatives \
-       --remove "$program" "$j2se_base/bin/$program"
-}
-
-program_alternative appletviewer
-program_alternative ControlPanel
-program_alternative extcheck
-program_alternative idlj
-program_alternative jar
-program_alternative jarsigner
-program_alternative java
-program_alternative javac
-program_alternative javadoc
-program_alternative javah
-program_alternative javap
-program_alternative java-rmi.cgi
-program_alternative javaws
-program_alternative jconsole
-program_alternative jdb
-program_alternative jinfo
-program_alternative jmap
-program_alternative jps
-program_alternative jsadebugd
-program_alternative jstack
-program_alternative jstat
-program_alternative jstatd
-program_alternative keytool
-program_alternative native2ascii
-program_alternative orbd
-program_alternative pack200
-program_alternative policytool
-program_alternative rmic
-program_alternative rmid
-program_alternative rmiregistry
-program_alternative serialver
-program_alternative servertool
-program_alternative tnameserv
-program_alternative unpack200
-
-# derive the architecture-specific 
-# directory for the plugin
-arch_dir="$(dpkg --print-architecture)"
-
-# assemble the plugin path
-plugin_dir="$j2se_base/jre/lib/$arch_dir"
-
-# iceweasel
-update-alternatives \
-    --remove "iceweasel-javaplugin.so" "$plugin_dir/libnpjp2.so"
-
-# chromium
-update-alternatives \
-    --remove "chromium-javaplugin.so" "$plugin_dir/libnpjp2.so"