67 lines
2 KiB
Ruby
67 lines
2 KiB
Ruby
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.11/ircd-hybrid-8.2.11.tgz"
|
|
sha256 "eeb916ca22b0ee2c7b36e00249ca41001a82587597084c102fe11ad8e85cfe78"
|
|
|
|
bottle do
|
|
sha256 "00cbc9c69d6445c49cfa98d9427a3c87934e15b447fff35eb95e373d83f266b9" => :el_capitan
|
|
sha256 "fd2e3d6d05f6e8b3f1b3e94d0a8b9efdd6553e4670a6deba9871537c1877b131" => :yosemite
|
|
sha256 "a357585cbbf0b4e2dc0323094e15b3451fa12566c717d4442a6bf8b54744ff77" => :mavericks
|
|
end
|
|
|
|
# ircd-hybrid needs the .la files
|
|
skip_clean :la
|
|
|
|
depends_on "openssl"
|
|
|
|
conflicts_with "ircd-irc2", :because => "both install an `ircd` binary"
|
|
|
|
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
|
|
|
|
def caveats; <<-EOS.undent
|
|
You'll more than likely need to edit the default settings in the config file:
|
|
#{etc}/ircd.conf
|
|
EOS
|
|
end
|
|
|
|
test do
|
|
system "#{bin}/ircd", "-version"
|
|
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
|