diff options
| author | Steven Kallstrom | 2011-04-15 22:49:01 -0500 |
|---|---|---|
| committer | Adam Vandenberg | 2011-06-08 21:21:29 -0700 |
| commit | df909ce82e302b934e06df5ca16d59c951160050 (patch) | |
| tree | 39aa3a0f23a61de627b9347d0bf9b530da6b3485 /Library | |
| parent | 43a58e90187d02b0d1dc6df1c0bc3160309ad1b6 (diff) | |
| download | homebrew-df909ce82e302b934e06df5ca16d59c951160050.tar.bz2 | |
offline-imap 6.3.2.1
add offlineimap alias, sample configurations, plist, and caveats to instruct
user getting started with a sample configuration and installing plist into
lauchd to start offlineimap on startup and on have it run every 5 minutes
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
| l--------- | Library/Aliases/offlineimap | 1 | ||||
| -rw-r--r-- | Library/Formula/offline-imap.rb | 57 |
2 files changed, 55 insertions, 3 deletions
diff --git a/Library/Aliases/offlineimap b/Library/Aliases/offlineimap new file mode 120000 index 000000000..e0e084cd9 --- /dev/null +++ b/Library/Aliases/offlineimap @@ -0,0 +1 @@ +../Formula/offline-imap.rb
\ No newline at end of file diff --git a/Library/Formula/offline-imap.rb b/Library/Formula/offline-imap.rb index 17d93f453..42df27f0c 100644 --- a/Library/Formula/offline-imap.rb +++ b/Library/Formula/offline-imap.rb @@ -1,14 +1,65 @@ require 'formula' class OfflineImap < Formula - url "https://github.com/downloads/rue/offlineimap/offlineimap-6.2.0.tar.gz" - homepage "https://github.com/rue/offlineimap" - md5 "919ad6f71b8437ad0a08a5fdeae9cb67" + url "https://github.com/nicolas33/offlineimap.git", :tag => 'v6.3.2.1' + version '6.3.2.1' + homepage "http://offlineimap.org/" def install libexec.install 'bin/offlineimap' => 'offlineimap.py' libexec.install 'offlineimap' + prefix.install [ 'offlineimap.conf', 'offlineimap.conf.minimal' ] bin.mkpath ln_s libexec+'offlineimap.py', bin+'offlineimap' + (prefix+'org.offlineimap.plist').write startup_plist + 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 + + + To launch on startup and run every 5 minutes: + * if this is your first install: + mkdir -p ~/Library/LaunchAgents + cp #{prefix}/org.offlineimap.plist ~/Library/LaunchAgents/ + launchctl load -w ~/Library/LaunchAgents/org.offlineimap.plist + + * if this is an upgrade and you already have the org.offlineimap.plist loaded: + launchctl unload -w ~/Library/LaunchAgents/org.offlineimap.plist + cp #{prefix}/org.offlineimap.plist ~/Library/LaunchAgents/ + launchctl load -w ~/Library/LaunchAgents/org.offlineimap.plist + + EOS + end + + def startup_plist; <<-EOPLIST.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>org.offlineimap</string> + <key>ProgramArguments</key> + <array> + <string>/usr/local/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> + EOPLIST end end |
