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.2.1/isync-1.2.1.tar.gz" sha256 "e716de28c9a08e624a035caae3902fcf3b511553be5d61517a133e03aa3532ae" revision 1 bottle do cellar :any sha256 "d4d22c5cb4efbd4b8378287930031b201d5108f2280c1606a7c9b7068bca7f1e" => :sierra sha256 "dabc0f978a20e521315c850f284b171d33b2e534b08d4a4da852cae984ec56f5" => :el_capitan sha256 "969e22c9a348a2c2178912beefcaeca26cecc95834b2d8afc9f725847413463b" => :yosemite end head do url "https://git.code.sf.net/p/isync/isync.git" depends_on "autoconf" => :build depends_on "automake" => :build end depends_on "openssl" depends_on "berkeley-db" => :optional def install system "./autogen.sh" if build.head? args = %W[ --disable-dependency-tracking --prefix=#{prefix} --disable-silent-rules ] args << "ac_cv_berkdb4=no" if build.without? "berkeley-db" system "./configure", *args system "make", "install" end plist_options :manual => "isync" def plist; <<-EOS.undent EnvironmentVariables PATH /usr/bin:/bin:/usr/sbin:/sbin:#{HOMEBREW_PREFIX}/bin KeepAlive Label #{plist_name} ProgramArguments #{opt_bin}/mbsync Periodic StartInterval 300 RunAtLoad StandardErrorPath /dev/null StandardOutPath /dev/null EOS end test do system bin/"get-cert", "duckduckgo.com:443" end end