Skip to content
This repository has been archived by the owner on Sep 29, 2022. It is now read-only.

Commit

Permalink
add jdk8 for Linux using the template for jdk
Browse files Browse the repository at this point in the history
  • Loading branch information
cidermole committed Apr 4, 2016
1 parent df44076 commit ffd51c6
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
30 changes: 30 additions & 0 deletions java/jdk8/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

#### Download in build because we have to set cookies ####
if [ "$ARCH" = "32" ]; then
curl -v -j -k -L -H "Cookie: oraclelicense=accept-securebackup-cookie" -b gpw_e24=http%3A%2F%2Fwww.oracle.com -o jdk.tar.gz -L 'http://download.oracle.com/otn-pub/java/jdk/8u77-b03/jdk-8u77-linux-i586.tar.gz'
lib="i386"
else
curl -v -j -k -L -H "Cookie: oraclelicense=accept-securebackup-cookie" -b gpw_e24=http%3A%2F%2Fwww.oracle.com -o jdk.tar.gz -L 'http://download.oracle.com/otn-pub/java/jdk/8u77-b03/jdk-8u77-linux-x64.tar.gz'
lib="amd64"
# jdk/lib/amd64/
# jdk/lib/amd64/jli/
fi

# Extract files
tar -xzvf jdk.tar.gz
mv jdk1.8.0_77 "$PREFIX/jdk"

# Make symlinks so that things are in the prefix's bin directory
mkdir -p "$PREFIX/bin"
cd "$PREFIX/bin"
for filename in ../jdk/bin/*; do
ln -s $filename $(basename $filename)
done

# Make symlinks so that things are in the prefix's lib directory
mkdir -p "$PREFIX/lib"
cd "$PREFIX/lib"
for filename in ../jdk/lib/${lib}/* ../jdk/lib/${lib}/jli/*; do
ln -s $filename $(basename $filename)
done
15 changes: 15 additions & 0 deletions java/jdk8/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package:
name: jdk8
version: !!str 8.u77

requirements:
build:
- curl

test:
commands:
- java -version

about:
home: http://www.oracle.com/technetwork/java/javase/
license: Oracle Binary Code License Agreement
1 change: 1 addition & 0 deletions java/jdk8/pre-link.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
echo "By installing the JDK package, you are agreeing to the Oracle Binary Code License Agreement for Java SE."
2 changes: 2 additions & 0 deletions java/jdk8/pre-link.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
echo "By installing the JDK package, you are agreeing to the Oracle Binary Code License Agreement for Java SE."

0 comments on commit ffd51c6

Please sign in to comment.