81 lines
2.3 KiB
Ruby
81 lines
2.3 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.8.2.tar.gz"
|
|
sha256 "70a546e1e0f5a56d74af0cedbfe6b2c53b04ca09ca1982f9713231112490c1de"
|
|
|
|
head "https://github.com/arangodb/arangodb.git", :branch => "unstable"
|
|
|
|
bottle do
|
|
sha256 "75ec22c06d2bd0cab47765e1918d8e0cc36ce6a3f1dbcbd081226176c13450db" => :el_capitan
|
|
sha256 "60b332f4b8d9bb41f822d3b7a19d1913f699077dffa270cf7023113127aac786" => :yosemite
|
|
sha256 "13dfd3276c33fbe9cab2cbef782125b42618ce32c30838c1946e1eca6a029927" => :mavericks
|
|
end
|
|
|
|
depends_on "go" => :build
|
|
depends_on "openssl"
|
|
|
|
needs :cxx11
|
|
|
|
fails_with :clang do
|
|
build 600
|
|
cause "Fails with compile errors"
|
|
end
|
|
|
|
fails_with :clang do
|
|
build 702
|
|
cause "clang and/or stdlibc++ is 7x slower than in other versions"
|
|
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
|