homebrew-core/Formula/memcached.rb

62 lines
1.8 KiB
Ruby
Raw Normal View History

2011-03-10 05:11:03 +00:00
class Memcached < Formula
2014-05-21 06:36:05 +00:00
homepage "http://memcached.org/"
url "http://www.memcached.org/files/memcached-1.4.20.tar.gz"
sha1 "282a1e701eeb3f07159d95318f09da5ea3fcb39d"
2009-08-30 00:07:52 +00:00
2014-02-23 12:31:08 +00:00
bottle do
2014-12-18 13:06:02 +00:00
revision 1
sha1 "2ca88974fa882f7390c1a65e6d263af0270086e0" => :yosemite
sha1 "16d1e5a2dba018a66fc91da77ae86f6dd7e1ad7d" => :mavericks
sha1 "c881c40cc40361c05fa8195f7b84f7a516524a75" => :mountain_lion
2014-02-23 12:31:08 +00:00
end
2014-05-21 06:36:05 +00:00
depends_on "libevent"
2009-08-30 00:07:52 +00:00
2014-12-27 16:10:06 +00:00
option "with-sasl", "Enable SASL support -- disables ASCII protocol!"
option "with-sasl-pwdb", "Enable SASL with memcached's own plain text password db support -- disables ASCII protocol!"
deprecated_option "enable-sasl" => "with-sasl"
deprecated_option "enable-sasl-pwdb" => "with-sasl-pwdb"
2014-05-21 06:36:05 +00:00
conflicts_with "mysql-cluster", :because => "both install `bin/memcached`"
2013-11-16 08:18:44 +00:00
2009-08-30 00:07:52 +00:00
def install
args = ["--prefix=#{prefix}", "--disable-coverage"]
2014-12-27 16:10:06 +00:00
args << "--enable-sasl" if build.with? "sasl"
args << "--enable-sasl-pwdb" if build.with? "sasl-pwdb"
system "./configure", *args
2014-12-27 16:10:06 +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>
2014-03-06 05:28:31 +00:00
<string>#{opt_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
2014-12-27 16:10:06 +00:00
test do
system "#{bin}/memcached", "-h"
end
2009-08-30 00:07:52 +00:00
end