2012-05-12 19:10:37 +00:00
|
|
|
class Arangodb < Formula
|
2016-07-01 19:23:26 +00:00
|
|
|
desc "The Multi-Model NoSQL Database."
|
2015-07-03 05:36:41 +00:00
|
|
|
homepage "https://www.arangodb.com/"
|
2016-12-09 16:37:32 +00:00
|
|
|
url "https://www.arangodb.com/repositories/Source/ArangoDB-3.1.4.tar.gz"
|
|
|
|
sha256 "a2971abe3da8e7b2690a4de658fe2b16bb626b5c3116bb5c1e98e5008c26c24d"
|
2016-09-24 15:45:48 +00:00
|
|
|
head "https://github.com/arangodb/arangodb.git", :branch => "unstable"
|
2012-05-12 19:10:37 +00:00
|
|
|
|
2016-02-17 10:04:02 +00:00
|
|
|
bottle do
|
2016-12-09 19:13:13 +00:00
|
|
|
sha256 "38e4841ed975b6875513c9ecc03004f2524b1109d06873b392657abb1e1e44bc" => :sierra
|
|
|
|
sha256 "1691d285f046b994cc4c6df2bb2df5c64c8efe24bb1f060ee955b74c246c2e09" => :el_capitan
|
|
|
|
sha256 "d75c178361ad4dcd43ebc1268e369b8973f13a275e60bcdd8e2677ffcf06a785" => :yosemite
|
2016-02-17 10:04:02 +00:00
|
|
|
end
|
|
|
|
|
2016-09-24 15:45:48 +00:00
|
|
|
depends_on :macos => :yosemite
|
2016-07-01 19:23:26 +00:00
|
|
|
depends_on "cmake" => :build
|
2015-07-03 05:36:41 +00:00
|
|
|
depends_on "go" => :build
|
|
|
|
depends_on "openssl"
|
2012-05-12 19:10:37 +00:00
|
|
|
|
2014-07-12 18:47:14 +00:00
|
|
|
needs :cxx11
|
|
|
|
|
2015-10-11 21:10:38 +00:00
|
|
|
fails_with :clang do
|
|
|
|
build 600
|
|
|
|
cause "Fails with compile errors"
|
|
|
|
end
|
|
|
|
|
2012-05-12 19:10:37 +00:00
|
|
|
def install
|
2016-07-01 19:23:26 +00:00
|
|
|
ENV.cxx11
|
2014-07-12 18:47:14 +00:00
|
|
|
|
2016-07-01 19:23:26 +00:00
|
|
|
mkdir "build" do
|
|
|
|
args = std_cmake_args + %W[
|
|
|
|
-DHOMEBREW=ON
|
|
|
|
-DUSE_OPTIMIZE_FOR_ARCHITECTURE=OFF
|
|
|
|
-DASM_OPTIMIZATIONS=OFF
|
2016-07-12 14:43:33 +00:00
|
|
|
-DCMAKE_INSTALL_DATADIR=#{share}
|
2016-11-18 13:02:42 +00:00
|
|
|
-DCMAKE_INSTALL_DATAROOTDIR=#{share}
|
|
|
|
-DCMAKE_INSTALL_SYSCONFDIR=#{etc}
|
|
|
|
-DCMAKE_INSTALL_LOCALSTATEDIR=#{var}
|
2016-07-01 19:23:26 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
if ENV.compiler == "gcc-6"
|
|
|
|
ENV.append "V8_CXXFLAGS", "-O3 -g -fno-delete-null-pointer-checks"
|
|
|
|
end
|
2012-05-12 19:10:37 +00:00
|
|
|
|
2016-07-01 19:23:26 +00:00
|
|
|
system "cmake", "..", *args
|
2016-07-12 14:43:33 +00:00
|
|
|
system "make", "install"
|
|
|
|
|
|
|
|
%w[arangod arango-dfdb arangosh foxx-manager].each do |f|
|
|
|
|
inreplace etc/"arangodb3/#{f}.conf", pkgshare, opt_pkgshare
|
|
|
|
end
|
2016-06-25 20:00:39 +00:00
|
|
|
end
|
2014-06-07 07:14:11 +00:00
|
|
|
end
|
|
|
|
|
2016-07-01 19:23:26 +00:00
|
|
|
def post_install
|
|
|
|
(var/"lib/arangodb3").mkpath
|
|
|
|
(var/"log/arangodb3").mkpath
|
|
|
|
end
|
|
|
|
|
2016-06-25 20:00:39 +00:00
|
|
|
def caveats
|
|
|
|
s = <<-EOS.undent
|
2016-07-01 19:23:26 +00:00
|
|
|
An empty password has been set. Please change it by executing
|
|
|
|
#{opt_sbin}/arango-secure-installation
|
|
|
|
EOS
|
2016-06-25 20:00:39 +00:00
|
|
|
|
|
|
|
s
|
2016-02-10 09:24:56 +00:00
|
|
|
end
|
|
|
|
|
2016-09-24 15:45:48 +00:00
|
|
|
plist_options :manual => "#{HOMEBREW_PREFIX}/opt/arangodb/sbin/arangod"
|
2012-06-30 11:52:16 +00:00
|
|
|
|
2012-11-25 15:06:41 +00:00
|
|
|
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>
|
2016-07-01 19:23:26 +00:00
|
|
|
<key>Program</key>
|
|
|
|
<string>#{opt_sbin}/arangod</string>
|
2012-11-25 15:06:41 +00:00
|
|
|
<key>RunAtLoad</key>
|
|
|
|
<true/>
|
|
|
|
</dict>
|
|
|
|
</plist>
|
2012-06-30 11:52:16 +00:00
|
|
|
EOS
|
|
|
|
end
|
2016-06-25 20:00:39 +00:00
|
|
|
|
|
|
|
test do
|
2016-07-01 19:23:26 +00:00
|
|
|
testcase = "require('@arangodb').print('it works!')"
|
|
|
|
output = shell_output("#{bin}/arangosh --server.password \"\" --javascript.execute-string \"#{testcase}\"")
|
|
|
|
assert_equal "it works!", output.chomp
|
2016-06-25 20:00:39 +00:00
|
|
|
end
|
2012-05-12 19:10:37 +00:00
|
|
|
end
|