homebrew-core/Formula/ircd-hybrid.rb
2014-10-28 08:26:17 +00:00

66 lines
1.8 KiB
Ruby

require "formula"
class IrcdHybrid < Formula
homepage "http://www.ircd-hybrid.org/"
url "https://downloads.sourceforge.net/project/ircd-hybrid/ircd-hybrid/ircd-hybrid-8.2.1/ircd-hybrid-8.2.1.tgz"
sha1 "43e96d1d3e57f8d867348921a5b225011ab988b2"
bottle do
sha1 "1ac5860e94fac63377994eebada838b4975e5cb2" => :yosemite
sha1 "d3150f7395160fc08cd665144288587360d5ee34" => :mavericks
sha1 "cbcbb7266548178d080fb3683e7ba8cd203265fa" => :mountain_lion
end
# ircd-hybrid needs the .la files
skip_clean :la
depends_on "openssl"
def install
ENV.j1 # build system trips over itself
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}",
"--localstatedir=#{var}",
"--sysconfdir=#{etc}",
"--enable-openssl=#{Formula["openssl"].opt_prefix}"
system "make", "install"
etc.install "doc/reference.conf" => "ircd.conf"
end
test do
system "#{bin}/ircd", "-version"
end
def caveats; <<-EOS.undent
You'll more than likely need to edit the default settings in the config file:
#{etc}/ircd.conf
EOS
end
plist_options :manual => "ircd"
def plist; <<-EOS.undent
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<false/>
<key>Label</key>
<string>#{plist_name}</string>
<key>ProgramArguments</key>
<array>
<string>#{opt_sbin}/ircd</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>WorkingDirectory</key>
<string>#{HOMEBREW_PREFIX}</string>
<key>StandardErrorPath</key>
<string>#{var}/ircd.log</string>
</dict>
</plist>
EOS
end
end