2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-08-30 00:07:52 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Memcached < Formula
|
2011-09-05 05:11:54 +00:00
|
|
|
homepage 'http://memcached.org/'
|
2012-09-21 19:57:40 +00:00
|
|
|
url "http://memcached.googlecode.com/files/memcached-1.4.15.tar.gz"
|
|
|
|
sha1 '12ec84011f408846250a462ab9e8e967a2e8cbbc'
|
2009-08-30 00:07:52 +00:00
|
|
|
|
2009-09-18 18:16:39 +00:00
|
|
|
depends_on 'libevent'
|
2009-08-30 00:07:52 +00:00
|
|
|
|
2012-08-31 20:41:37 +00:00
|
|
|
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!"
|
2011-01-12 18:12:31 +00:00
|
|
|
|
2009-08-30 00:07:52 +00:00
|
|
|
def install
|
2012-08-31 20:41:37 +00:00
|
|
|
args = ["--prefix=#{prefix}", "--disable-coverage"]
|
|
|
|
args << "--enable-sasl" if build.include? "enable-sasl"
|
|
|
|
args << "--enable-sasl-pwdb" if build.include? "enable-sasl-pwdb"
|
2011-01-12 18:12:31 +00:00
|
|
|
|
|
|
|
system "./configure", *args
|
2009-08-30 00:07:52 +00:00
|
|
|
system "make install"
|
2009-11-05 09:18:23 +00:00
|
|
|
end
|
|
|
|
|
2012-11-25 15:06:41 +00:00
|
|
|
plist_options :manual => "#{HOMEBREW_PREFIX}/opt/memcached/bin/memcached"
|
|
|
|
|
|
|
|
def plist; <<-EOS.undent
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
|
|
<plist version="1.0">
|
|
|
|
<dict>
|
|
|
|
<key>Label</key>
|
|
|
|
<string>#{plist_name}</string>
|
|
|
|
<key>KeepAlive</key>
|
|
|
|
<true/>
|
|
|
|
<key>ProgramArguments</key>
|
|
|
|
<array>
|
|
|
|
<string>#{opt_prefix}/bin/memcached</string>
|
|
|
|
<string>-l</string>
|
|
|
|
<string>localhost</string>
|
|
|
|
</array>
|
|
|
|
<key>RunAtLoad</key>
|
|
|
|
<true/>
|
|
|
|
<key>WorkingDirectory</key>
|
|
|
|
<string>#{HOMEBREW_PREFIX}</string>
|
|
|
|
</dict>
|
|
|
|
</plist>
|
2009-11-05 09:18:23 +00:00
|
|
|
EOS
|
|
|
|
end
|
2009-08-30 00:07:52 +00:00
|
|
|
end
|