# Modified for Goblin Skiff integration on 2026-09-19.
cask "goblin-modem" do
  version "0.1.0.20260919.1"
  sha256 "b3989f26135091eb45a7a6fd336d480107e06089202a35a94f072e479ce61772"

  url "https://brew.goblinreactor.com/releases/goblin-modem-#{version}/goblin-modem-#{version}-arm64.pkg"
  name "Goblin Modem"
  desc "Modem and goTenna radio controls, mesh discovery, SOCKS5 and radio Skiff"
  homepage "https://brew.goblinreactor.com/goblin-modem.html"

  depends_on arch: :arm64
  depends_on macos: :tahoe
  depends_on formula: "goblinreactor/tap/goblin-skiff"
  depends_on formula: "python@3.14"

  pkg "goblin-modem-#{version}-arm64.pkg"

  uninstall script: {
              executable: "/Applications/GoblinModem.app/Contents/Resources/Installer/Scripts/uninstall.sh",
              sudo: true,
            },
            pkgutil: "com.goblin.modem",
            delete: "/Applications/GoblinModem.app"

  caveats <<~EOS
    Open /Applications/GoblinModem.app and choose Radios & addresses.
    Save a shared network key and connect a radio on each computer.
    Internet sharing starts off; enable it only on an Internet gateway.
    The installer installs the privileged helper for radio IP and modem control.
    Profiles and keys are retained when this cask is removed.
    This release is ad-hoc signed and is not Apple-notarized.
    Setup and source: https://brew.goblinreactor.com/goblin-modem.html
  EOS
end
