-
Notifications
You must be signed in to change notification settings - Fork 1.1k
PackagingJDK
jordansissel edited this page Jan 14, 2013
·
5 revisions
The following assumes you have said 'yes' to accepting the license from oracle.
% wget http://www.java.net/download/jdk7u12/archive/b04/binaries/jdk-7u12-ea-bin-b04-linux-x64-05_dec_2012.tar.gz
% tar -zxf jdk-7u12-ea-bin-b04-linux-x64-05_dec_2012.tar.gz
% fpm -s dir -t deb -n jdk7 -v 7u12ea --template-scripts --after-install =(echo "update-alternatives --install /usr/bin/java java <%= prefix %>/jre/bin/java 100") --after-remove =(echo "update-alternatives --remove java <%= prefix %>/jre/bin/java") --prefix /usr/lib/jvm/jdk-7u11 .
The above includes the bullshit necessary to manage 'alternatives' for systems like Debian that use it. Feel free to remove the --after-install and --after-remove flags if you don't need it.
If the '=(echo ....)' stuff doesn't work for you, it's probably because you're not using zsh. Substitute any bash features that are equivalent; '<(echo ...)' might work.