homebrew-core/Formula/ircd-hybrid.rb

76 lines
2.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.32/ircd-hybrid-8.2.32.tgz"
sha256 "b27823ee359dcdeeaf1cce3b81fb959a156fd776ab599092dd52fd79fa276df2"
license "GPL-2.0-or-later"
livecheck do
url :stable
regex(%r{url=.*?/ircd-hybrid[._-]v?(\d+(?:\.\d+)+)\.t}i)
end
bottle do
sha256 "4141097277b2a5e1c28c4d6ac1bf0b01743c7e34fb371aca7267e480db8ec830" => :catalina
sha256 "0a4639339b71b7b385a5f7a5bf0755d1b055a093db29ace3421d768f1aa6c4d9" => :mojave
sha256 "9d334046c230f6df1c75a7e5313477bb79fe6cc35f53f9be441216c577ca3d22" => :high_sierra
end
depends_on "openssl@1.1"
conflicts_with "ircd-irc2", because: "both install an `ircd` binary"
# ircd-hybrid needs the .la files
skip_clean :la
def install
ENV.deparallelize # build system trips over itself
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}",
"--localstatedir=#{var}",
"--sysconfdir=#{etc}",
"--enable-openssl=#{Formula["openssl@1.1"].opt_prefix}"
system "make", "install"
etc.install "doc/reference.conf" => "ircd.conf"
end
def caveats
<<~EOS
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
<?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_bin}/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
test do
system "#{bin}/ircd", "-version"
end
end