70 lines
1.8 KiB
Ruby
70 lines
1.8 KiB
Ruby
require 'formula'
|
|
|
|
class Arangodb < Formula
|
|
homepage 'http://www.arangodb.org/'
|
|
url 'https://www.arangodb.org/repositories/Source/ArangoDB-2.1.0.tar.gz'
|
|
sha1 '06378c988139792e3d8b77176177f7761ba6300a'
|
|
|
|
head "https://github.com/triAGENS/ArangoDB.git", :branch => 'unstable'
|
|
|
|
bottle do
|
|
sha1 "6ca3c04cf9c9ba78250130de6aa6be0ad4326f80" => :mavericks
|
|
sha1 "97b6304b5b7480deab765bc1094e1c0c3f8f9c88" => :mountain_lion
|
|
sha1 "098cc831d0a97656bf89e09e28bec19bd8837dd9" => :lion
|
|
end
|
|
|
|
depends_on 'go' => :build
|
|
|
|
def suffix
|
|
if build.stable?
|
|
return ""
|
|
else
|
|
return "-" + (build.devel? ? version : "unstable")
|
|
end
|
|
end
|
|
|
|
def install
|
|
args = %W[
|
|
--disable-dependency-tracking
|
|
--prefix=#{prefix}
|
|
--disable-relative
|
|
--enable-all-in-one-icu
|
|
--enable-all-in-one-libev
|
|
--enable-all-in-one-v8
|
|
--enable-mruby
|
|
--datadir=#{share}
|
|
--localstatedir=#{var}
|
|
--program-suffix=#{suffix}
|
|
]
|
|
|
|
system "./configure", *args
|
|
system "make install"
|
|
|
|
(var/'arangodb').mkpath
|
|
(var/'log/arangodb').mkpath
|
|
end
|
|
|
|
plist_options :manual => "#{HOMEBREW_PREFIX}/opt/arangodb/sbin/arangod --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
|