From fedf64928a628327a0ac0d97a45c74e9eb5a2c70 Mon Sep 17 00:00:00 2001 From: Chris Griego Date: Sun, 28 Aug 2011 13:50:34 -0500 Subject: [PATCH] MongoDB 2.0.0-rc0 Signed-off-by: Adam Vandenberg --- Formula/mongodb.rb | 48 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/Formula/mongodb.rb b/Formula/mongodb.rb index 77183fa1df..c20175639f 100644 --- a/Formula/mongodb.rb +++ b/Formula/mongodb.rb @@ -4,18 +4,33 @@ require 'hardware' class Mongodb < Formula homepage 'http://www.mongodb.org/' - packages = { - :x86_64 => { - :url => 'http://fastdl.mongodb.org/osx/mongodb-osx-x86_64-1.8.3.tgz', - :md5 => '8bdb3e110d6391d66379c5425c1c4e6e', - :version => '1.8.3-x86_64' - }, - :i386 => { - :url => 'http://fastdl.mongodb.org/osx/mongodb-osx-i386-1.8.3.tgz', - :md5 => '5629e49d6d24a99850fb094efb98685c', - :version => '1.8.3-i386' + if ARGV.build_head? + packages = { + :x86_64 => { + :url => 'http://fastdl.mongodb.org/osx/mongodb-osx-x86_64-2.0.0-rc0.tgz', + :md5 => 'df364c1d1e4baba3a527d51b00f4cc60', + :version => '2.0.0-rc0-x86_64' + }, + :i386 => { + :url => 'http://fastdl.mongodb.org/osx/mongodb-osx-i386-2.0.0-rc0.tgz', + :md5 => '34bab47002a4f5b19171f25a2bdf4129', + :version => '2.0.0-rc0-i386' + } } - } + else + packages = { + :x86_64 => { + :url => 'http://fastdl.mongodb.org/osx/mongodb-osx-x86_64-1.8.3.tgz', + :md5 => '8bdb3e110d6391d66379c5425c1c4e6e', + :version => '1.8.3-x86_64' + }, + :i386 => { + :url => 'http://fastdl.mongodb.org/osx/mongodb-osx-i386-1.8.3.tgz', + :md5 => '5629e49d6d24a99850fb094efb98685c', + :version => '1.8.3-i386' + } + } + end package = (Hardware.is_64_bit? and not ARGV.include? '--32bit') ? packages[:x86_64] : packages[:i386] @@ -89,11 +104,20 @@ class Mongodb < Formula bind_ip = 127.0.0.1 EOS - if !ARGV.include? '--nojournal' + if ARGV.build_head? + if ARGV.include? '--nojournal' + conf += <<-EOS.undent + # Enable Write Ahead Logging (not enabled by default in production deployments) + nojournal = true + EOS + end + else + unless ARGV.include? '--nojournal' conf += <<-EOS.undent # Enable Write Ahead Logging (not enabled by default in production deployments) journal = true EOS + end end if ARGV.include? '--rest'