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'
|
2014-06-04 00:59:45 +00:00
|
|
|
# The primary download site is (incorrectly) serving the content decompressed
|
|
|
|
# url 'http://www.joedog.org/pub/siege/siege-3.0.5.tar.gz'
|
|
|
|
url 'http://ftp.de.debian.org/debian/pool/main/s/siege/siege_3.0.5.orig.tar.gz'
|
2013-10-28 21:23:57 +00:00
|
|
|
sha256 '283e624fd802775bf6eb8832c4f76dad6692aa1f3efa98db1ae2ddaba651ca99'
|
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
|