2013-10-22 14:35:54 +00:00
|
|
|
class Apib < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "HTTP performance-testing tool"
|
2014-11-08 02:29:11 +00:00
|
|
|
homepage "https://github.com/apigee/apib"
|
|
|
|
url "https://github.com/apigee/apib/archive/APIB_1_0.tar.gz"
|
2015-06-14 07:22:49 +00:00
|
|
|
sha256 "1592e55c01f2f9bc8085b39f09c49cd7b786b6fb6d02441ca665eef262e7b87e"
|
2014-11-08 02:29:11 +00:00
|
|
|
revision 1
|
|
|
|
|
2015-06-14 07:22:49 +00:00
|
|
|
head "https://github.com/apigee/apib.git"
|
|
|
|
|
2014-11-08 02:35:52 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2016-09-26 20:50:16 +00:00
|
|
|
sha256 "f0443f15ef97284cefe199c11f7cbb14d6b41e48c5d13d6a372e9d47c1410573" => :sierra
|
2016-02-23 11:58:00 +00:00
|
|
|
sha256 "cc30447ff51239eb2334d85b2f3faf0842b21ff882d8a4edb2e99155cb1dab76" => :el_capitan
|
2015-11-19 15:45:31 +00:00
|
|
|
sha256 "9cd200dbdb251c5d50e7fa2307a6252aa295a4a7ac0e594d0774ad1d2631215c" => :yosemite
|
|
|
|
sha256 "b14202356551d0b33446c99d38c4ed0f1d4893aa8e203fd04b6923db18ff40c1" => :mavericks
|
|
|
|
sha256 "c538b9389b1849704720383f03fb2fe4eaf145ecd01d7dca5fd08d95e0e961ba" => :mountain_lion
|
2014-11-08 02:35:52 +00:00
|
|
|
end
|
|
|
|
|
2017-01-01 18:18:30 +00:00
|
|
|
depends_on "apr"
|
2014-11-08 02:29:11 +00:00
|
|
|
depends_on "openssl"
|
2013-10-22 14:35:54 +00:00
|
|
|
|
|
|
|
def install
|
2015-01-06 18:54:29 +00:00
|
|
|
# Upstream hardcodes finding apr in /usr/include. When CLT is not present
|
|
|
|
# we need to fix this so our apr requirement works.
|
|
|
|
# https://github.com/apigee/apib/issues/11
|
|
|
|
unless MacOS::CLT.installed?
|
|
|
|
inreplace "configure" do |s|
|
2016-07-09 16:36:59 +00:00
|
|
|
s.gsub! "/usr/include/apr-1.0", "#{Formula["apr"].opt_libexec}/include/apr-1"
|
|
|
|
s.gsub! "/usr/include/apr-1", "#{Formula["apr"].opt_libexec}/include/apr-1"
|
2015-01-06 18:54:29 +00:00
|
|
|
end
|
2016-07-09 16:36:59 +00:00
|
|
|
ENV.append "LDFLAGS", "-L#{Formula["apr-util"].opt_libexec}/lib"
|
|
|
|
ENV.append "LDFLAGS", "-L#{Formula["apr"].opt_libexec}/lib"
|
|
|
|
ENV.append "CFLAGS", "-I#{Formula["apr"].opt_libexec}/include/apr-1"
|
|
|
|
ENV.append "CFLAGS", "-I#{Formula["apr-util"].opt_libexec}/include/apr-1"
|
2015-01-06 18:54:29 +00:00
|
|
|
end
|
|
|
|
|
2013-10-22 14:35:54 +00:00
|
|
|
system "./configure", "--prefix=#{prefix}"
|
|
|
|
system "make"
|
2014-11-08 02:29:11 +00:00
|
|
|
bin.install "apib", "apibmon"
|
2013-10-22 14:35:54 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
2014-11-08 02:29:11 +00:00
|
|
|
system "#{bin}/apib", "-c 1", "-d 1", "https://www.google.com"
|
2013-10-22 14:35:54 +00:00
|
|
|
end
|
|
|
|
end
|