Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
chromebrew
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
chromebrew
Commits
be73150f
Commit
be73150f
authored
Nov 15, 2020
by
Ed Reel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add jdk11 package
parent
9bd087b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
0 deletions
+52
-0
packages/jdk11.rb
packages/jdk11.rb
+52
-0
No files found.
packages/jdk11.rb
0 → 100644
View file @
be73150f
require
'package'
class
Jdk11
<
Package
description
'The JDK is a development environment for building applications, applets, and components using the Java programming language.'
homepage
'https://www.oracle.com/java/technologies/javase-jdk11-downloads.html'
version
'11.0.9'
compatibility
'x86_64'
case
ARCH
when
'x86_64'
source_url
'file:///dev/null'
source_sha256
'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
end
binary_url
({
x86_64:
'https://dl.bintray.com/chromebrew/chromebrew/jdk11-11.0.9-chromeos-x86_64.tar.xz'
,
})
binary_sha256
({
x86_64:
'aa768cfbd031d021d6df4dc5da90db385ac144ea4d6868447a14d2b3ace058b4'
,
})
case
ARGV
[
0
]
when
'install'
,
'reinstall'
abort
"JDK8 installed."
.
lightgreen
if
Dir
.
exists?
"
#{
CREW_PREFIX
}
/share/jdk8"
end
def
self
.
install
jdk_bin
=
"
#{
HOME
}
/Downloads/jdk-
#{
version
}
_linux-x64_bin.tar.gz"
jdk_sha256
=
'5c149faddf9deb5a2f63438e7cd8f7d21e7300c93ebbc43dc83a6e3b90d554a7'
unless
File
.
exists?
jdk_bin
then
puts
puts
"Oracle now requires an account to download the JDK."
.
orange
puts
puts
"You must login at https://login.oracle.com/mysso/signon.jsp and then visit:"
.
orange
puts
"https://www.oracle.com/java/technologies/javase-jdk11-downloads.html"
.
orange
puts
puts
"Download the JDK for your architecture to
#{
HOME
}
/Downloads to continue."
.
orange
puts
abort
end
abort
'Checksum mismatch. :/ Try again.'
.
lightred
unless
Digest
::
SHA256
.
hexdigest
(
File
.
read
(
jdk_bin
)
)
==
jdk_sha256
system
"tar xvf
#{
jdk_bin
}
"
FileUtils
.
mkdir_p
"
#{
CREW_DEST_PREFIX
}
/bin"
FileUtils
.
mkdir_p
"
#{
CREW_DEST_PREFIX
}
/share/jdk11"
FileUtils
.
cd
"jdk-
#{
version
}
"
do
FileUtils
.
rm_f
'lib/src.zip'
FileUtils
.
mv
Dir
.
glob
(
'*'
),
"
#{
CREW_DEST_PREFIX
}
/share/jdk11/"
end
FileUtils
.
cd
"
#{
CREW_DEST_PREFIX
}
/share/jdk11/bin"
do
system
"find -type f -exec ln -s
#{
CREW_PREFIX
}
/share/jdk11/bin/{}
#{
CREW_DEST_PREFIX
}
/bin/{}
\\
;"
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment