homebrew-core/Formula/riemann.rb
Dave Cottlehuber 7af4079474 riemann 0.1.3
- README.markdown and etc/riemann.config.guide have been removed
  permanently upstream
- ensure etc/riemann.config does not over-write an existing one as it is
  customised extensively

Closes Homebrew/homebrew#16040.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-11-25 14:05:49 -06:00

41 lines
884 B
Ruby

require 'formula'
class Riemann < Formula
homepage 'http://aphyr.github.com/riemann/'
url 'http://aphyr.com/riemann/riemann-0.1.3.tar.bz2'
sha1 '1bb7da969bd9f71761380009516dbe336ff19230'
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
if (etc/'riemann.config').exist?
(prefix/'etc').install 'etc/riemann.config' => 'riemann.config.guide'
else
etc.install 'etc/riemann.config'
end
# 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