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
|
2010-12-06 20:53:31 +00:00
|
|
|
url "ftp://ftp.joedog.org/pub/siege/siege-2.70.tar.gz"
|
2009-10-03 17:40:13 +00:00
|
|
|
homepage 'http://www.joedog.org/index/siege-home'
|
2010-12-06 20:53:31 +00:00
|
|
|
sha1 'ee0a0c3a9e6559cf8cbaf717649f6684b0d9643a'
|
2009-10-04 19:29:54 +00:00
|
|
|
|
2009-10-03 17:40:13 +00:00
|
|
|
def install
|
2010-12-06 20:53:31 +00:00
|
|
|
#to avoid unnecessary warning due to hardcoded path
|
|
|
|
(prefix+'etc').mkdir
|
|
|
|
system "./configure",
|
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--mandir=#{man}",
|
|
|
|
"--localstatedir=#{var}",
|
|
|
|
"--with-ssl"
|
2009-10-03 17:40:13 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
|
|
|
|
def caveats; <<-EOS
|
2010-04-07 05:58:35 +00:00
|
|
|
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. You can check whether tis is a
|
|
|
|
problem with netstat.
|
2009-10-03 17:40:13 +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.
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|