2014-06-25 03:13:19 +00:00
|
|
|
require "formula"
|
2013-09-23 18:09:57 +00:00
|
|
|
|
|
|
|
class Sysbench < Formula
|
2014-06-25 03:13:19 +00:00
|
|
|
homepage "http://sysbench.sourceforge.net/"
|
|
|
|
url "https://downloads.sourceforge.net/project/sysbench/sysbench/0.4.12/sysbench-0.4.12.tar.gz"
|
|
|
|
mirror "http://ftp.de.debian.org/debian/pool/main/s/sysbench/sysbench_0.4.12.orig.tar.gz"
|
|
|
|
sha1 "3f346e8b29b738711546970b027bbb7359d4672a"
|
2013-09-23 18:09:57 +00:00
|
|
|
|
2014-06-25 03:13:19 +00:00
|
|
|
depends_on "autoconf" => :build
|
|
|
|
depends_on "automake" => :build
|
|
|
|
depends_on :mysql => :recommended
|
|
|
|
depends_on :postgresql => :optional
|
2013-09-23 18:09:57 +00:00
|
|
|
|
|
|
|
def install
|
2014-06-25 03:13:19 +00:00
|
|
|
inreplace "configure.ac", "AC_PROG_LIBTOOL", "AC_PROG_RANLIB"
|
2013-09-23 18:09:57 +00:00
|
|
|
system "./autogen.sh"
|
|
|
|
|
|
|
|
args = ["--prefix=#{prefix}"]
|
2014-08-23 13:38:38 +00:00
|
|
|
if build.with? "mysql"
|
|
|
|
args << "--with-mysql"
|
|
|
|
else
|
|
|
|
args << "--without-mysql"
|
|
|
|
end
|
2014-06-25 03:13:19 +00:00
|
|
|
args << "--with-psql" if build.with? "postgresql"
|
2013-09-23 18:09:57 +00:00
|
|
|
|
|
|
|
system "./configure", *args
|
2014-06-25 03:13:19 +00:00
|
|
|
system "make", "install"
|
2013-09-23 18:09:57 +00:00
|
|
|
end
|
|
|
|
end
|