require 'formula' class Memcached < Formula homepage 'http://memcached.org/' url "http://memcached.googlecode.com/files/memcached-1.4.15.tar.gz" sha1 '12ec84011f408846250a462ab9e8e967a2e8cbbc' depends_on 'libevent' option "enable-sasl", "Enable SASL support -- disables ASCII protocol!" option "enable-sasl-pwdb", "Enable SASL with memcached's own plain text password db support -- disables ASCII protocol!" conflicts_with 'mysql-cluster', :because => 'both install `bin/memcached`' def install args = ["--prefix=#{prefix}", "--disable-coverage"] args << "--enable-sasl" if build.include? "enable-sasl" args << "--enable-sasl-pwdb" if build.include? "enable-sasl-pwdb" system "./configure", *args system "make install" end plist_options :manual => "#{HOMEBREW_PREFIX}/opt/memcached/bin/memcached" def plist; <<-EOS.undent Label #{plist_name} KeepAlive ProgramArguments #{opt_prefix}/bin/memcached -l localhost RunAtLoad WorkingDirectory #{HOMEBREW_PREFIX} EOS end end