nixpkgs/pkgs/development/compilers/jdk/dlj-bundle-builder.sh
Martin Bravenboer 25e0bf0f49 oops.
svn path=/nixpkgs/trunk/; revision=8187
2007-03-05 17:29:21 +00:00

36 lines
715 B
Bash

source $stdenv/setup
sh ${src} --accept-license
if test -z "$installjdk"; then
sh ${construct} . tmp-linux-jdk tmp-linux-jre
ensureDir $out
cp -R tmp-linux-jre/* $out
else
sh ${construct} . $out tmp-linux-jre
fi
echo "Removing files at top level"
for file in $out/*
do
if test -f $file ; then
rm $file
fi
done
rm -rf $out/docs
# Set the dynamic linker.
rpath=
for i in $libraries; do
rpath=$rpath${rpath:+:}$i/lib
done
if test -z "$installjdk"; then
rpath=$rpath${rpath:+:}$out/lib/i386/jli
else
rpath=$rpath${rpath:+:}$out/jre/lib/i386/jli
fi
find $out -type f -perm +100 \
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-rpath "$rpath" {} \;