diff options
| author | Justin Clift | 2013-06-07 10:58:57 +0100 |
|---|---|---|
| committer | Adam Vandenberg | 2013-06-18 14:38:46 -0700 |
| commit | be5fcaa3166f78d24c3410ca505187670ac65f73 (patch) | |
| tree | 5b8d52902831aed8e74d5c6c338f36c73a937b1a /Library/Formula | |
| parent | 4a091a3a6a66eb951db82f0218f5073ee2b6e042 (diff) | |
| download | homebrew-be5fcaa3166f78d24c3410ca505187670ac65f73.tar.bz2 | |
PowerDNS Recursive Server 3.5.2
Closes #19589.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/pdnsrec.rb | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/Library/Formula/pdnsrec.rb b/Library/Formula/pdnsrec.rb new file mode 100644 index 000000000..3d7872b63 --- /dev/null +++ b/Library/Formula/pdnsrec.rb @@ -0,0 +1,46 @@ +require 'formula' + +class Pdnsrec < Formula + homepage 'http://wiki.powerdns.com' + url 'http://downloads.powerdns.com/releases/pdns-recursor-3.5.2.tar.bz2' + sha256 'ffe3158ee5b3f62e927198fd44e839a01d3241a41a4e61afdca6709113c276bd' + + depends_on :macos => :lion + depends_on 'boost' + depends_on 'lua' => :optional + + # Disable superenv, else the compiled binary crashes at startup + env :std + + def install + # Set overrides using environment variables + ENV['DESTDIR'] = "#{prefix}" + ENV['OPTFLAGS'] = "-O0" + + # Ensure only -O0 is passed to compiler + ENV.remove_from_cflags /-Os/ + + # Include Lua if requested + if build.include? 'with-lua' + ENV['LUA'] = "1" + ENV['LUA_CPPFLAGS_CONFIG'] = "-I#{Formula.factory('lua').opt_prefix}/include" + ENV['LUA_LIBS_CONFIG'] = "-llua" + end + + # Add Homebrew prefix to config file location + inreplace "config.h", "/etc/", "#{etc}/" + + # Compile + system "make basic_checks" + system "make" + + # Do the install manually + bin.install "rec_control" + sbin.install "pdns_recursor" + man1.install "pdns_recursor.1", "rec_control.1" + + # Generate a default configuration file + (prefix/'etc/powerdns').mkpath + system "#{sbin}/pdns_recursor --config > #{prefix}/etc/powerdns/recursor.conf" + end +end |
