homebrew-core/Formula/davmail.rb
2018-06-14 23:39:28 -07:00

47 lines
1.4 KiB
Ruby

class Davmail < Formula
desc "POP/IMAP/SMTP/Caldav/Carddav/LDAP exchange gateway"
homepage "https://davmail.sourceforge.io/"
url "https://downloads.sourceforge.net/project/davmail/davmail/4.8.6/davmail-4.8.6-2600.zip"
version "4.8.6"
sha256 "b7259eb174f1969aae4e18c33c8880b192fa9ac2d49d22fb8d9e6243569764f2"
bottle :unneeded
def install
libexec.install Dir["*"]
bin.write_jar_script libexec/"davmail.jar", "davmail", "-Djava.awt.headless=true"
end
plist_options :manual => "davmail"
def plist; <<~EOS
<?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>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/usr/bin:/bin:/usr/sbin:/sbin:#{HOMEBREW_PREFIX}/bin</string>
</dict>
<key>KeepAlive</key>
<false/>
<key>Label</key>
<string>#{plist_name}</string>
<key>ProgramArguments</key>
<array>
<string>#{opt_bin}/davmail</string>
</array>
<key>StartInterval</key>
<integer>300</integer>
<key>RunAtLoad</key>
<true />
<key>StandardErrorPath</key>
<string>/dev/null</string>
<key>StandardOutPath</key>
<string>/dev/null</string>
</dict>
</plist>
EOS
end
end