2011-03-10 05:11:03 +00:00
|
|
|
class Dovecot < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "IMAP/POP3 server"
|
2014-05-21 06:42:28 +00:00
|
|
|
homepage "http://dovecot.org/"
|
2015-04-26 23:59:34 +00:00
|
|
|
url "http://dovecot.org/releases/2.2/dovecot-2.2.16.tar.gz"
|
|
|
|
mirror "https://fossies.org/linux/misc/dovecot-2.2.16.tar.gz"
|
|
|
|
sha256 "56ce1287a17fa88a2083116db00200deff1a5390af5eac1c8ae3f59a2079cff0"
|
2009-08-31 13:50:21 +00:00
|
|
|
|
2014-08-22 18:04:04 +00:00
|
|
|
bottle do
|
2015-04-27 00:09:36 +00:00
|
|
|
sha256 "c7e6a66e2c2feeaee294ce730d839476ea2ee8f6bd6e0be15d3de7f51d0c7c91" => :yosemite
|
|
|
|
sha256 "2f06258ea249f6f74d5ac21eb91456800936949ee9d92ce59baf524684c4c596" => :mavericks
|
|
|
|
sha256 "4dc666bce910531c1696c36b4082f69f6f0102cbc543c60595c686d7cc5fe45f" => :mountain_lion
|
2014-08-22 18:04:04 +00:00
|
|
|
end
|
|
|
|
|
2014-05-21 06:42:28 +00:00
|
|
|
depends_on "openssl"
|
2015-04-26 23:59:34 +00:00
|
|
|
depends_on "clucene" => :optional
|
2014-01-23 22:55:55 +00:00
|
|
|
|
2009-08-31 13:50:21 +00:00
|
|
|
def install
|
2015-04-26 23:59:34 +00:00
|
|
|
args = %W[
|
|
|
|
--prefix=#{prefix}
|
|
|
|
--disable-dependency-tracking
|
|
|
|
--libexecdir=#{libexec}
|
|
|
|
--sysconfdir=#{etc}
|
|
|
|
--localstatedir=#{var}
|
|
|
|
--with-ssl=openssl
|
|
|
|
--with-sqlite
|
|
|
|
--with-zlib
|
|
|
|
--with-bzlib
|
|
|
|
]
|
2014-01-23 22:55:55 +00:00
|
|
|
|
|
|
|
args << "--with-lucene" if build.with? "clucene"
|
|
|
|
|
|
|
|
system "./configure", *args
|
2014-01-23 22:56:54 +00:00
|
|
|
system "make", "install"
|
2009-08-31 13:50:21 +00:00
|
|
|
end
|
|
|
|
|
2015-04-26 23:59:34 +00:00
|
|
|
plist_options :startup => true
|
2014-01-23 22:56:54 +00:00
|
|
|
|
2015-04-26 23:59:34 +00:00
|
|
|
def plist; <<-EOS.undent
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
|
|
<plist version="1.0">
|
2014-01-23 22:56:54 +00:00
|
|
|
<dict>
|
2015-04-26 23:59:34 +00:00
|
|
|
<key>Label</key>
|
|
|
|
<string>#{plist_name}</string>
|
|
|
|
<key>OnDemand</key>
|
|
|
|
<false/>
|
|
|
|
<key>RunAtLoad</key>
|
|
|
|
<true/>
|
|
|
|
<key>ProgramArguments</key>
|
|
|
|
<array>
|
|
|
|
<string>#{opt_sbin}/dovecot</string>
|
|
|
|
<string>-F</string>
|
|
|
|
</array>
|
|
|
|
<key>ServiceDescription</key>
|
|
|
|
<string>Dovecot mail server</string>
|
2014-01-23 22:56:54 +00:00
|
|
|
</dict>
|
2015-04-26 23:59:34 +00:00
|
|
|
</plist>
|
|
|
|
EOS
|
|
|
|
end
|
2014-01-23 22:56:54 +00:00
|
|
|
|
2015-04-26 23:59:34 +00:00
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
For Dovecot to work, you may need to create a dovecot user
|
|
|
|
and group depending on your configuration file options.
|
2009-08-31 13:50:21 +00:00
|
|
|
EOS
|
|
|
|
end
|
2015-04-26 23:59:34 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
assert_match /#{version}/, shell_output("#{sbin}/dovecot --version")
|
|
|
|
end
|
2009-08-31 13:50:21 +00:00
|
|
|
end
|