excalidrawz 1.2.5
[Homebrew/homebrew-cask.git] / Casks / s / synology-surveillance-station-client.rb
blob14b8eaa0f3beebf9db2e61f903b3f9413af2f55a
1 cask "synology-surveillance-station-client" do
2   version "2.2.1,2564"
3   sha256 "ca5ed3645a1303230d66cbd0bc160c58af88db346e5266f06da0b2d3444d86e9"
5   url "https://global.download.synology.com/download/Utility/SurveillanceStationClient/#{version.tr(",", "-")}/Mac/Synology%20Surveillance%20Station%20Client-#{version.tr(",", "-")}.dmg"
6   name "Synology Surveillance Station Client"
7   desc "Desktop utility to access Surveillance Station on Synology products"
8   homepage "https://www.synology.com/surveillance/"
10   livecheck do
11     url "https://www.synology.com/api/releaseNote/findChangeLog?identify=SurveillanceStationClient&lang=en-us"
12     strategy :json do |json|
13       json.dig("info", "versions", "", "all_versions")&.map { |item| item["version"]&.tr("-", ",") }
14     end
15   end
17   pkg "Install Synology Surveillance Station Client.pkg"
19   uninstall launchctl: "com.synology.svsclient-SurveillanceStationClient",
20             quit:      "com.synology.svsclient-SurveillanceStationClient",
21             pkgutil:   [
22               "com.synology.svsclient-Live-View",
23               "com.synology.svsclient-Monitor-Center",
24               "com.synology.svsclient-Recording",
25               "com.synology.svsclient-SurveillanceStationClient",
26               "com.synology.svsclient-Timeline",
27             ],
28             delete:    "/Applications/Synology Surveillance Station Client.app"
30   zap trash: [
31     "~/Library/Application Support/SynologySurveillanceStationClient",
32     "~/Library/Preferences/com.synology.Surveillance Station Client.plist",
33     "~/Library/Preferences/com.synology.svsclient-SurveillanceStationClient.plist",
34     "~/Library/Saved Application State/com.synology.svsclient-SurveillanceStationClient.savedState",
35   ]
36 end