76 lines
2.2 KiB
Ruby
76 lines
2.2 KiB
Ruby
class IrcdHybrid < Formula
|
|
desc "High-performance secure IRC server"
|
|
homepage "https://www.ircd-hybrid.org/"
|
|
url "https://downloads.sourceforge.net/project/ircd-hybrid/ircd-hybrid/ircd-hybrid-8.2.36/ircd-hybrid-8.2.36.tgz"
|
|
sha256 "9b3de456609dc8909d5185243a8b094c4ff910fa26f94be7462c226a3f78e469"
|
|
license "GPL-2.0-or-later"
|
|
|
|
livecheck do
|
|
url :stable
|
|
regex(%r{url=.*?/ircd-hybrid[._-]v?(\d+(?:\.\d+)+)\.t}i)
|
|
end
|
|
|
|
bottle do
|
|
sha256 "f192d0cc270024015f0b6d155df8f74f617585d8250fdc9cebd4f0cbc6ed7b4e" => :big_sur
|
|
sha256 "c48d4c05fb9b276fdbf9e92fbfee0165ef690082d75327e4e235839ef5202a4f" => :catalina
|
|
sha256 "384c0bf8f2e1e8a2abeba7b6505f6bc2becd8e7e71a5a73728f7258bdf130c6a" => :mojave
|
|
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
|