ifnull
8/28/2012 - 3:26 AM

brew install memcached

brew install memcached

require 'formula'

class MemcachedPhp < Formula
  url 'http://pecl.php.net/get/memcached-2.1.0.tgz'
  homepage 'http://pecl.php.net/package/memcached'
  sha1 '16fac6bfae8ec7e2367fda588b74df88c6f11a8e'


  depends_on 'libmemcached'

  def install
    Dir.chdir "memcached-#{version}" do
      # See https://github.com/mxcl/homebrew/pull/5947
      ENV.universal_binary
      system "phpize"
      system "./configure", "--prefix=#{prefix}"
      system "make"
      prefix.install 'modules/memcached.so'
    end
  end

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