2012-08-02 18:24:58 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Nsd < Formula
|
|
|
|
homepage 'http://www.nlnetlabs.nl/projects/nsd/'
|
2014-01-29 14:56:56 +00:00
|
|
|
url 'http://www.nlnetlabs.nl/downloads/nsd/nsd-4.0.1.tar.gz'
|
|
|
|
sha1 '788cc290ade7fc6a61fe4391837d3abddbda4df0'
|
|
|
|
|
|
|
|
option 'with-root-server', 'Allow NSD to run as a root name server'
|
|
|
|
option 'with-bind8-stats', 'Enable BIND8-like NSTATS & XSTATS'
|
|
|
|
option 'with-ratelimit', 'Enable rate limiting'
|
2013-12-06 14:33:56 +00:00
|
|
|
|
|
|
|
depends_on 'libevent'
|
2012-08-02 18:24:58 +00:00
|
|
|
|
|
|
|
def install
|
2014-01-29 14:56:56 +00:00
|
|
|
args = %W[
|
|
|
|
--prefix=#{prefix}
|
|
|
|
--with-libevent=#{Formula.factory('libevent').opt_prefix}
|
|
|
|
]
|
|
|
|
|
|
|
|
args << '--enable-root-server' if build.with? 'root-server'
|
|
|
|
args << '--enable-bind8-stats' if build.with? 'bind8-stats'
|
|
|
|
args << '--enable-ratelimit' if build.with? 'ratelimit'
|
|
|
|
|
|
|
|
system "./configure", *args
|
2012-08-02 18:24:58 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|