]> git.sven.stormbind.net Git - sven/java-package.git/blobdiff - lib/oracle-j2sdk-doc.sh
Changed the name of the generated package to oracle-java6-jdk
[sven/java-package.git] / lib / oracle-j2sdk-doc.sh
index 5fa802658fa3f332b7aba83704d1a47ce02ef32b..64ccb0f48cdf53c4efcea8ffade549376b9a846e 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
@@ -19,17 +19,51 @@ function oracle_j2sdk_doc_detect() {
 Detected product:
     Java(TM) Development Kit (JDK) Documentation
     Standard Edition, Version $j2se_version
-    Oracle(TM), Inc.
+    Oracle(TM)
 EOF
        if read_yn "Is this correct [Y/n]: "; then
            j2se_found=true
-           j2se_release="${j2se_version:0:3}"
+           j2se_release="${j2se_version:2:1}"
            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
+}
+