2012-03-10 18:43:57 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Riemann < Formula
|
2013-04-07 02:34:41 +00:00
|
|
|
homepage 'http://riemann.io'
|
2013-06-08 19:15:35 +00:00
|
|
|
url 'http://aphyr.com/riemann/riemann-0.2.2.tar.bz2'
|
|
|
|
sha1 '7f506d804cf4a5da54bc0d2bc3213cb056a7d25b'
|
2012-03-10 18:43:57 +00:00
|
|
|
|
|
|
|
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
|
2012-11-13 20:44:59 +00:00
|
|
|
if (etc/'riemann.config').exist?
|
|
|
|
(prefix/'etc').install 'etc/riemann.config' => 'riemann.config.guide'
|
|
|
|
else
|
|
|
|
etc.install 'etc/riemann.config'
|
|
|
|
end
|
2012-03-10 18:43:57 +00:00
|
|
|
|
|
|
|
# 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
|
|
|
|
end
|