[SCM] java-package packaging branch, master, updated. adec26aa8261b379a1db4ca72142b7ddc51f4e75
Cédric Pineau
cedric.pineau at gmail.com
Fri Jan 20 21:11:17 UTC 2012
The following commit has been merged in the master branch:
commit adec26aa8261b379a1db4ca72142b7ddc51f4e75
Author: Cédric Pineau <cedric.pineau at gmail.com>
Date: Thu Jan 19 22:36:49 2012 +0100
Support of .jinfo for udpate-java-alternatives tool
Use jdk included jre binaries (jdk/jre/bin/*)
Global refactor to reduce duplication of code and data
diff --git a/README b/README
new file mode 100644
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 at 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
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 at 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.
-
diff --git a/debian/changelog b/debian/changelog
index 2ad6cdb..89b37b7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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 at gmail.com> Thu, 22 Dec 2011 11:42:13 +0100
diff --git a/debian/rules b/debian/rules
index c6f6e22..9e6a0ad 100755
--- a/debian/rules
+++ b/debian/rules
@@ -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
diff --git a/lib/common.sh b/lib/common.sh
index 60c2852..64f5810 100644
--- a/lib/common.sh
+++ b/lib/common.sh
@@ -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
index 5819844..0000000
--- a/lib/install-common
+++ /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"
- }
diff --git a/lib/j2re.sh b/lib/j2re.sh
index bbeb10d..94ce4a7 100644
--- a/lib/j2re.sh
+++ b/lib/j2re.sh
@@ -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
}
diff --git a/lib/j2sdk-doc.sh b/lib/j2sdk-doc.sh
index 42b723b..8130ed7 100644
--- a/lib/j2sdk-doc.sh
+++ b/lib/j2sdk-doc.sh
@@ -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
}
diff --git a/lib/j2sdk.sh b/lib/j2sdk.sh
index 0947c25..0a91839 100644
--- a/lib/j2sdk.sh
+++ b/lib/j2sdk.sh
@@ -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
}
diff --git a/lib/j2se.sh b/lib/j2se.sh
index a02a117..b57c234 100644
--- a/lib/j2se.sh
+++ b/lib/j2se.sh
@@ -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
diff --git a/lib/oracle-j2re.sh b/lib/oracle-j2re.sh
index 5b4480e..4ee450e 100644
--- a/lib/oracle-j2re.sh
+++ b/lib/oracle-j2re.sh
@@ -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"
+}
+
diff --git a/lib/oracle-j2sdk-doc.sh b/lib/oracle-j2sdk-doc.sh
index 5fa8026..8ac8d17 100644
--- a/lib/oracle-j2sdk-doc.sh
+++ b/lib/oracle-j2sdk-doc.sh
@@ -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
+}
+
diff --git a/lib/oracle-j2sdk.sh b/lib/oracle-j2sdk.sh
index 1e525e3..18b272f 100644
--- a/lib/oracle-j2sdk.sh
+++ b/lib/oracle-j2sdk.sh
@@ -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
index f775324..0000000
--- a/lib/remove-common
+++ /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"
- }
diff --git a/make-jpkg b/make-jpkg
index 2c82962..64c3763 100755
--- 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
index fa9151e..0000000
--- a/oracle-j2re1.6/install
+++ /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
index 889ce94..0000000
--- a/oracle-j2re1.6/remove
+++ /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
index 6e74e7c..0000000
--- a/oracle-j2re1.7/install
+++ /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
index d0526c8..0000000
--- a/oracle-j2re1.7/remove
+++ /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
index f4d1134..0000000
--- a/oracle-j2sdk1.6-doc/install
+++ /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
index a1e2e9d..0000000
--- a/oracle-j2sdk1.6-doc/remove
+++ /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
index 8cf335f..0000000
--- a/oracle-j2sdk1.6/install
+++ /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
index 02badc3..0000000
--- a/oracle-j2sdk1.6/remove
+++ /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
index d2602c3..0000000
--- a/oracle-j2sdk1.7-doc/install
+++ /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
index 0119a79..0000000
--- a/oracle-j2sdk1.7-doc/remove
+++ /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
index 10c7a7a..0000000
--- a/oracle-j2sdk1.7/install
+++ /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
index 5e23e7c..0000000
--- a/oracle-j2sdk1.7/remove
+++ /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"
--
java-package packaging
More information about the pkg-java-commits
mailing list