48481e30f4
Closes #1931. Signed-off-by: Tomasz Pajor <tomek@polishgeeks.com>
63 lines
1.9 KiB
Ruby
63 lines
1.9 KiB
Ruby
class Offlineimap < Formula
|
|
desc "Synchronizes emails between two repositories"
|
|
homepage "http://offlineimap.org/"
|
|
url "https://github.com/OfflineIMAP/offlineimap/archive/v6.7.0.1.tar.gz"
|
|
sha256 "00e91ff782217506dd91f502d094ef0daa27732cfc68c914029aefc1c53642fb"
|
|
head "https://github.com/OfflineIMAP/offlineimap.git"
|
|
|
|
bottle :unneeded
|
|
|
|
def install
|
|
etc.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 #{etc}/offlineimap.conf.minimal ~/.offlineimaprc
|
|
|
|
* advanced configuration:
|
|
cp -n #{etc}/offlineimap.conf ~/.offlineimaprc
|
|
EOS
|
|
end
|
|
|
|
plist_options :manual => "offlineimap"
|
|
|
|
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>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}/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
|
|
|
|
test do
|
|
system bin/"offlineimap", "--version"
|
|
end
|
|
end
|