homebrew-core/Formula/arangodb.rb

87 lines
2.5 KiB
Ruby
Raw Normal View History

class Arangodb < Formula
desc "Universal open-source database with a flexible data model"
2015-07-03 05:36:41 +00:00
homepage "https://www.arangodb.com/"
url "https://www.arangodb.com/repositories/Source/ArangoDB-2.8.6.tar.gz"
sha256 "0a11eb98e5c6bfda88a1e1e0bcae09dda2c88cdbcc3d01a669e4ef66c3284c4f"
2015-07-03 05:36:41 +00:00
head "https://github.com/arangodb/arangodb.git", :branch => "unstable"
2016-02-17 10:04:02 +00:00
bottle do
2016-03-24 15:13:55 +00:00
sha256 "55b02e0392524ae1cffcc7bcc18bd44a4b10c167940f11db98ee25c267cb92dd" => :el_capitan
sha256 "bec740ff6215d3bda3ee7a9e73b2f5c586114d739f728a5c4c00a7d050da95c2" => :yosemite
sha256 "02b3a5bf310dba74670eae9bc451ce41cf94d2f11ab9010103b4687d47a5f8ee" => :mavericks
2016-02-17 10:04:02 +00:00
end
2015-07-03 05:36:41 +00:00
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?
if ENV.compiler != :clang
ENV.append "LDFLAGS", "-static-libgcc -static-libstdc++"
end
system "./configure", *args
2015-07-03 05:36:41 +00:00
system "make", "install"
2016-01-20 11:38:22 +00:00
end
2016-01-20 11:38:22 +00:00
def post_install
2015-07-03 05:36:41 +00:00
(var/"arangodb").mkpath
(var/"log/arangodb").mkpath
system "#{sbin}/arangod" + (build.head? ? "-unstable" : ""), "--upgrade", "--log.file", "-"
2014-06-07 07:14:11 +00:00
end
def caveats; <<-EOS.undent
Please note that clang and/or its standard library 7.0.0 has a severe
performance issue. Please consider using '--cc=gcc-5' when installing
if you are running on such a system.
EOS
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>
2014-03-06 05:28:31 +00:00
<string>#{opt_sbin}/arangod</string>
<string>-c</string>
<string>#{etc}/arangodb/arangod.conf</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
EOS
end
end