Commit d11b10f3 authored by Casey Strouse's avatar Casey Strouse Committed by GitHub

Merge pull request #4580 from uberhacker/update-jdk8-package

Update jdk8 from 8u261 to 8u271
parents 87185ec7 8edd3e18
......@@ -3,60 +3,59 @@ require 'package'
class Jdk8 < 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/javase-jdk8-downloads.html'
version '8u261'
version '8u271'
compatibility 'all'
source_url 'https://hg.openjdk.java.net/jdk8/jdk8/archive/2a8f4c022aa0.tar.gz'
source_sha256 'e632ae353ccfb90957cbb6a5818ee063710a41e7b97b490ee58ca5f627d863f1'
source_url 'file:///dev/null'
source_sha256 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
binary_url ({
aarch64: 'https://dl.bintray.com/chromebrew/chromebrew/jdk8-8u261-chromeos-armv7l.tar.xz',
armv7l: 'https://dl.bintray.com/chromebrew/chromebrew/jdk8-8u261-chromeos-armv7l.tar.xz',
i686: 'https://dl.bintray.com/chromebrew/chromebrew/jdk8-8u261-chromeos-i686.tar.xz',
x86_64: 'https://dl.bintray.com/chromebrew/chromebrew/jdk8-8u261-chromeos-x86_64.tar.xz',
aarch64: 'https://dl.bintray.com/chromebrew/chromebrew/jdk8-8u271-chromeos-armv7l.tar.xz',
armv7l: 'https://dl.bintray.com/chromebrew/chromebrew/jdk8-8u271-chromeos-armv7l.tar.xz',
i686: 'https://dl.bintray.com/chromebrew/chromebrew/jdk8-8u271-chromeos-i686.tar.xz',
x86_64: 'https://dl.bintray.com/chromebrew/chromebrew/jdk8-8u271-chromeos-x86_64.tar.xz',
})
binary_sha256 ({
aarch64: 'db6d59a9b314d88444d15a9bc17ae8878903a828497d3e7a13e12ad84185cab3',
armv7l: 'db6d59a9b314d88444d15a9bc17ae8878903a828497d3e7a13e12ad84185cab3',
i686: '471d97fe4a511bd953b7efede056f283b4d1ddc195f92024998854f4caab1bd5',
x86_64: 'ddd85fbc3e20f6a1e9418b06e947f876dc9a8173125b5b2e2e8c9d4017a001e0',
aarch64: '705ab1be8b97058d347ec9b318fb2a61279f24b7419f8741355c0affeedbdd44',
armv7l: '705ab1be8b97058d347ec9b318fb2a61279f24b7419f8741355c0affeedbdd44',
i686: '808513e7e6edfd62846707f707a9cc958f19604fcae83ceaa9751ecdc9465534',
x86_64: '881a2ad3bd6855cb03f410e9d73674d9ae876de9d223702ee0634cda6f99cf5b',
})
case ARGV[0]
when 'install', 'reinstall'
abort "JDK11 installed.".lightgreen if Dir.exists? "#{CREW_PREFIX}/share/jdk11"
end
def self.install
jdk=false
case ARCH
when 'aarch64', 'armv7l'
jdk=true if File.exists? "#{HOME}/Downloads/jdk-#{version}-linux-arm32-vfp-hflt.tar.gz"
jdk_bin = "#{HOME}/Downloads/jdk-#{version}-linux-arm32-vfp-hflt.tar.gz"
jdk_sha256 = '619297d2251fef2a94054865a47b55758c3a0c112eec4fe96df7157caec73313'
when 'i686'
jdk=true if File.exists? "#{HOME}/Downloads/jdk-#{version}-linux-i586.tar.gz"
jdk_bin = "#{HOME}/Downloads/jdk-#{version}-linux-i586.tar.gz"
jdk_sha256 = '9c2d5b4530e3d013d6a8294b09f348a9d527f47cb0505f19fe9215f4aab72c6d'
when 'x86_64'
jdk=true if File.exists? "#{HOME}/Downloads/jdk-#{version}-linux-x64.tar.gz"
jdk_bin = "#{HOME}/Downloads/jdk-#{version}-linux-x64.tar.gz"
jdk_sha256 = 'eba7926a683bb65c6f4e1c502ce624346c42b00fb5531deba296f2560b452c78'
end
unless jdk then
unless File.exists? jdk_bin
puts
puts "Oracle now requires an account to download the JDK.".orange
puts
puts "You must login at https://login.oracle.com/oaam_server/login.do and then visit:".orange
puts "You must login at https://login.oracle.com/mysso/signon.jsp and then visit:".orange
puts "https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html".orange
puts
puts "Download the JDK for your architecture to #{HOME}/Downloads to continue.".orange
puts
abort
end
case ARCH
when 'aarch64', 'armv7l'
abort 'Checksum mismatch. :/ Try again.'.lightred unless Digest::SHA256.hexdigest( File.read("#{HOME}/Downloads/jdk-#{version}-linux-arm32-vfp-hflt.tar.gz") ) == 'e9364badce5ce65e5bbc3f176e64c678a68650bdb03b0be702493ee7ff81b18d'
system "tar xvf #{HOME}/Downloads/jdk-#{version}-linux-arm32-vfp-hflt.tar.gz"
when 'i686'
abort 'Checksum mismatch. :/ Try again.'.lightred unless Digest::SHA256.hexdigest( File.read("#{HOME}/Downloads/jdk-#{version}-linux-i586.tar.gz") ) == 'f54a778bde277a5d1c2d9021949b05fcd7add69893672449437594581a1481ae'
system "tar xvf #{HOME}/Downloads/jdk-#{version}-linux-i586.tar.gz"
when 'x86_64'
abort 'Checksum mismatch. :/ Try again.'.lightred unless Digest::SHA256.hexdigest( File.read("#{HOME}/Downloads/jdk-#{version}-linux-x64.tar.gz") ) == '5a04e01a091f6b1ed9c0b801be4fd10689af07eeb9e27f012c9aa3af9948ea34'
system "tar xvf #{HOME}/Downloads/jdk-#{version}-linux-x64.tar.gz"
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/jdk8"
FileUtils.cd 'jdk1.8.0_261' do
FileUtils.cd 'jdk1.8.0_271' do
FileUtils.rm_f 'src.zip'
FileUtils.rm_f 'javafx-src.zip'
FileUtils.cp_r Dir.glob('*'), "#{CREW_DEST_PREFIX}/share/jdk8/"
end
FileUtils.cd "#{CREW_DEST_PREFIX}/share/jdk8/bin" do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment