2010-08-09 09:18:48 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2012-01-22 21:42:17 +00:00
|
|
|
def build_bindings?
|
|
|
|
ARGV.include? '--python'
|
|
|
|
end
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Ldns < Formula
|
2010-08-09 09:18:48 +00:00
|
|
|
homepage 'http://nlnetlabs.nl/projects/ldns/'
|
2012-01-22 21:42:17 +00:00
|
|
|
url 'http://nlnetlabs.nl/downloads/ldns/ldns-1.6.12.tar.gz'
|
2012-01-11 22:44:33 +00:00
|
|
|
sha1 '1d61df0f666908551d5a62768f77d63e727810aa'
|
2010-08-09 09:18:48 +00:00
|
|
|
|
2012-01-22 21:42:17 +00:00
|
|
|
depends_on 'swig' if build_bindings?
|
|
|
|
|
|
|
|
def options
|
|
|
|
[["--python", "Build Python pydns bindings"]]
|
|
|
|
end
|
|
|
|
|
2010-08-09 09:18:48 +00:00
|
|
|
def install
|
2012-01-22 21:42:17 +00:00
|
|
|
args = ["--prefix=#{prefix}", "--disable-gost", "--with-drill", "--with-examples"]
|
|
|
|
args << "--with-pyldns" if build_bindings?
|
|
|
|
ENV.append "LDFLAGS", "-L#{HOMEBREW_PREFIX}/lib"
|
|
|
|
system "./configure", *args
|
|
|
|
system "make"
|
|
|
|
system "make install"
|
|
|
|
system "make install-pyldns" if build_bindings?
|
2010-08-09 09:18:48 +00:00
|
|
|
end
|
|
|
|
end
|