2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-10-03 17:40:13 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Siege < Formula
|
2009-10-03 17:40:13 +00:00
|
|
|
homepage 'http://www.joedog.org/index/siege-home'
|
2012-06-11 09:12:02 +00:00
|
|
|
url "http://www.joedog.org/pub/siege/siege-2.72.tar.gz"
|
|
|
|
sha1 '286e7c1b30a38d3868b743eedd87058a6ad658a2'
|
2009-10-04 19:29:54 +00:00
|
|
|
|
2009-10-03 17:40:13 +00:00
|
|
|
def install
|
2011-04-04 23:56:47 +00:00
|
|
|
# To avoid unnecessary warning due to hardcoded path, create the folder first
|
2010-12-06 20:53:31 +00:00
|
|
|
(prefix+'etc').mkdir
|
2012-06-11 09:12:02 +00:00
|
|
|
system "./configure", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--mandir=#{man}",
|
|
|
|
"--localstatedir=#{var}",
|
2012-06-11 14:13:14 +00:00
|
|
|
"--with-ssl"
|
2009-10-03 17:40:13 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
|
2011-04-04 23:56:47 +00:00
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
Mac OS X has only 16K ports available that won't be released until socket
|
|
|
|
TIME_WAIT is passed. The default timeout for TIME_WAIT is 15 seconds.
|
|
|
|
Consider reducing in case of available port bottleneck.
|
2009-10-03 17:40:13 +00:00
|
|
|
|
2011-04-04 23:56:47 +00:00
|
|
|
You can check whether this is a problem with netstat:
|
2009-10-03 17:40:13 +00:00
|
|
|
|
2011-04-04 23:56:47 +00:00
|
|
|
# sysctl net.inet.tcp.msl
|
|
|
|
net.inet.tcp.msl: 15000
|
|
|
|
|
|
|
|
# sudo sysctl -w net.inet.tcp.msl=1000
|
|
|
|
net.inet.tcp.msl: 15000 -> 1000
|
|
|
|
|
|
|
|
Run siege.config to create the ~/.siegerc config file.
|
2009-10-03 17:40:13 +00:00
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|