2012-08-24 14:30:48 +02:00
|
|
|
{ runCommand, openjdk, nukeReferences }:
|
2012-08-24 05:07:38 +02:00
|
|
|
|
|
|
|
let arch = if openjdk.system == "x86_64-linux" then "amd64" else "i386"; in
|
|
|
|
|
2012-08-24 14:30:48 +02:00
|
|
|
runCommand "${openjdk.name}-bootstrap.tar.xz" {} ''
|
|
|
|
mkdir -p openjdk-bootstrap/bin
|
|
|
|
mkdir -p openjdk-bootstrap/lib
|
2012-08-25 04:29:23 +02:00
|
|
|
mkdir -p openjdk-bootstrap/jre/lib/{security,ext,${arch}/{jli,server,client,headless}}
|
2012-08-24 14:30:48 +02:00
|
|
|
cp ${openjdk}/bin/{idlj,ja{va{,c,p,h},r},rmic} openjdk-bootstrap/bin
|
|
|
|
cp ${openjdk}/lib/tools.jar openjdk-bootstrap/lib
|
|
|
|
cp ${openjdk}/jre/lib/{meta-index,{charsets,jce,jsse,rt,resources}.jar,currency.data} openjdk-bootstrap/jre/lib
|
|
|
|
cp ${openjdk}/jre/lib/security/java.security openjdk-bootstrap/jre/lib/security
|
|
|
|
cp ${openjdk}/jre/lib/ext/{meta-index,sunjce_provider.jar} openjdk-bootstrap/jre/lib/ext
|
|
|
|
cp ${openjdk}/jre/lib/${arch}/{jvm.cfg,lib{awt,java,verify,zip,nio,net}.so} openjdk-bootstrap/jre/lib/${arch}
|
|
|
|
cp ${openjdk}/jre/lib/${arch}/jli/libjli.so openjdk-bootstrap/jre/lib/${arch}/jli
|
|
|
|
cp ${openjdk}/jre/lib/${arch}/server/libjvm.so openjdk-bootstrap/jre/lib/${arch}/server
|
2012-08-25 04:29:23 +02:00
|
|
|
cp ${openjdk}/jre/lib/${arch}/client/libjvm.so openjdk-bootstrap/jre/lib/${arch}/client ||
|
|
|
|
rmdir openjdk-bootstrap/jre/lib/${arch}/client
|
2012-08-24 14:30:48 +02:00
|
|
|
cp ${openjdk}/jre/lib/${arch}/headless/libmawt.so openjdk-bootstrap/jre/lib/${arch}/headless
|
|
|
|
cp -a ${openjdk}/include openjdk-bootstrap
|
|
|
|
|
|
|
|
chmod -R +w openjdk-bootstrap
|
|
|
|
find openjdk-bootstrap -print0 | xargs -0 ${nukeReferences}/bin/nuke-refs
|
|
|
|
|
|
|
|
tar cv openjdk-bootstrap | xz > $out
|
2012-08-24 05:07:38 +02:00
|
|
|
''
|