Skip to content

Instantly share code, notes, and snippets.

@ifnull
Created August 28, 2012 05:04
Show Gist options
  • Save ifnull/3495098 to your computer and use it in GitHub Desktop.
Save ifnull/3495098 to your computer and use it in GitHub Desktop.
brew install memcache
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