class Zzz < Formula
  desc "Command-line tool to put Macs to sleep"
  homepage "https://github.com/Orc/Zzz"
  url "https://github.com/Orc/Zzz/archive/v1.tar.gz"
  sha256 "8c8958b65a74ab1081ce1a950af6d360166828bdb383d71cc8fe37ddb1702576"
  head "https://github.com/Orc/Zzz.git"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_big_sur: "e08914c722e58a5f5a43c70b395a198faf42e08bc31476fcf226ee77bd42195f"
    sha256 cellar: :any_skip_relocation, big_sur:       "3609040838445e383713a328d0838510d77c3d222f8ecd6892e0e99455668ab1"
    sha256 cellar: :any_skip_relocation, catalina:      "10b1c9f9822b1cbadaa5774d0ee28c1016fa4477cbe3442475ad9113f0b98dd4"
    sha256 cellar: :any_skip_relocation, mojave:        "46716ef74ec052c11d497b5192b9829d1341ebbce783c04be344a85bb9dd5a96"
  end

  depends_on :macos

  # No test is possible: this has no --help or --version, it just
  # sleeps the Mac instantly.
  def install
    system "make", "install", "PREFIX=#{prefix}"
  end

  test do
    assert_predicate bin/"Zzz", :exist?
  end
end
