homebrew-core/Formula/isync.rb

79 lines
2.2 KiB
Ruby

class Isync < Formula
desc "Synchronize a maildir with an IMAP server"
homepage "https://isync.sourceforge.io/"
url "https://downloads.sourceforge.net/project/isync/isync/1.3.2/isync-1.3.2.tar.gz"
sha256 "9106d1428c912f421a659a22c3c4dbe9fe110f3f4da1498038e6ebf8d284e805"
head "https://git.code.sf.net/p/isync/isync.git"
bottle do
cellar :any
sha256 "a962b44d6115447a76213e3671710a087c962301c5e238ef9ed942fa9b1ebb59" => :catalina
sha256 "c29fd93d72cd3edc638949433305b3298ebdd125ad1a87a4cb7d8fb6344e10e8" => :mojave
sha256 "469834994c352a202afd451688c5475328910dfce811c88c6e0f0dadbf3e8e09" => :high_sierra
end
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "berkeley-db"
depends_on "openssl@1.1"
uses_from_macos "zlib"
def install
# Regenerated for HEAD, and because of our patch
if build.head?
system "./autogen.sh"
else
system "autoreconf", "-fiv"
end
args = %W[
--disable-dependency-tracking
--prefix=#{prefix}
--disable-silent-rules
]
system "./configure", *args
system "make", "install"
end
plist_options manual: "isync"
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}/mbsync</string>
<string>-a</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/"mbsync-get-cert", "duckduckgo.com:443"
end
end