Created
August 28, 2012 03:26
-
-
Save ifnull/3494683 to your computer and use it in GitHub Desktop.
brew install memcached
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment