class Rsyslog < Formula desc "Enhanced, multi-threaded syslogd" homepage "https://www.rsyslog.com/" url "https://www.rsyslog.com/files/download/rsyslog/rsyslog-8.1907.0.tar.gz" sha256 "eb27535ece93174ef6b551c88467d2c9cd826b62479625bb881a53d50b079fb5" bottle do sha256 "fc47145544f0bb9638221efb94b84b1ffd6e503a3fe130b411cf731c8407607d" => :mojave sha256 "abe97bac1c29596ff223ab4c3aa02a11ad5aa09c87c60279f47194c86ae79669" => :high_sierra sha256 "2bd341f178a5823fa144da75c8f48e450627bac5b7e27ff9215705f1cac5d755" => :sierra end depends_on "pkg-config" => :build depends_on "libestr" resource "libfastjson" do url "https://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