58 lines
2.1 KiB
Ruby
58 lines
2.1 KiB
Ruby
class Innotop < Formula
|
|
desc "Top clone for MySQL"
|
|
homepage "https://github.com/innotop/innotop/"
|
|
url "https://github.com/innotop/innotop/archive/v1.12.0.tar.gz"
|
|
sha256 "f56d51b2c33a9c03f1b9d4fc5f7480f1c2104ef1e8f04def84a16f35d0bc42f6"
|
|
revision 1
|
|
head "https://github.com/innotop/innotop.git"
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "2f44801e8c3636e255a77e70e467d5033db045dd271d231b33bcba132318c204" => :catalina
|
|
sha256 "f06efef58e029201c6200a3fdb747a1289bd8ca84e7fe59f1ded94decc65df76" => :mojave
|
|
sha256 "dd3f3bd29b7e3c900342c933bb8e410cfde233fead139aa45523a865e9fd0977" => :high_sierra
|
|
sha256 "ac47e8dc4522263549d2ce3aa041b0bffea7bebe7ea836f0dd88449e332330a2" => :sierra
|
|
end
|
|
|
|
depends_on "mysql-client"
|
|
depends_on "openssl@1.1"
|
|
|
|
resource "DBI" do
|
|
url "https://cpan.metacpan.org/authors/id/T/TI/TIMB/DBI-1.636.tar.gz"
|
|
sha256 "8f7ddce97c04b4b7a000e65e5d05f679c964d62c8b02c94c1a7d815bb2dd676c"
|
|
end
|
|
|
|
resource "DBD::mysql" do
|
|
url "https://cpan.metacpan.org/authors/id/C/CA/CAPTTOFU/DBD-mysql-4.046.tar.gz"
|
|
sha256 "6165652ec959d05b97f5413fa3dff014b78a44cf6de21ae87283b28378daf1f7"
|
|
end
|
|
|
|
resource "TermReadKey" do
|
|
url "https://cpan.metacpan.org/authors/id/J/JS/JSTOWE/TermReadKey-2.37.tar.gz"
|
|
sha256 "4a9383cf2e0e0194668fe2bd546e894ffad41d556b41d2f2f577c8db682db241"
|
|
end
|
|
|
|
def install
|
|
ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5"
|
|
resources.each do |r|
|
|
r.stage do
|
|
system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}"
|
|
system "make", "install"
|
|
end
|
|
end
|
|
|
|
# Disable dynamic selection of perl which may cause segfault when an
|
|
# incompatible perl is picked up.
|
|
inreplace "innotop", "#!/usr/bin/env perl", "#!/usr/bin/perl"
|
|
|
|
system "perl", "Makefile.PL", "INSTALL_BASE=#{prefix}"
|
|
system "make", "install"
|
|
share.install prefix/"man"
|
|
bin.env_script_all_files(libexec/"bin", :PERL5LIB => ENV["PERL5LIB"])
|
|
end
|
|
|
|
test do
|
|
# Calling commands throws up interactive GUI, which is a pain.
|
|
assert_match version.to_s, shell_output("#{bin}/innotop --version")
|
|
end
|
|
end
|