Commit e2863b90 authored by Ed Reel's avatar Ed Reel Committed by GitHub

Update jdk packages (#5417)

- Update jdk8 from 8u271 to 8u281
- Update jdk11 from 11.0.9 to 11.0.10
- Add jdk15 package
- Add jdk package
- Add pre-built binaries
parent e506dc98
require 'package'
class Jdk < 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 '8u281-15.0.2'
compatibility 'all'
is_fake
def self.preflight
jdkver = `java -version 2>&1 | head -1 | cut -d'"' -f2`.chomp
unless jdkver.include? 'No such file or directory' or jdkver.include? 'not found'
abort "JDK version #{jdkver} already installed.".lightgreen
end
puts
puts "Select version:"
puts " 8 = JDK 8u281"
if ARCH == 'x86_64'
puts "11 = JDK 11.0.10"
puts "15 = JDK 15.0.2"
end
puts " 0 = Cancel"
while version = STDIN.gets.chomp
case version
when '8', '11', '15'
depends_on 'jdk' + version
break
when '0'
abort
break
else
puts "\nPlease select from one of the options or enter 0 to cancel."
end
end
end
end
...@@ -3,29 +3,26 @@ require 'package' ...@@ -3,29 +3,26 @@ require 'package'
class Jdk11 < Package class Jdk11 < Package
description 'The JDK is a development environment for building applications, applets, and components using the Java programming language.' 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' homepage 'https://www.oracle.com/java/technologies/javase-jdk11-downloads.html'
version '11.0.9' version '11.0.10'
compatibility 'x86_64' compatibility 'x86_64'
case ARCH source_url 'file:///dev/null'
when 'x86_64' source_sha256 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
source_url 'file:///dev/null'
source_sha256 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
end
binary_url ({ binary_url ({
x86_64: 'https://dl.bintray.com/chromebrew/chromebrew/jdk11-11.0.9-chromeos-x86_64.tar.xz', x86_64: 'https://dl.bintray.com/chromebrew/chromebrew/jdk11-11.0.10-chromeos-x86_64.tar.xz',
}) })
binary_sha256 ({ binary_sha256 ({
x86_64: 'aa768cfbd031d021d6df4dc5da90db385ac144ea4d6868447a14d2b3ace058b4', x86_64: '6082f18263db0ded42b64130948c8dc39564aadd726c79f6ba92038566120107',
}) })
case ARGV[0] def self.preflight
when 'install', 'reinstall'
abort "JDK8 installed.".lightgreen if Dir.exists? "#{CREW_PREFIX}/share/jdk8" abort "JDK8 installed.".lightgreen if Dir.exists? "#{CREW_PREFIX}/share/jdk8"
abort "JDK15 installed.".lightgreen if Dir.exists? "#{CREW_PREFIX}/share/jdk15"
end end
def self.install def self.install
jdk_bin = "#{HOME}/Downloads/jdk-#{version}_linux-x64_bin.tar.gz" jdk_bin = "#{HOME}/Downloads/jdk-#{version}_linux-x64_bin.tar.gz"
jdk_sha256 = '5c149faddf9deb5a2f63438e7cd8f7d21e7300c93ebbc43dc83a6e3b90d554a7' jdk_sha256 = '94bd34f85ee38d3ef59e5289ec7450b9443b924c55625661fffe66b03f2c8de2'
unless File.exists? jdk_bin then unless File.exists? jdk_bin then
puts puts
puts "Oracle now requires an account to download the JDK.".orange puts "Oracle now requires an account to download the JDK.".orange
......
require 'package'
class Jdk15 < 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-jdk15-downloads.html'
version '15.0.2'
compatibility 'x86_64'
source_url 'file:///dev/null'
source_sha256 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
binary_url ({
x86_64: 'https://dl.bintray.com/chromebrew/chromebrew/jdk15-15.0.2-chromeos-x86_64.tar.xz',
})
binary_sha256 ({
x86_64: '76967a212cb4bded9932fa2e44328272472f780a69e1574da9f4412a81de41ae',
})
def self.preflight
abort "JDK8 installed.".lightgreen if Dir.exists? "#{CREW_PREFIX}/share/jdk8"
abort "JDK11 installed.".lightgreen if Dir.exists? "#{CREW_PREFIX}/share/jdk11"
end
def self.install
jdk_bin = "#{HOME}/Downloads/jdk-#{version}_linux-x64_bin.tar.gz"
jdk_sha256 = '54b29a3756671fcb4b6116931e03e86645632ec39361bc16ad1aaa67332c7c61'
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-jdk15-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/jdk15"
FileUtils.mkdir_p "#{CREW_DEST_MAN_PREFIX}/man1"
FileUtils.cd "jdk-#{version}" do
FileUtils.rm_f 'lib/src.zip'
FileUtils.mv Dir.glob('*'), "#{CREW_DEST_PREFIX}/share/jdk15/"
end
FileUtils.cd "#{CREW_DEST_PREFIX}/share/jdk15/bin" do
system "find -type f -exec ln -s #{CREW_PREFIX}/share/jdk15/bin/{} #{CREW_DEST_PREFIX}/bin/{} \\;"
end
system "compressdoc --gzip -9 #{CREW_DEST_PREFIX}/share/jdk15/man/man1"
FileUtils.cd "#{CREW_DEST_PREFIX}/share/jdk15/man/man1" do
system "find -type f -exec ln -s #{CREW_PREFIX}/share/jdk15/man/man1/{} #{CREW_DEST_MAN_PREFIX}/man1/{} \\;"
end
end
end
...@@ -3,40 +3,40 @@ require 'package' ...@@ -3,40 +3,40 @@ require 'package'
class Jdk8 < Package class Jdk8 < Package
description 'The JDK is a development environment for building applications, applets, and components using the Java programming language.' 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' homepage 'https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html'
version '8u271' version '8u281'
compatibility 'all' compatibility 'all'
source_url 'file:///dev/null' source_url 'file:///dev/null'
source_sha256 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855' source_sha256 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
binary_url ({ binary_url ({
aarch64: 'https://dl.bintray.com/chromebrew/chromebrew/jdk8-8u271-chromeos-armv7l.tar.xz', aarch64: 'https://dl.bintray.com/chromebrew/chromebrew/jdk8-8u281-chromeos-armv7l.tar.xz',
armv7l: 'https://dl.bintray.com/chromebrew/chromebrew/jdk8-8u271-chromeos-armv7l.tar.xz', armv7l: 'https://dl.bintray.com/chromebrew/chromebrew/jdk8-8u281-chromeos-armv7l.tar.xz',
i686: 'https://dl.bintray.com/chromebrew/chromebrew/jdk8-8u271-chromeos-i686.tar.xz', i686: 'https://dl.bintray.com/chromebrew/chromebrew/jdk8-8u281-chromeos-i686.tar.xz',
x86_64: 'https://dl.bintray.com/chromebrew/chromebrew/jdk8-8u271-chromeos-x86_64.tar.xz', x86_64: 'https://dl.bintray.com/chromebrew/chromebrew/jdk8-8u281-chromeos-x86_64.tar.xz',
}) })
binary_sha256 ({ binary_sha256 ({
aarch64: '705ab1be8b97058d347ec9b318fb2a61279f24b7419f8741355c0affeedbdd44', aarch64: 'cd7eaa50a24c5fd23a3239955b4e8d307269265f83cac4b6c5d0b8c034db95f0',
armv7l: '705ab1be8b97058d347ec9b318fb2a61279f24b7419f8741355c0affeedbdd44', armv7l: 'cd7eaa50a24c5fd23a3239955b4e8d307269265f83cac4b6c5d0b8c034db95f0',
i686: '808513e7e6edfd62846707f707a9cc958f19604fcae83ceaa9751ecdc9465534', i686: '1875067e9c3d376a7823260508cf9ec9f0413a0328fc53d045389f5f064adc9f',
x86_64: '881a2ad3bd6855cb03f410e9d73674d9ae876de9d223702ee0634cda6f99cf5b', x86_64: '22a574bf80181b74b09256bd4832db6e7bb4bab688ab139e27ad90237a58322e',
}) })
case ARGV[0] def self.preflight
when 'install', 'reinstall'
abort "JDK11 installed.".lightgreen if Dir.exists? "#{CREW_PREFIX}/share/jdk11" abort "JDK11 installed.".lightgreen if Dir.exists? "#{CREW_PREFIX}/share/jdk11"
abort "JDK15 installed.".lightgreen if Dir.exists? "#{CREW_PREFIX}/share/jdk15"
end end
def self.install def self.install
case ARCH case ARCH
when 'aarch64', 'armv7l' when 'aarch64', 'armv7l'
jdk_bin = "#{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' jdk_sha256 = 'a176d6f216717ac0eac15efd00d07849d9d2ef53b9d5902929b421aaae22fc43'
when 'i686' when 'i686'
jdk_bin = "#{HOME}/Downloads/jdk-#{version}-linux-i586.tar.gz" jdk_bin = "#{HOME}/Downloads/jdk-#{version}-linux-i586.tar.gz"
jdk_sha256 = '9c2d5b4530e3d013d6a8294b09f348a9d527f47cb0505f19fe9215f4aab72c6d' jdk_sha256 = 'ff2118e4ee8c60dca34b9612199b60c9d6fcb61ea31d02cdbc8f6d34f221dfed'
when 'x86_64' when 'x86_64'
jdk_bin = "#{HOME}/Downloads/jdk-#{version}-linux-x64.tar.gz" jdk_bin = "#{HOME}/Downloads/jdk-#{version}-linux-x64.tar.gz"
jdk_sha256 = 'eba7926a683bb65c6f4e1c502ce624346c42b00fb5531deba296f2560b452c78' jdk_sha256 = '85e8c7da7248c7450fb105567a78841d0973597850776c24a527feb02ef3e586'
end end
unless File.exists? jdk_bin unless File.exists? jdk_bin
puts puts
...@@ -53,7 +53,7 @@ class Jdk8 < Package ...@@ -53,7 +53,7 @@ class Jdk8 < Package
system "tar xvf #{jdk_bin}" system "tar xvf #{jdk_bin}"
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/bin" FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/bin"
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/share/jdk8" FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/share/jdk8"
FileUtils.cd 'jdk1.8.0_271' do FileUtils.cd 'jdk1.8.0_281' do
FileUtils.rm_f 'src.zip' FileUtils.rm_f 'src.zip'
FileUtils.rm_f 'javafx-src.zip' FileUtils.rm_f 'javafx-src.zip'
FileUtils.cp_r Dir.glob('*'), "#{CREW_DEST_PREFIX}/share/jdk8/" FileUtils.cp_r Dir.glob('*'), "#{CREW_DEST_PREFIX}/share/jdk8/"
......
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