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.2.tar.gz" sha256 "673465c868f34e80ef1d6a6b1d949173dbb35a9913664aa17bb6c2b7175f29fe" head "https://github.com/arangodb/arangodb.git", :branch => "unstable" bottle do sha256 "2e4678a8406e75e2245c252474f610e52d1046754841681f83bd3360a9ef5eb1" => :yosemite sha256 "1597f83f4e2b5db929eb80c289abfb28223b54e1f89cd188e610c6a8c9fb4006" => :mavericks sha256 "421a3c80df4453ce0f6532993da50ed674effcf65b534ccdd453025d53507401" => :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