class Rsyslog < Formula desc "Enhanced, multi-threaded syslogd" homepage "https://www.rsyslog.com/" url "https://www.rsyslog.com/files/download/rsyslog/rsyslog-8.36.0.tar.gz" sha256 "8a4b5beb92c6b308c3d14de2364c2788f62ef5d37ca0448144619edfe508ee70" bottle do sha256 "fe6369499b8b45a0721de48b85a01f0a1d0eeb21faf9e19169ba5c7205c0f583" => :high_sierra sha256 "6ba51b3cbbadad0f504e99606716db248289ddd86d26ab067e2dfda2962f2e11" => :sierra sha256 "bda24f04bcca9ce06ed3e79b272d23373123ea197216d626f3f4f2b08139b79f" => :el_capitan end depends_on "pkg-config" => :build depends_on "libestr" resource "libfastjson" do url "http://download.rsyslog.com/libfastjson/libfastjson-0.99.8.tar.gz" sha256 "3544c757668b4a257825b3cbc26f800f59ef3c1ff2a260f40f96b48ab1d59e07" end def install resource("libfastjson").stage do system "./configure", "--disable-dependency-tracking", "--disable-silent-rules", "--prefix=#{libexec}" system "make", "install" end ENV.prepend_path "PKG_CONFIG_PATH", libexec/"lib/pkgconfig" args = %W[ --prefix=#{prefix} --disable-dependency-tracking --enable-imfile --enable-usertools --enable-diagtools --disable-uuid --disable-libgcrypt ] system "./configure", *args system "make" system "make", "install" end plist_options :manual => "rsyslogd -f #{HOMEBREW_PREFIX}/etc/rsyslog.conf -i #{HOMEBREW_PREFIX}/var/run/rsyslogd.pid" def plist; <<~EOS Label #{plist_name} KeepAlive ProgramArguments #{opt_sbin}/rsyslogd -n -f #{etc}/rsyslog.conf -i #{var}/run/rsyslogd.pid StandardErrorPath #{var}/log/rsyslogd.log StandardOutPath #{var}/log/rsyslogd.log EOS end end