homebrew-core/Formula/arangodb.rb
2015-12-04 05:31:23 +00: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.2.tar.gz"
sha256 "e306bec9ba7068c40063e496ab7793e28a085ede131764f4620c06a514d94bdb"
head "https://github.com/arangodb/arangodb.git", :branch => "unstable"
bottle do
sha256 "8a6a3b00127328cf34c7bc251bc43fc44d3e554d076f12c322695c4f900f3518" => :el_capitan
sha256 "8e75d249a593402c0cdab3f1b59d2787b2d7fa09013c470b77cd1538b01fdc11" => :yosemite
sha256 "c7852e150a935856dc542f9ab76ed00f58bf7493b78ec81bbeaee31b60fe2cb1" => :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