homebrew-core/Formula/offline-imap.rb
Berk D. Demir b13a09fec7 offlineimap 6.5.5
Closes Homebrew/homebrew#23460.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-10-23 11:58:49 +01:00

52 lines
1.5 KiB
Ruby

require 'formula'
class OfflineImap < Formula
homepage 'http://offlineimap.org/'
url 'https://github.com/OfflineIMAP/offlineimap/archive/v6.5.5.zip'
sha1 '90541e4f6d439edf0aa0afbff2b4bfc1c1f10d10'
head 'https://github.com/OfflineIMAP/offlineimap.git'
def install
prefix.install 'offlineimap.conf', 'offlineimap.conf.minimal'
libexec.install 'bin/offlineimap' => 'offlineimap.py'
libexec.install 'offlineimap'
bin.install_symlink libexec+'offlineimap.py' => 'offlineimap'
end
def caveats; <<-EOS.undent
To get started, copy one of these configurations to ~/.offlineimaprc:
* minimal configuration:
cp -n #{prefix}/offlineimap.conf.minimal ~/.offlineimaprc
* advanced configuration:
cp -n #{prefix}/offlineimap.conf ~/.offlineimaprc
EOS
end
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>KeepAlive</key>
<false/>
<key>Label</key>
<string>#{plist_name}</string>
<key>ProgramArguments</key>
<array>
<string>#{opt_prefix}/bin/offlineimap</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