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'
|
2013-04-22 02:20:42 +00:00
|
|
|
url "http://www.joedog.org/pub/siege/siege-3.0.0.tar.gz"
|
|
|
|
sha1 'a044679fbe4a58b027a50735f6a4b2c12f6d2f2a'
|
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
|