homebrew-core/Formula/arangodb.rb
2015-11-13 18:47:38 -05:00

75 lines
2.1 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.1.tar.gz"
sha256 "a0f5cb20bdfa9750f43ee57a559a370a22bfc3f184a9d6d2d30d0bdadf639e12"
head "https://github.com/arangodb/arangodb.git", :branch => "unstable"
bottle do
sha256 "46aa15e93882565f839373776f5f46cc4f0720b177efd70080077653ee3d2449" => :el_capitan
sha256 "56e02f6ccce24014372f0c9aa84c8a126970b16d9ca2fa80c7999416ffad784d" => :yosemite
sha256 "774e7f7467af35cef3599e561083fce564df81fb4dd304a3937d628d1070b4b6" => :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"
(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
<?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