homebrew-core/Formula/dovecot.rb
Leandro Facchinetti 1f38926af5 dovecot: fix pigeonhole unfinished features option
Closes Homebrew/homebrew#46371.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2015-11-26 01:29:36 +00:00

99 lines
2.9 KiB
Ruby

class Dovecot < Formula
desc "IMAP/POP3 server"
homepage "http://dovecot.org/"
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"
bottle do
revision 2
sha256 "7cd19bd919795c966252e4fe1208e82a45479b02dd2bc7af083a5076b4256b7f" => :el_capitan
sha256 "086923e8cbcda311630328f76df479b7362c2966d349f7e05b855404f6610d3f" => :yosemite
sha256 "23d888317ae30125f810ad24a2110af0f79be47e0104abecb5dd78a972803309" => :mavericks
end
option "with-pam", "Build with PAM support"
option "with-pigeonhole", "Add Sieve addon for Dovecot mailserver"
option "with-pigeonhole-unfinished-features", "Build unfinished new Sieve addon features/extensions"
depends_on "openssl"
depends_on "clucene" => :optional
resource "pigeonhole" do
url "http://pigeonhole.dovecot.org/releases/2.2/dovecot-2.2-pigeonhole-0.4.8.tar.gz"
sha256 "d73c1c5a11cdfdcb58304a1c1272cce6c8e1868e3f61d393b3b8a725f3bf665b"
end
def install
args = %W[
--prefix=#{prefix}
--disable-dependency-tracking
--libexecdir=#{libexec}
--sysconfdir=#{etc}
--localstatedir=#{var}
--with-ssl=openssl
--with-sqlite
--with-zlib
--with-bzlib
]
args << "--with-lucene" if build.with? "clucene"
args << "--with-pam" if build.with? "pam"
system "./configure", *args
system "make", "install"
if build.with? "pigeonhole"
resource("pigeonhole").stage do
args = %W[
--disable-dependency-tracking
--with-dovecot=#{lib}/dovecot
--prefix=#{prefix}
]
args << "--with-unfinished-features" if build.with? "pigeonhole-unfinished-features"
system "./configure", *args
system "make"
system "make", "install"
end
end
end
plist_options :startup => true
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">
<dict>
<key>Label</key>
<string>#{plist_name}</string>
<key>KeepAlive</key>
<false/>
<key>RunAtLoad</key>
<true/>
<key>ProgramArguments</key>
<array>
<string>#{opt_sbin}/dovecot</string>
<string>-F</string>
</array>
<key>StandardErrorPath</key>
<string>#{var}/log/dovecot/dovecot.log</string>
<key>StandardOutPath</key>
<string>#{var}/log/dovecot/dovecot.log</string>
</dict>
</plist>
EOS
end
def caveats; <<-EOS.undent
For Dovecot to work, you may need to create a dovecot user
and group depending on your configuration file options.
EOS
end
test do
assert_match /#{version}/, shell_output("#{sbin}/dovecot --version")
end
end