Skip to content

Instantly share code, notes, and snippets.

@magicento
Forked from ifnull/memcache-php.rb
Last active August 29, 2015 14:22
Show Gist options
  • Save magicento/6b51df9fd87fe2bb59c5 to your computer and use it in GitHub Desktop.
Save magicento/6b51df9fd87fe2bb59c5 to your computer and use it in GitHub Desktop.
require 'formula'
class MemcachePhp < Formula
url 'http://pecl.php.net/get/memcache-3.0.6.tgz'
homepage 'http://pecl.php.net/package/memcache'
sha1 'eb0c922df3f5ca459bcce85e141f379d3b490ca7'
def install
Dir.chdir "memcache-#{version}" do
# See https://github.com/mxcl/homebrew/pull/5947
ENV.universal_binary
system "phpize"
system "./configure", "--prefix=#{prefix}"
system "make"
prefix.install 'modules/memcache.so'
end
end
def caveats; <<-EOS.undent
To finish installing memcache:
* Add the following line to php.ini:
extension="#{prefix}/memcache.so"
* Restart your webserver
EOS
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment