51 lines
1.9 KiB
Ruby
51 lines
1.9 KiB
Ruby
cask "librewolf" do
|
|
arch arm: "arm64", intel: "x86_64"
|
|
os macos: "macos-#{arch}-package.dmg", linux: "linux-#{arch}-appimage.AppImage"
|
|
|
|
version "157.0.1,1"
|
|
sha256 arm: "d1518f48d7b54be8a1e6bd04d85a8dd6a2153e3b16d14344495a3ddda65b6e8d",
|
|
intel: "6c2cea98958f51f8c572a2d9a1126b8cf6c0a07f8db03ef1f01fe007d115ea2c",
|
|
arm64_linux: "f036f3db3199415bf1c1293cb3c49ec904148cd9973a832e2a28d528fdef2f27",
|
|
x86_64_linux: "6e8f9c4db2c792c41afc911f70591975b93d01c9845a6a4e4c35f8efd50a261e"
|
|
|
|
on_macos do
|
|
app "LibreWolf.app"
|
|
command_wrapper "librewolf",
|
|
executable: "#{appdir}/LibreWolf.app/Contents/MacOS/librewolf"
|
|
|
|
postflight do
|
|
system_command "/usr/bin/xattr",
|
|
args: ["-dr", "com.apple.quarantine", "#{appdir}/LibreWolf.app"]
|
|
end
|
|
|
|
zap trash: [
|
|
"~/.librewolf",
|
|
"~/Library/Application Support/LibreWolf",
|
|
"~/Library/Caches/LibreWolf Community",
|
|
"~/Library/Caches/LibreWolf",
|
|
"~/Library/Preferences/io.gitlab.librewolf-community.librewolf.plist",
|
|
"~/Library/Saved Application State/io.gitlab.librewolf-community.librewolf.savedState",
|
|
]
|
|
end
|
|
on_linux do
|
|
app_image "librewolf-#{version.tr(",", "-")}-linux-#{arch}-appimage.AppImage",
|
|
target: "LibreWolf.AppImage"
|
|
end
|
|
|
|
url "https://codeberg.org/api/packages/librewolf/generic/librewolf/#{version.tr(",", "-")}/librewolf-#{version.tr(",", "-")}-#{os}"
|
|
name "LibreWolf"
|
|
desc "Web browser"
|
|
homepage "https://librewolf.net/"
|
|
|
|
# There can be a notable gap between when a version is tagged and a
|
|
# corresponding release is created, so we check the "latest" release instead
|
|
# of the Git tags.
|
|
livecheck do
|
|
url "https://codeberg.org/api/v1/repos/librewolf/bsys6/releases/latest"
|
|
regex(/^v?(\d+(?:[.-]\d+)+)$/i)
|
|
strategy :json do |json, regex|
|
|
json["tag_name"]&.[](regex, 1)&.tr("-", ",")
|
|
end
|
|
end
|
|
end
|