class Znc < Formula desc "Advanced IRC bouncer" homepage "https://wiki.znc.in/ZNC" url "https://znc.in/releases/archive/znc-1.7.1.tar.gz" sha256 "44cfea7158ea05dc2547c7c6bc22371e66c869def90351de0ab90a9c200d39c4" revision 2 bottle do sha256 "4ebcf80b5a6c2224597d16f4b3500645df250946a0ae989a1b7e28eebd150372" => :mojave sha256 "da5bd2ef4dccba1baa83a963059232956d808e17bb93ed68625b7c225eb5af4c" => :high_sierra sha256 "4fbe9ac08b9fe2d1ad85fd86a73c3cdd37b93ad2b1f673e786e0fc7089822adb" => :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" 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 Label #{plist_name} ProgramArguments #{opt_bin}/znc --foreground StandardErrorPath #{var}/log/znc.log StandardOutPath #{var}/log/znc.log RunAtLoad StartInterval 300 EOS end test do mkdir ".znc" system bin/"znc", "--makepem" assert_predicate testpath/".znc/znc.pem", :exist? end end