2011-05-06 08:21:04 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class MongoPhp < Formula
|
2011-08-19 16:33:08 +00:00
|
|
|
url 'http://pecl.php.net/get/mongo-1.2.2.tgz'
|
2011-05-06 08:21:04 +00:00
|
|
|
homepage 'http://pecl.php.net/package/mongo'
|
2011-08-19 16:33:08 +00:00
|
|
|
md5 'b589a922222bfe5a13e5b18359e87437'
|
2011-05-06 08:21:04 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
Dir.chdir "mongo-#{version}" do
|
|
|
|
system "phpize"
|
|
|
|
system "./configure", "--prefix=#{prefix}"
|
|
|
|
system "make"
|
2011-06-17 03:16:58 +00:00
|
|
|
prefix.install "modules/mongo.so"
|
2011-05-06 08:21:04 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
To finish installing MongoDB extension:
|
|
|
|
* Add the following lines to #{etc}/php.ini:
|
|
|
|
[mongo]
|
|
|
|
extension="#{prefix}/mongo.so"
|
|
|
|
* Restart your webserver
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|