aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/percona-toolkit.rb
blob: 85547fddf70a60473e2796686f25a92965a6bccc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
require 'formula'

class PerconaToolkit < Formula
  homepage 'http://www.percona.com/software/percona-toolkit/'
  url 'http://www.percona.com/redir/downloads/percona-toolkit/2.0.2/percona-toolkit-2.0.2.tar.gz'
  md5 '74f55df529b2527853d4d907f0175c0d'

  depends_on 'Time::HiRes' => :perl
  depends_on 'DBD::mysql' => :perl

  def install
    system "perl Makefile.PL PREFIX=#{prefix}"
    system "make"
    system "make test"
    system "make install"
  end

  def test
    system "pt-archiver"
    system "pt-config-diff"
    system "pt-deadlock-logger"
    system "pt-duplicate-key-checker"
    system "pt-find"
    system "pt-fk-error-logger"
    system "pt-heartbeat"
    system "pt-kill"
    system "pt-log-player"
    system "pt-pmp"
    system "pt-slave-delay"
    system "pt-slave-find"
    system "pt-slave-restart"
    system "pt-summary"
    system "pt-table-checksum"
    system "pt-table-sync"
    system "pt-upgrade"
    system "pt-variable-advisor"
  end
end