homebrew-core/Formula/pdnsrec.rb
Viktor Szakats 4efb3a6f19 pdnsrec: https url
Closes Homebrew/homebrew#39046.

Signed-off-by: Brett Koonce <koonce@gmail.com>
2015-04-25 09:34:39 -07:00

51 lines
1.6 KiB
Ruby

require "formula"
class Pdnsrec < Formula
homepage "http://wiki.powerdns.com"
url "https://downloads.powerdns.com/releases/pdns-recursor-3.7.2.tar.bz2"
sha256 "1366bc1bed7c96fbd3926cf7a9e6d365c53b8a99182642debe1b2863dd015a7e"
bottle do
cellar :any
sha256 "4b91cb394be8a7d768a1f1ea6cb3e4bd06fbfa6ea753948ad501eef78160b6e5" => :yosemite
sha256 "629e0bb4b83c912ecdcd4543d248f0682d8c24f3da754b8f45b89547dd289fd9" => :mavericks
sha256 "6ad788ccee069d9917096e800bda57cf8f0dd2577796cc056d9b05d82ae058fc" => :mountain_lion
end
depends_on :macos => :lion
depends_on "boost"
depends_on "lua" => :optional
def install
# Set overrides using environment variables
ENV["DESTDIR"] = "#{prefix}"
ENV["OPTFLAGS"] = "-O0"
ENV.O0
# Include Lua if requested
if build.with? "lua"
ENV["LUA"] = "1"
ENV["LUA_CPPFLAGS_CONFIG"] = "-I#{Formula["lua"].opt_include}"
ENV["LUA_LIBS_CONFIG"] = "-llua"
end
# Adjust hard coded paths in Makefile
inreplace "Makefile.in", "/usr/sbin/", "#{sbin}/"
inreplace "Makefile.in", "/usr/bin/", "#{bin}/"
inreplace "Makefile.in", "/etc/powerdns/", "#{etc}/powerdns/"
inreplace "Makefile.in", "/var/run/", "#{var}/run/"
# Compile
system "./configure"
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