71 lines
2.1 KiB
Ruby
71 lines
2.1 KiB
Ruby
class Rethinkdb < Formula
|
|
desc "The open-source database for the realtime web"
|
|
homepage "http://www.rethinkdb.com/"
|
|
url "http://download.rethinkdb.com/dist/rethinkdb-2.1.3.tgz"
|
|
sha256 "8dbfbd89e1053eda7acde7e0bb9c4ceb64c5371ceb9b3e16019e6fc60776890f"
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "586c8c95881478bef5fad4260463f07340f11ce399aba835fcee1c026e98ada8" => :el_capitan
|
|
sha256 "0d30a1c9826a412bea6aded88226d78d4f39ba3ac862d240be4e16c40b50c476" => :yosemite
|
|
sha256 "29932cf4acb4013ec89cf0f088f334e98ce6609017a1fd2f0393409266314dac" => :mavericks
|
|
sha256 "4b875c9177d34b2e5d15e5ea506b9e6d67a29f679e2fa6533077a6231d2a8f95" => :mountain_lion
|
|
end
|
|
|
|
depends_on :macos => :lion
|
|
depends_on "boost" => :build
|
|
depends_on "openssl"
|
|
depends_on "icu4c"
|
|
|
|
fails_with :gcc do
|
|
build 5666 # GCC 4.2.1
|
|
cause "RethinkDB uses C++0x"
|
|
end
|
|
|
|
def install
|
|
args = ["--prefix=#{prefix}"]
|
|
|
|
# rethinkdb requires that protobuf be linked against libc++
|
|
# but brew's protobuf is sometimes linked against libstdc++
|
|
args += ["--fetch", "protobuf"]
|
|
|
|
system "./configure", *args
|
|
system "make"
|
|
system "make", "install-osx"
|
|
|
|
mkdir_p "#{var}/log/rethinkdb"
|
|
end
|
|
|
|
def plist; <<-EOS.undent
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
<plist version="1.0">
|
|
<dict>
|
|
<key>Label</key>
|
|
<string>#{plist_name}</string>
|
|
<key>ProgramArguments</key>
|
|
<array>
|
|
<string>#{opt_bin}/rethinkdb</string>
|
|
<string>-d</string>
|
|
<string>#{var}/rethinkdb</string>
|
|
</array>
|
|
<key>WorkingDirectory</key>
|
|
<string>#{HOMEBREW_PREFIX}</string>
|
|
<key>StandardOutPath</key>
|
|
<string>#{var}/log/rethinkdb/rethinkdb.log</string>
|
|
<key>StandardErrorPath</key>
|
|
<string>#{var}/log/rethinkdb/rethinkdb.log</string>
|
|
<key>RunAtLoad</key>
|
|
<true/>
|
|
<key>KeepAlive</key>
|
|
<true/>
|
|
</dict>
|
|
</plist>
|
|
EOS
|
|
end
|
|
|
|
test do
|
|
shell_output("#{bin}/rethinkdb create -d test")
|
|
assert File.read("test/metadata").start_with?("RethinkDB")
|
|
end
|
|
end
|