2007-02-20 18:04:37 +01:00
|
|
|
source $stdenv/setup
|
2004-01-24 23:04:09 +01:00
|
|
|
|
2007-03-05 20:54:37 +01:00
|
|
|
echo "Unpacking distribution"
|
|
|
|
unzip ${src} || true
|
|
|
|
|
|
|
|
echo "Constructing JDK and JRE"
|
2007-03-05 18:13:53 +01:00
|
|
|
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
|
2004-07-14 09:59:37 +02:00
|
|
|
|
|
|
|
echo "Removing files at top level"
|
|
|
|
for file in $out/*
|
|
|
|
do
|
|
|
|
if test -f $file ; then
|
|
|
|
rm $file
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
rm -rf $out/docs
|
2007-02-20 18:04:37 +01:00
|
|
|
|
|
|
|
# Set the dynamic linker.
|
|
|
|
rpath=
|
|
|
|
for i in $libraries; do
|
|
|
|
rpath=$rpath${rpath:+:}$i/lib
|
|
|
|
done
|
2007-03-05 18:13:53 +01:00
|
|
|
|
|
|
|
if test -z "$installjdk"; then
|
2007-03-05 18:29:21 +01:00
|
|
|
rpath=$rpath${rpath:+:}$out/lib/i386/jli
|
2007-03-05 18:13:53 +01:00
|
|
|
else
|
2007-03-05 18:29:21 +01:00
|
|
|
rpath=$rpath${rpath:+:}$out/jre/lib/i386/jli
|
2007-03-05 18:13:53 +01:00
|
|
|
fi
|
|
|
|
|
2007-02-20 18:04:37 +01:00
|
|
|
find $out -type f -perm +100 \
|
|
|
|
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
|
|
|
|
--set-rpath "$rpath" {} \;
|