48 lines
1.6 KiB
Ruby
48 lines
1.6 KiB
Ruby
class Sysdig < Formula
|
|
desc "System-level exploration and troubleshooting tool"
|
|
homepage "https://sysdig.com/"
|
|
url "https://github.com/draios/sysdig/archive/0.27.0.tar.gz"
|
|
sha256 "a67f97b2620e3d9c5d48d07932604c938a5a6d3b625d7a23bfb2eb9802024b52"
|
|
license "Apache-2.0"
|
|
|
|
livecheck do
|
|
url "https://github.com/draios/sysdig/releases/latest"
|
|
regex(%r{href=.*?/tag/v?(\d+(?:\.\d+)+)["' >]}i)
|
|
end
|
|
|
|
bottle do
|
|
sha256 "592586c570869dabe8da4ed4d81c280a1db9c0e9dd4ca813af30e4a313c611ea" => :catalina
|
|
sha256 "95c565cd53a705937b4036c794b439c3707177fc02527ad3f1ad1439d838df85" => :mojave
|
|
sha256 "88f2a23fa721a6bf6c13b6d22525a2deea83c4efb1c08a3abf72af3e92b8f290" => :high_sierra
|
|
end
|
|
|
|
depends_on "cmake" => :build
|
|
depends_on "jsoncpp"
|
|
depends_on "luajit"
|
|
depends_on "tbb"
|
|
|
|
# More info on https://gist.github.com/juniorz/9986999
|
|
resource "sample_file" do
|
|
url "https://gist.githubusercontent.com/juniorz/9986999/raw/a3556d7e93fa890a157a33f4233efaf8f5e01a6f/sample.scap"
|
|
sha256 "efe287e651a3deea5e87418d39e0fe1e9dc55c6886af4e952468cd64182ee7ef"
|
|
end
|
|
|
|
def install
|
|
mkdir "build" do
|
|
system "cmake", "..", "-DSYSDIG_VERSION=#{version}",
|
|
"-DUSE_BUNDLED_DEPS=OFF",
|
|
"-DCREATE_TEST_TARGETS=OFF",
|
|
*std_cmake_args
|
|
system "make"
|
|
system "make", "install"
|
|
end
|
|
|
|
(pkgshare/"demos").install resource("sample_file").files("sample.scap")
|
|
end
|
|
|
|
test do
|
|
output = shell_output("#{bin}/sysdig -r #{pkgshare}/demos/sample.scap")
|
|
assert_match "/tmp/sysdig/sample", output
|
|
end
|
|
end
|