class Riemann < Formula desc "Event stream processor" homepage "http://riemann.io" url "https://github.com/riemann/riemann/releases/download/0.2.12/riemann-0.2.12.tar.bz2" mirror "https://ftp.openbsd.org/pub/OpenBSD/distfiles/riemann-0.2.12.tar.bz2" sha256 "79f21fb2ac90a3d55e7cfa4a1eb14d1bdcdb1266ba6052bb72e6e500467ca7f4" bottle :unneeded def shim_script <<-EOS.undent #!/bin/bash if [ -z "$1" ] then config="#{etc}/riemann.config" else config=$@ fi exec "#{libexec}/bin/riemann" $config EOS end def install etc.install "etc/riemann.config" => "riemann.config.guide" # Install jars in libexec to avoid conflicts libexec.install Dir["*"] (bin+"riemann").write shim_script end def caveats; <<-EOS.undent You may also wish to install these Ruby gems: riemann-client riemann-tools riemann-dash EOS end plist_options :manual => "riemann" def plist; <<-EOS.undent KeepAlive Label #{plist_name} ProgramArguments #{opt_bin}/riemann #{etc}/riemann.config RunAtLoad StandardErrorPath #{var}/log/riemann.log StandardOutPath #{var}/log/riemann.log EOS end test do system "#{bin}/riemann", "-help", "0" end end