aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/http_load.rb
diff options
context:
space:
mode:
authorBaptiste Fontaine2015-03-10 00:34:40 +0100
committerBrett Koonce2015-03-10 00:16:37 -0700
commita22cc27745cfc6207f4d3e45290c3499de03baf0 (patch)
tree397f7ed1134829f2ede443208374af4d3d30e7e1 /Library/Formula/http_load.rb
parent57c96668cfc8bae48feb9c98e2f76e4a441a4b6d (diff)
downloadhomebrew-a22cc27745cfc6207f4d3e45290c3499de03baf0.tar.bz2
http_load 20140814
Closes #37544. Signed-off-by: Brett Koonce <koonce@gmail.com>
Diffstat (limited to 'Library/Formula/http_load.rb')
-rw-r--r--Library/Formula/http_load.rb27
1 files changed, 19 insertions, 8 deletions
diff --git a/Library/Formula/http_load.rb b/Library/Formula/http_load.rb
index 2dd1e2dc6..c3f7db2df 100644
--- a/Library/Formula/http_load.rb
+++ b/Library/Formula/http_load.rb
@@ -1,22 +1,33 @@
-require 'formula'
-
class HttpLoad < Formula
- homepage 'http://www.acme.com/software/http_load/'
- url 'http://www.acme.com/software/http_load/http_load-12mar2006.tar.gz'
- version '20060312'
- sha1 'a989253cf32f9ef038dfaa2c254773ea9912137f'
+ 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
def install
bin.mkpath
man1.mkpath
+
args = %W[
BINDIR=#{bin}
LIBDIR=#{lib}
MANDIR=#{man1}
CC=#{ENV.cc}
- CFLAGS=#{ENV.cflags}
]
- system "make", *args
+
+ if build.with? "openssl"
+ inreplace "Makefile", "#SSL_", "SSL_"
+ args << "SSL_TREE=#{Formula["openssl"].prefix}"
+ end
+
system "make", "install", *args
end
+
+ test do
+ (testpath/"urls").write "http://brew.sh"
+ system "#{bin}/http_load", "-rate", "1", "-fetches", "1", "urls"
+ end
end