require 'formula' class Beanstalk < Formula homepage 'http://kr.github.io/beanstalkd/' url 'https://github.com/downloads/kr/beanstalkd/beanstalkd-1.8.tar.gz' sha1 'b8c274d7233e02c6793d8d119608ad7c878b0954' def install system "make", "install", "PREFIX=#{prefix}" end plist_options :manual => "beanstalkd" def plist; <<-EOS.undent KeepAlive Label #{plist_name} ProgramArguments #{opt_prefix}/bin/beanstalkd RunAtLoad KeepAlive WorkingDirectory #{var} StandardErrorPath #{var}/log/beanstalkd.log StandardOutPath #{var}/log/beanstalkd.log EOS end end