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 "155.0.1,1"
|
|
sha256 arm: "3fec7bbacadf5c00d59a5e3af5bac104f7707476029a1d6c75f146e2295697f7",
|
|
intel: "f9fd0a6530027be0be7fffe597715639cd9624bc5317b7c5f70deb9f6142ca24",
|
|
arm64_linux: "0958cf16b83097b37960901fd9ee019e84e5604a970e42f129ea73945e525e55",
|
|
x86_64_linux: "f30b4eb32ea73e9fed5edc4649e157dad05d20619c14db20b1fce6ce2f4ba31c"
|
|
|
|
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
|