72 lines
2.2 KiB
Ruby
72 lines
2.2 KiB
Ruby
class Znc < Formula
|
|
desc "Advanced IRC bouncer"
|
|
homepage "https://wiki.znc.in/ZNC"
|
|
url "https://znc.in/releases/archive/znc-1.7.4.tar.gz"
|
|
sha256 "b1a32921a8e6d79ee6c5900c8d07293026966db7c05aaac48984231befc49b71"
|
|
revision 1
|
|
|
|
bottle do
|
|
sha256 "3aaefd4d68030bc5e7f651ecaf414bfe701a2294fda43a244732921834ad9ff3" => :mojave
|
|
sha256 "c297cde86d71718149a2079775b73202b66b1af11836d0fd3f01f697a7f48040" => :high_sierra
|
|
sha256 "e78e9e043b87ce016dea804c3234ca4ecf3b0919ca3b910b60a9d331d8c5efb2" => :sierra
|
|
end
|
|
|
|
head do
|
|
url "https://github.com/znc/znc.git"
|
|
|
|
depends_on "autoconf" => :build
|
|
depends_on "automake" => :build
|
|
depends_on "libtool" => :build
|
|
end
|
|
|
|
depends_on "pkg-config" => :build
|
|
depends_on "icu4c"
|
|
depends_on "openssl@1.1"
|
|
depends_on "python"
|
|
|
|
def install
|
|
ENV.cxx11
|
|
# These need to be set in CXXFLAGS, because ZNC will embed them in its
|
|
# znc-buildmod script; ZNC's configure script won't add the appropriate
|
|
# flags itself if they're set in superenv and not in the environment.
|
|
ENV.append "CXXFLAGS", "-std=c++11"
|
|
ENV.append "CXXFLAGS", "-stdlib=libc++" if ENV.compiler == :clang
|
|
|
|
system "./autogen.sh" if build.head?
|
|
system "./configure", "--prefix=#{prefix}", "--enable-python"
|
|
system "make", "install"
|
|
end
|
|
|
|
plist_options :manual => "znc --foreground"
|
|
|
|
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>Label</key>
|
|
<string>#{plist_name}</string>
|
|
<key>ProgramArguments</key>
|
|
<array>
|
|
<string>#{opt_bin}/znc</string>
|
|
<string>--foreground</string>
|
|
</array>
|
|
<key>StandardErrorPath</key>
|
|
<string>#{var}/log/znc.log</string>
|
|
<key>StandardOutPath</key>
|
|
<string>#{var}/log/znc.log</string>
|
|
<key>RunAtLoad</key>
|
|
<true/>
|
|
<key>StartInterval</key>
|
|
<integer>300</integer>
|
|
</dict>
|
|
</plist>
|
|
EOS
|
|
end
|
|
|
|
test do
|
|
mkdir ".znc"
|
|
system bin/"znc", "--makepem"
|
|
assert_predicate testpath/".znc/znc.pem", :exist?
|
|
end
|
|
end
|