aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/percona-toolkit.rb72
1 files changed, 27 insertions, 45 deletions
diff --git a/Library/Formula/percona-toolkit.rb b/Library/Formula/percona-toolkit.rb
index 0057f7eb0..971d3a20f 100644
--- a/Library/Formula/percona-toolkit.rb
+++ b/Library/Formula/percona-toolkit.rb
@@ -1,53 +1,35 @@
-require 'formula'
+require "formula"
class PerconaToolkit < Formula
- homepage 'http://www.percona.com/software/percona-toolkit/'
- url 'http://www.percona.com/redir/downloads/percona-toolkit/2.2.7/percona-toolkit-2.2.7.tar.gz'
- sha1 '63dca7c6721ea22b2487980be84450b4d8c808a1'
+ homepage "http://www.percona.com/software/percona-toolkit/"
+ url "http://www.percona.com/redir/downloads/percona-toolkit/2.2.7/percona-toolkit-2.2.7.tar.gz"
+ sha1 "63dca7c6721ea22b2487980be84450b4d8c808a1"
- depends_on 'Time::HiRes' => :perl
- depends_on 'DBD::mysql' => :perl
+ resource "DBD::mysql" do
+ url "http://search.cpan.org/CPAN/authors/id/C/CA/CAPTTOFU/DBD-mysql-4.027.tar.gz"
+ sha1 "3bf1edd6f0b4f6144b2aaa715c80df3fb1cd2119"
+ end
- def install
- system "perl", "Makefile.PL", "PREFIX=#{prefix}"
- system "make"
- system "make test"
- system "make install"
+ resource "JSON" do
+ url "http://search.cpan.org/CPAN/authors/id/M/MA/MAKAMAKA/JSON-2.90.tar.gz"
+ sha1 "8f0ffe72cbe9e6287d7ecafcf19b31cc297364c2"
end
- test do
- system "#{bin}/pt-agent"
- system "#{bin}/pt-align"
- system "#{bin}/pt-archiver"
- system "#{bin}/pt-config-diff"
- system "#{bin}/pt-deadlock-logger"
- system "#{bin}/pt-diskstats"
- system "#{bin}/pt-duplicate-key-checker"
- system "#{bin}/pt-fifo-split"
- system "#{bin}/pt-find"
- system "#{bin}/pt-fingerprint"
- system "#{bin}/pt-fk-error-logger"
- system "#{bin}/pt-heartbeat"
- system "#{bin}/pt-index-usage"
- system "#{bin}/pt-ioprofile"
- system "#{bin}/pt-kill"
- system "#{bin}/pt-mext"
- system "#{bin}/pt-mysql-summary"
- system "#{bin}/pt-online-schema-change"
- system "#{bin}/pt-pmp"
- system "#{bin}/pt-query-digest"
- system "#{bin}/pt-show-grants"
- system "#{bin}/pt-sift"
- system "#{bin}/pt-slave-delay"
- system "#{bin}/pt-slave-find"
- system "#{bin}/pt-slave-restart"
- system "#{bin}/pt-stalk"
- system "#{bin}/pt-summary"
- system "#{bin}/pt-table-checksum"
- system "#{bin}/pt-table-sync"
- system "#{bin}/pt-table-usage"
- system "#{bin}/pt-upgrade"
- system "#{bin}/pt-variable-advisor"
- system "#{bin}/pt-visual-explain"
+ def install
+ ENV.prepend_create_path "PERL5LIB", libexec+"lib/perl5"
+
+ resource("JSON").stage do
+ system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}"
+ system "make", "install"
+ end
+
+ resource("DBD::mysql").stage do
+ system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}"
+ system "make", "install"
+ end
+
+ system "perl", "Makefile.PL", "PREFIX=#{prefix}"
+ system "make", "test", "install"
+ bin.env_script_all_files(libexec+"bin", :PERL5LIB => ENV["PERL5LIB"])
end
end