require 'formula' class Arangodb < Formula homepage 'http://www.arangodb.org/' url 'https://www.arangodb.org/repositories/Source/ArangoDB-2.0.6.tar.gz' sha1 '9d966ff924a4bca2d1ef17d33fe917c7c4315729' head "https://github.com/triAGENS/ArangoDB.git", :branch => 'unstable' bottle do sha1 "c17ee9db866e1f5e538079059b95e9a3c95582e4" => :mavericks sha1 "ad19bbc961bb2f60c6842d52438d4315ab575611" => :mountain_lion sha1 "42504ab4c99d33deb0940fe87ef47b34fbfd50e3" => :lion end depends_on 'go' => :build def suffix if build.stable? return "" else return "-" + (build.devel? ? version : "unstable") end end def install args = %W[ --disable-dependency-tracking --prefix=#{prefix} --disable-relative --enable-all-in-one-icu --enable-all-in-one-libev --enable-all-in-one-v8 --enable-mruby --datadir=#{share} --localstatedir=#{var} --program-suffix=#{suffix} ] system "./configure", *args system "make install" (var/'arangodb').mkpath (var/'log/arangodb').mkpath end plist_options :manual => "#{HOMEBREW_PREFIX}/opt/arangodb/sbin/arangod --log.file -" def plist; <<-EOS.undent KeepAlive Label #{plist_name} ProgramArguments #{opt_sbin}/arangod -c #{etc}/arangodb/arangod.conf RunAtLoad EOS end end