homebrew-core/Formula/arangodb.rb
2016-01-20 13:20:51 +00:00

76 lines
2.2 KiB
Ruby

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.7.3.tar.gz"
sha256 "cda5f897dd8f51ad7a7fc2e4b4383bad8e2a378a8114c1531cb8e7e977b620d4"
revision 1
head "https://github.com/arangodb/arangodb.git", :branch => "unstable"
bottle do
sha256 "92cbe2086de780ce5577202195edf3d26b0ab163480f1cf533ddfe2b10126b92" => :el_capitan
sha256 "a40daf4c2e9951021fc35eb462a13e23a3bef0b067843d2c060d8bfaaae0d352" => :yosemite
sha256 "241b0c90a2dc926f8d0c613e8ec1f74c4d35a4d3e5792842779d8aaa3dcb3193" => :mavericks
end
depends_on "go" => :build
depends_on "openssl"
needs :cxx11
fails_with :clang do
build 600
cause "Fails with compile errors"
end
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
--datadir=#{share}
--localstatedir=#{var}
]
args << "--program-suffix=-unstable" if build.head?
system "./configure", *args
system "make", "install"
end
def post_install
(var/"arangodb").mkpath
(var/"log/arangodb").mkpath
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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>#{plist_name}</string>
<key>ProgramArguments</key>
<array>
<string>#{opt_sbin}/arangod</string>
<string>-c</string>
<string>#{etc}/arangodb/arangod.conf</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
EOS
end
end