mirror of
https://github.com/wavetermdev/homebrew-cask.git
synced 2026-08-05 13:43:24 -07:00
Merge pull request #158823 from bevanjkay/bump-ibabel-5.0.3-2023-02
ibabel 5.0.3,2023,02
This commit is contained in:
+23
-5
@@ -1,17 +1,35 @@
|
||||
cask "ibabel" do
|
||||
version "5.0.3,1"
|
||||
sha256 :no_check
|
||||
version "5.0.3,2023,02"
|
||||
sha256 "25e8c5a311e0a45b5e5cb519fe00ab8b6b9084f5045ee18639649295f39cbc19"
|
||||
|
||||
url "https://macinchem.org/ibabel/version#{version.major}/iBabel.zip"
|
||||
url "https://macinchem.org/wp-content/uploads/#{version.csv.second}/#{version.csv.third}/iBabel.zip"
|
||||
name "iBabel"
|
||||
desc "GUI for the cheminformatics toolkit OpenBabel"
|
||||
homepage "https://www.macinchem.org/ibabel/"
|
||||
|
||||
livecheck do
|
||||
url :url
|
||||
strategy :extract_plist
|
||||
url :homepage
|
||||
regex(%r{href=.*?/uploads/(\d+)/(\d+)/iBabel\.zip}i)
|
||||
strategy :page_match do |page, regex|
|
||||
match = page.match(regex)
|
||||
|
||||
cask = CaskLoader.load("ibabel")
|
||||
download_url = "https://macinchem.co.uk/wp-content/uploads/#{match[1]}/#{match[2]}/iBabel.zip"
|
||||
app_version = Homebrew::Livecheck::Strategy::ExtractPlist.find_versions(cask: cask,
|
||||
url: download_url)[:matches].values.max
|
||||
next if app_version.blank?
|
||||
|
||||
"#{app_version.to_s.split(",").first},#{match[1]},#{match[2]}"
|
||||
end
|
||||
end
|
||||
|
||||
depends_on formula: "open-babel"
|
||||
depends_on macos: ">= :monterey"
|
||||
|
||||
app "iBabel.app"
|
||||
|
||||
zap trash: [
|
||||
"~/Library/Caches/com.macinchem.iBabel",
|
||||
"~/Library/WebKit/com.macinchem.iBabel",
|
||||
]
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user