2012-05-29 20:19:18 +00:00
|
|
|
class HttpLoad < Formula
|
2015-03-09 23:34:40 +00:00
|
|
|
homepage "http://www.acme.com/software/http_load/"
|
|
|
|
url "http://www.acme.com/software/http_load/http_load-14aug2014.tar.gz"
|
|
|
|
version "20140814"
|
|
|
|
sha256 "538a19cf1a45b1c0ca9be2a5f421b0a3f8d1989c24657d08bc139144b6e14622"
|
|
|
|
|
|
|
|
# HTTPS support
|
|
|
|
depends_on "openssl" => :optional
|
2012-05-29 20:19:18 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
bin.mkpath
|
|
|
|
man1.mkpath
|
2015-03-09 23:34:40 +00:00
|
|
|
|
2012-05-29 20:19:18 +00:00
|
|
|
args = %W[
|
|
|
|
BINDIR=#{bin}
|
|
|
|
LIBDIR=#{lib}
|
|
|
|
MANDIR=#{man1}
|
|
|
|
CC=#{ENV.cc}
|
|
|
|
]
|
2015-03-09 23:34:40 +00:00
|
|
|
|
|
|
|
if build.with? "openssl"
|
|
|
|
inreplace "Makefile", "#SSL_", "SSL_"
|
|
|
|
args << "SSL_TREE=#{Formula["openssl"].prefix}"
|
|
|
|
end
|
|
|
|
|
2012-05-29 20:19:18 +00:00
|
|
|
system "make", "install", *args
|
|
|
|
end
|
2015-03-09 23:34:40 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"urls").write "http://brew.sh"
|
|
|
|
system "#{bin}/http_load", "-rate", "1", "-fetches", "1", "urls"
|
|
|
|
end
|
2012-05-29 20:19:18 +00:00
|
|
|
end
|