homebrew-cask/Casks/inkscape.rb

35 lines
985 B
Ruby

cask "inkscape" do
version "1.0.2"
sha256 "2e8eb5f8aa8a974b4621151e17af8b9106363518a5834c54da6a2649a5191b81"
url "https://media.inkscape.org/dl/resources/file/Inkscape-#{version}.dmg"
name "Inkscape"
desc "Vector graphics editor"
homepage "https://inkscape.org/"
livecheck do
url "https://inkscape.org/release"
strategy :header_match
end
app "Inkscape.app"
# shim script (https://github.com/Homebrew/homebrew-cask/issues/18809)
shimscript = "#{staged_path}/inkscape.wrapper.sh"
binary shimscript, target: "inkscape"
preflight do
IO.write shimscript, <<~EOS
#!/bin/sh
exec '#{staged_path}/Inkscape.app/Contents/MacOS/inkscape' "$@"
EOS
end
zap trash: [
"~/.config/inkscape",
"~/Library/Application Support/Inkscape",
"~/Library/Application Support/org.inkscape.Inkscape",
"~/Library/Preferences/org.inkscape.Inkscape.plist",
"~/Library/Saved Application State/org.inkscape.Inkscape.savedState",
]
end