-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve homebrew support #4
Comments
Casks seem to be for the installation of large As for the question about merging into the main branch..... I'm open to this concept but I do like the way that with this current setup we can simply manage our own repo and cut releases immediately without having to get someone to manually merge our pull request into the main repo. I'd be happy to add a pull request and see how it goes down in the main repo though. I do personally feel that we should have JCK compliance on macOS before adding this to the main repo as well. |
Given that Oracle Java is a cask my assumption is that OpenJDK should also be a cask. This will probably be discussed after creating a Homebrew Pull Request. Maintaining also an own Tap to update immediately w/o waiting for the pull request to be merged, might be another option. Anyway, waiting for JCK compliance and offering a Tap in the mean time might be the safest option. |
I agree with this, the cask docs say:
Basically I've always found it odd that Oracle Being a cask instead of a normal brew package also has the disadvantage that there is no built-in way to upgrade your apps, for brew you have |
closing as using brew appears to be okay for now |
While this is a little bit of issue necromancy, after checking out this Tap I think the best course would be to implement as Casks.
I would be happy to make a PR converting these to Casks. Maybe it would be better just to contribute these to https://github.com/Homebrew/homebrew-cask-versions. |
@moshen I've just started hacking together a basic cask file. I'll update the issue with progress |
@gdams 👍 nice, seems like you basically want something like the openjdk one: https://github.com/Homebrew/homebrew-cask/blob/3ca5556706a8e08fca9ea35bc82e9645494ebb05/Casks/java.rb |
nearly finished now, just getting the plist stuff done :) |
Okay so this cask file seems to be passing all of the tests and installing Java in the correct location. I'm pretty happy with this other than the fact that I curl the <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>libjli.dylib</string>
<key>CFBundleGetInfoString</key>
<string>AdoptOpenJDK 1.8.0_172</string>
<key>CFBundleIdentifier</key>
<string>net.java.openjdk.1.8.0.jdk</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>7.0</string>
<key>CFBundleName</key>
<string>AdoptOpenJDK 1.8.0</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>10.0.2</string>
<key>JavaVM</key>
<dict>
<key>JVMCapabilities</key>
<array>
<string>CommandLine</string>
</array>
<key>JVMMinimumFrameworkVersion</key>
<string>13.2.9</string>
<key>JVMMinimumSystemVersion</key>
<string>10.6.0</string>
<key>JVMPlatformVersion</key>
<string>1.8</string>
<key>JVMVendor</key>
<string>Oracle Corporation</string>
<key>JVMVersion</key>
<string>1.8.0_172</string>
</dict>
</dict>
</plist> cask 'adoptopenjdk8' do
version '8u172-b11,1.8.0_172'
sha256 'c271c5aeebfec5cd6f41c24092472a66fc55f893e3118e63f4c1ab1cb4446157'
# github.com was verified as official when first introduced to the cask
url "https://github.com/AdoptOpenJDK/openjdk8-releases/releases/download/jdk8u172-b11/OpenJDK8_x64_Mac_jdk#{version.before_comma}.tar.gz"
appcast 'https://github.com/adoptopenjdk/openjdk8-releases/releases.atom'
name 'AdoptOpenJDK8'
homepage 'https://adoptopenjdk.net/'
postflight do
system_command '/bin/mv',
args: ['-f', '--', "/usr/local/Caskroom/adoptopenjdk8/#{version}/jdk#{version.before_comma}",
'/usr/local/Caskroom/adoptopenjdk8/']
system_command '/bin/rm',
args: ['-rf', '--', "/usr/local/Caskroom/adoptopenjdk8/#{version}"]
system_command '/bin/mkdir',
args: ['-p', '--', "/Library/Java/JavaVirtualMachines/adoptopenjdk-#{version.after_comma}.jdk/Contents/MacOS"],
sudo: true
system_command '/bin/ln',
args: ['-s', '--', "/usr/local/Caskroom/adoptopenjdk8/jdk#{version.before_comma}",
"/Library/Java/JavaVirtualMachines/adoptopenjdk-#{version.after_comma}.jdk/Contents/Home"],
sudo: true
system_command '/bin/ln',
args: ['-s', '--', "/usr/local/Caskroom/adoptopenjdk8/jdk#{version.before_comma}/jre/lib/jli/libjli.dylib",
"/Library/Java/JavaVirtualMachines/adoptopenjdk-#{version.after_comma}.jdk/Contents/MacOS/libjli.dylib"],
sudo: true
system_command '/usr/bin/curl',
args: ['--output', "/Library/Java/JavaVirtualMachines/adoptopenjdk-#{version.after_comma}.jdk/Contents/Info.plist",
'https://gist.githubusercontent.com/chaines27/32810cdfddefeeb5965e2969eb709fb5/raw/5ae95952b91f879e849c2be8a3a90be2d54ea1ec/homebrew-openjdk-1.8-info.plist'],
sudo: true
system_command '/usr/libexec/PlistBuddy',
args: ['-c', "Set :CFBundleGetInfoString AdoptOpenJDK #{version.after_comma}", "/Library/Java/JavaVirtualMachines/adoptopenjdk-#{version.after_comma}.jdk/Contents/Info.plist"],
sudo: true
end
uninstall_postflight do
system_command '/bin/rm',
args: ['-rf', '--', "/usr/local/Caskroom/adoptopenjdk8/jdk#{version.before_comma}"]
system_command '/bin/rm',
args: ['-rf', '--', "/Library/Java/JavaVirtualMachines/adoptopenjdk-#{version.after_comma}.jdk"],
sudo: true
end
end |
hello i'd really appreciate |
here is the first PR for jdk11 Homebrew/homebrew-cask#52874 |
Workflow:
brew cask install openjdK
Expected:
Works analog to
brew cask install java
Instead:
No official cask.
Further Information:
cask
and not included into the main branchThe text was updated successfully, but these errors were encountered: