After the previous attempt, it occurred to me to ask debian-java. eagle noted the existence of the ancient java-package. This is what Debian used to use to package Sun Java before the distributor licenses. It is not what the recently-available packages were built with (they were built with this, which I can't work out what to do with), but it does build a usable Sun Java. Cédric Pineau updated it and I have, with a patch, used it to package Oracle JDK 6u30 for our actual business use. Here's what I did on my work PC (Ubuntu 10.04 amd64).
- sudo apt-get install debhelper
- Get the zip of Cédric's java-package from github, unzip to a suitable directory. cd there. (Mine was /home/fun/bin/cedricpineau-java-package-b
- Move all files from ./lib/* to the same directory. (I ran the script as-was, not as an installed package on my system.)
- Edit make-jpkg and change lib_dir="/usr/share/java-package" to point to where you've unzipped the thing (e.g., /home/fun/bin/cedricpineau-java-package-b
- Edit oracle-j2sdk1.6/install with this patch so that even obsolete and horrible stuff is linked in /etc/alternatives the way it was by 6u26. (Note that Matthias Klose, who used to package Sun Java for Debian and Ubuntu, considers parts of this patch an abomination unto Nuggan.)
- Download the self-extracting JDK bin file from Oracle. (I put it in /home/fun/Downloads/jdk-6u30-linux-x64.b
- ./make-jpkg /home/fun/Downloads/jdk-6u30-linux-x64.b
The resulting file has unmet dependencies — so to install, you need to do:
sudo dpkg -i oracle-j2sdk1.6_1.6.0+update30_amd64.deb
sudo apt-get install -f
This is guaranteed in no manner whatsoever. However, we've just deployed it to the template image all our new VMs will be cloned from. I'll keep you updated ...