class Arangodb < Formula desc "Universal open-source database with a flexible data model" homepage "https://www.arangodb.com/" url "https://www.arangodb.com/repositories/Source/ArangoDB-2.6.1.tar.gz" sha256 "d1e3ff55899efc1a6dfbe79dd0e4d4e4abe5b29bc5269b31a3718e9862c0c54b" head "https://github.com/arangodb/arangodb.git", :branch => "unstable" bottle do sha256 "3e30a733cc0e0b74ec6703df4c4b46ca7c1fe038b1a0a87ce9fbfbda956bb894" => :yosemite sha256 "661e446f1be82d62c735359afa557ad7c38f5febee233488fd8eb9d54390955e" => :mavericks sha256 "56cd3864d579bfb22757a1999e4eb5687ef3bb36e7307612d5678bfb622ab5c6" => :mountain_lion end depends_on "go" => :build depends_on "openssl" needs :cxx11 def install # clang on 10.8 will still try to build against libstdc++, # which fails because it doesn't have the C++0x features # arangodb requires. ENV.libcxx args = %W[ --disable-dependency-tracking --prefix=#{prefix} --disable-relative --enable-mruby --datadir=#{share} --localstatedir=#{var} ] args << "--program-suffix=-unstable" if build.head? system "./configure", *args system "make", "install" (var/"arangodb").mkpath (var/"log/arangodb").mkpath end def post_install system "#{sbin}/arangod" + (build.head? ? "-unstable" : ""), "--upgrade", "--log.file", "-" end plist_options :manual => "#{HOMEBREW_PREFIX}/opt/arangodb/sbin/arangod" + (build.head? ? "-unstable" : "") + " --log.file -" def plist; <<-EOS.undent KeepAlive Label #{plist_name} ProgramArguments #{opt_sbin}/arangod -c #{etc}/arangodb/arangod.conf RunAtLoad EOS end end