homebrew-core/Formula/memcached.rb

56 lines
1.7 KiB
Ruby
Raw Normal View History

require 'formula'
2009-08-30 00:07:52 +00:00
2011-03-10 05:11:03 +00:00
class Memcached < Formula
homepage 'http://memcached.org/'
url 'http://www.memcached.org/files/memcached-1.4.17.tar.gz'
sha1 '2b4fc706d39579cf355e3358cfd27b44d40bd79c'
2009-08-30 00:07:52 +00:00
2014-02-23 12:31:08 +00:00
bottle do
sha1 "9659921b7f83252f74fd71c9d89b0f087a987c39" => :mavericks
sha1 "56150a0077821d1758073238e8bac39f0028b6df" => :mountain_lion
sha1 "f0b6c864165782512b716f71853f6e24d57fdbda" => :lion
end
depends_on 'libevent'
2009-08-30 00:07:52 +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!"
2013-11-16 08:18:44 +00:00
conflicts_with 'mysql-cluster', :because => 'both install `bin/memcached`'
2009-08-30 00:07:52 +00:00
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
2009-08-30 00:07:52 +00:00
system "make install"
2009-11-05 09:18:23 +00:00
end
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