class Libcap < Formula bottle do root_url "https://homebrew.mirror.ygg/bottles" sha256 cellar: :any_skip_relocation, x86_64_linux: "4216b7a75d21bf4e9640630417cda23d055f1aa85298d3b6941f80b12c346cab" end desc "User-space interfaces to POSIX 1003.1e capabilities" homepage "https://sites.google.com/site/fullycapable/" url "https://mirrors.edge.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.78.tar.xz" sha256 "0d621e562fd932ccf67b9660fb018e468a683d7b827541df27813228c996bb11" license all_of: ["BSD-3-Clause", "GPL-2.0-or-later"] compatibility_version 1 livecheck do url "https://mirrors.edge.kernel.org/pub/linux/libs/security/linux-privs/libcap2/" regex(/href=.*?libcap[._-]v?(\d+(?:\.\d+)+)\.t/i) end depends_on :linux def install system "make", "install", "prefix=#{prefix}", "lib=lib", "RAISE_SETFCAP=no" end test do assert_match "usage", shell_output("#{sbin}/getcap 2>&1", 1) end end