diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-07-16 18:35:35 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-07-16 18:35:35 +0200 |
commit | 94db68d2834b13bc6ea68fe568f9217ae5985fcb (patch) | |
tree | 5995749711aa7d44b27c1a892638d524e1c801fb /pkgs/development/compilers/oraclejdk/dlj-bundle-builder.sh | |
parent | c39bee0c0f9b3b01786bc553532eb90cbaba2692 (diff) | |
download | nixlib-94db68d2834b13bc6ea68fe568f9217ae5985fcb.tar nixlib-94db68d2834b13bc6ea68fe568f9217ae5985fcb.tar.gz nixlib-94db68d2834b13bc6ea68fe568f9217ae5985fcb.tar.bz2 nixlib-94db68d2834b13bc6ea68fe568f9217ae5985fcb.tar.lz nixlib-94db68d2834b13bc6ea68fe568f9217ae5985fcb.tar.xz nixlib-94db68d2834b13bc6ea68fe568f9217ae5985fcb.tar.zst nixlib-94db68d2834b13bc6ea68fe568f9217ae5985fcb.zip |
Move jdk -> oraclejdk
Diffstat (limited to 'pkgs/development/compilers/oraclejdk/dlj-bundle-builder.sh')
-rw-r--r-- | pkgs/development/compilers/oraclejdk/dlj-bundle-builder.sh | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/pkgs/development/compilers/oraclejdk/dlj-bundle-builder.sh b/pkgs/development/compilers/oraclejdk/dlj-bundle-builder.sh new file mode 100644 index 000000000000..028164ac3955 --- /dev/null +++ b/pkgs/development/compilers/oraclejdk/dlj-bundle-builder.sh @@ -0,0 +1,60 @@ +source $stdenv/setup + +echo "Unpacking distribution" +unzip ${src} || true + +# set the dynamic linker of unpack200, necessary for construct script +echo "patching unpack200" +patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" --set-rpath "" */bin/unpack200 + +echo "constructing JDK and JRE installations" +if test -z "$installjdk"; then + sh ${construct} . tmp-linux-jdk tmp-linux-jre + mkdir -p $out + cp -R tmp-linux-jre/* $out +else + sh ${construct} . $out tmp-linux-jre +fi + +echo "removing files at top level of installation" +for file in $out/* +do + if test -f $file ; then + rm $file + fi +done +rm -rf $out/docs + +# construct the rpath +rpath= +for i in $libraries; do + rpath=$rpath${rpath:+:}$i/lib +done + +if test -z "$installjdk"; then + jrePath=$out +else + jrePath=$out/jre +fi + +if test -n "$jce"; then + unzip $jce + cp -v jce/*.jar $jrePath/lib/security +fi + +rpath=$rpath${rpath:+:}$jrePath/lib/$architecture/jli + +# set all the dynamic linkers +find $out -type f -perm +100 \ + -exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \ + --set-rpath "$rpath" {} \; + +find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \; + +if test -z "$pluginSupport"; then + rm -f $out/bin/javaws +fi + +mkdir $jrePath/lib/$architecture/plugins +ln -s $jrePath/lib/$architecture/libnpjp2.so $jrePath/lib/$architecture/plugins + |