Skip to content

Instantly share code, notes, and snippets.

@wallynm
Created October 25, 2013 14:39
Show Gist options
  • Save wallynm/7155703 to your computer and use it in GitHub Desktop.
Save wallynm/7155703 to your computer and use it in GitHub Desktop.
require File.join(File.dirname(__FILE__), 'abstract-php-extension')
class Php54Mongo < AbstractPhp54Extension
init
homepage 'http://pecl.php.net/package/mongo'
url 'http://pecl.php.net/get/mongo-1.4.4.tgz'
sha1 '9cc3b308c6dccb4bbf376fce4bcc2268aa7a7c1d'
head 'https://github.com/mongodb/mongo-php-driver.git'
def install
Dir.chdir "mongo-#{version}" unless build.head?
ENV.universal_binary if build.universal?
safe_phpize
system "./configure", "--prefix=#{prefix}",
phpconfig
system "make"
prefix.install "modules/mongo.so"
write_config_file unless build.include? "without-config-file"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment