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.3.tar.gz" sha256 "acc77c3e6b9dc07759c1fd18b61d9d180a8030870f7eb17430483387228d6e3d" head "https://github.com/arangodb/arangodb.git", :branch => "unstable" bottle do sha256 "0af2710a34a22fd3ccafec947c0ef469d48a52570dcbdf7b4d189775b058181a" => :yosemite sha256 "931ff32892732e9abf59ca4fa88dde5be5a418aebc97cdc468c0218009337541" => :mavericks sha256 "50756bfd417ae16791826f84ff89531db5870e11fed6333e795df42ecc57e7bd" => :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