67 lines
2 KiB
Ruby
67 lines
2 KiB
Ruby
require "formula"
|
|
|
|
class IrcdHybrid < Formula
|
|
desc "High-performance secure IRC server"
|
|
homepage "http://www.ircd-hybrid.org/"
|
|
url "https://downloads.sourceforge.net/project/ircd-hybrid/ircd-hybrid/ircd-hybrid-8.2.6/ircd-hybrid-8.2.6.tgz"
|
|
sha256 "c712988ef43081e6d2218e4fe2523fdadf22df2959cf4c878f0625d16da5b79d"
|
|
|
|
bottle do
|
|
sha256 "b0c505ad232ad94432d513595558dd5e92cb73c0f7fdda3a1ead22ea0ca1f84a" => :yosemite
|
|
sha256 "41f6f18ae7b788d87bf0bc65e286547c082ce6189c145c39b08bfb478c8b8249" => :mavericks
|
|
sha256 "681aa8d8494ed80b13f147d2134acb1d7d3b5daca02d9ebe8fee1e051c09ca6e" => :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
|