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-06-26 14:04:11 +00:00
|
|
|
url "http://dovecot.org/releases/2.2/dovecot-2.2.18.tar.gz"
|
|
|
|
mirror "https://fossies.org/linux/misc/dovecot-2.2.18.tar.gz"
|
|
|
|
sha256 "b6d8468cea47f1227f47b80618f7fb872e2b2e9d3302adc107a005dd083865bb"
|
2009-08-31 13:50:21 +00:00
|
|
|
|
2014-08-22 18:04:04 +00:00
|
|
|
bottle do
|
2015-09-10 17:48:08 +00:00
|
|
|
revision 1
|
2015-09-24 13:56:15 +00:00
|
|
|
sha256 "c4d12d64c360b9f5f45925695e25f23d8adea7ca1241fc9232be4657f88094c6" => :el_capitan
|
2015-09-10 17:48:08 +00:00
|
|
|
sha256 "b0213868f3a9db6992b04d688209c8d35aa472beeb2fd03b937f112857e7f0c0" => :yosemite
|
|
|
|
sha256 "03c6c26881f816b9206efe6ff97df76ceb179696466f8f177ce3d625ad270e2c" => :mavericks
|
|
|
|
sha256 "54ed311a625d029291a644117a3a16c0d9b5ab1158c0ceffe229635ca3a62008" => :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
|
|
|
|
2015-06-26 14:04:11 +00:00
|
|
|
option "with-pam", "Build with PAM support"
|
|
|
|
|
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"
|
2015-06-26 14:04:11 +00:00
|
|
|
args << "--with-pam" if build.with? "pam"
|
2014-01-23 22:55:55 +00:00
|
|
|
|
|
|
|
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>
|
2015-09-10 13:22:46 +00:00
|
|
|
<key>KeepAlive</key>
|
2015-04-26 23:59:34 +00:00
|
|
|
<false/>
|
|
|
|
<key>RunAtLoad</key>
|
|
|
|
<true/>
|
|
|
|
<key>ProgramArguments</key>
|
|
|
|
<array>
|
|
|
|
<string>#{opt_sbin}/dovecot</string>
|
|
|
|
<string>-F</string>
|
|
|
|
</array>
|
2015-06-26 14:04:11 +00:00
|
|
|
<key>StandardErrorPath</key>
|
|
|
|
<string>#{var}/log/dovecot/dovecot.log</string>
|
|
|
|
<key>StandardOutPath</key>
|
|
|
|
<string>#{var}/log/dovecot/dovecot.log</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
|