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.2/isync-1.2.2.tar.gz" sha256 "d9197e27bfe77e3d8971f4fcb25ec37b2506827c4bc9439b72376caa091ce877" bottle do cellar :any sha256 "ae610fd466221c43e21699d087cd1b63808845782c0420b53d56bf895b6a4b53" => :sierra sha256 "c7fb30472091072e7e461913ed0aacf2b5653c60c4daae86db5ca13614bae4f5" => :el_capitan sha256 "264399ce5b39f9b5f67d5d528e509c870dd0588569d5f2f0964f401c9813969f" => :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