Last active
December 10, 2015 03:38
-
-
Save zeekay/4375402 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class Ab < Formula | |
homepage 'http://httpd.apache.org/docs/trunk/programs/ab.html' | |
url 'http://www.apache.org/dist/httpd/httpd-2.4.3.tar.bz2' | |
sha1 '0ef1281bb758add937efe61c345287be2f27f662' | |
def install | |
# Mountain Lion requires this to be set, as otherwise libtool complains | |
# about being "unable to infer tagged configuration" | |
ENV['LTFLAGS'] = '--tag CC' | |
system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking" | |
cd 'support' do | |
system 'make', 'ab' | |
# We install into the "bin" directory, although "ab" would normally be | |
# installed to "/usr/sbin/ab" | |
bin.install('ab') | |
end | |
man1.install('docs/man/ab.1') | |
end | |
def test | |
print `"#{bin}/ab" -k -n 10 -c 10 http://www.apple.com/` | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment