cask "semeru-jdk-open@21" do arch arm: "aarch64", intel: "x64" version "21.0.5+11,openj9-0.48.0" sha256 arm: "0cc90db618cf8cabe2540a20890f5122e0b82ba8ba9b9d63ff4e44f086877ddf", intel: "749a6d06c760100a51da4f63e9501205dc904ba1b01341071c67f4853c8cdcea" url "https://github.com/ibmruntimes/semeru#{version.major}-binaries/releases/download/jdk-#{version.csv.first}_#{version.csv.second}/ibm-semeru-open-jdk_#{arch}_mac_#{version.csv.first.tr("+", "_")}_#{version.csv.second}.pkg", verified: "github.com/ibmruntimes/semeru#{version.major}-binaries/" name "IBM Semeru Runtime (JDK 21) Open Edition" desc "Production-ready JDK with the OpenJDK class libraries and the Eclipse OpenJ9 JVM" homepage "https://developer.ibm.com/languages/java/semeru-runtimes" livecheck do url :url regex(/^jdk[._-](\d+(?:[.+]\d+)*)[._-](.+?)$/i) strategy :github_latest do |json, regex| json["tag_name"]&.scan(regex)&.map { |match| "#{match[0]},#{match[1]}" } end end pkg "ibm-semeru-open-jdk_#{arch}_mac_#{version.csv.first.tr("+", "_")}_#{version.csv.second}.pkg" uninstall pkgutil: "net.ibm-semeru-open.#{version.major}.jdk" # No zap stanza required end