Sha256: fd7e26bbcdf2c00f1c2412926c2ff3db02b981418f5a785447553b283ada1f35

Contents?: true

Size: 730 Bytes

Versions: 2

Compression:

Stored size: 730 Bytes

Contents

require 'formula'

class MongodbPhp <Formula
  url 'http://pecl.php.net/get/mongo-1.2.2.tgz'
  homepage 'http://pecl.php.net/package/mongo'
  md5 'b589a922222bfe5a13e5b18359e87437'

  depends_on 'mongodb'
  depends_on 'autoconf' => :build

  def install
    extensions = lib + %x[php-config --extension-dir].split('lib/')[1].strip
    Dir.chdir "mongo-#{version}" do
      system "phpize"
      system "./configure", "--prefix=#{prefix}"
      system "make"

      extensions.install "modules/mongo.so"
    end

  end

  def caveats; <<-EOS.undent
    To finish installing mongodb:
     * Add the following lines to php.ini:
        [mongodb]
        extension="#{prefix}/mongo.so"
     * Restart your webserver
    EOS
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
megalodon-0.1.1 formulas/mongodb-php.rb
megalodon-0.1.0 formulas/mongodb-php.rb