diff --git a/Formula/beansdb.rb b/Formula/beansdb.rb new file mode 100644 index 0000000000..a6b114183b --- /dev/null +++ b/Formula/beansdb.rb @@ -0,0 +1,62 @@ +require 'formula' + +class Beansdb < Formula + homepage 'https://github.com/douban/beansdb' + url 'https://github.com/douban/beansdb/archive/v0.5.9.tar.gz' + sha1 '79dc0f48d00d1820b4310136936c536316cc1c08' + + head 'https://github.com/douban/beansdb.git', :branch => 'master' + + depends_on :automake + + fails_with :clang do + build 425 + end + + def install + system "./autogen.sh" + system "./configure", "--prefix=#{prefix}" + + system "make" + system "make install" + + (var + 'db/beansdb').mkpath + (var + 'log').mkpath + end + + def plist; <<-EOS.undent + + + + + KeepAlive + + SuccessfulExit + + + Label + #{plist_name} + ProgramArguments + + #{opt_prefix}/bin/beansdb + -p + 7900 + -H + #{var}/db/beansdb + -T + 1 + -vv + + RunAtLoad + + WorkingDirectory + #{var} + StandardErrorPath + #{var}/log/beansdb.log + StandardOutPath + #{var}/log/beansdb.log + + + EOS + end +end