class PureFtpd < Formula desc "Secure and efficient FTP server" homepage "https://www.pureftpd.org/" url "https://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.44.tar.gz" mirror "ftp://ftp.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.44.tar.gz" sha256 "38b3b613a48ae50f4f681b2e8a56503a11ea531df61bc7916ff6cbeb381b64da" bottle do sha256 "4f3743bf4cbb5b60dc5711706df379b8815f9bcba6adaa2b31e30fe11b037f9b" => :sierra sha256 "10fbab7ef2764b2e73a0ce6cf05cbd690c2a588510e849ba9b07ad8f471e4a1d" => :el_capitan sha256 "124a7cfc3b61fafeb24e0d30bd1b3ed3845520172b457940c89a37481995e1d7" => :yosemite end option "with-virtualchroot", "Follow symbolic links even for chrooted accounts" depends_on "libsodium" depends_on "openssl" depends_on :postgresql => :optional depends_on :mysql => :optional def install args = %W[ --disable-dependency-tracking --prefix=#{prefix} --mandir=#{man} --sysconfdir=#{etc} --with-everything --with-pam --with-tls --with-bonjour ] args << "--with-pgsql" if build.with? "postgresql" args << "--with-mysql" if build.with? "mysql" args << "--with-virtualchroot" if build.with? "virtualchroot" system "./configure", *args system "make", "install" end plist_options :manual => "pure-ftpd" def plist; <<-EOS.undent KeepAlive Label #{plist_name} ProgramArguments #{opt_sbin}/pure-ftpd -A -j -z RunAtLoad WorkingDirectory #{var} StandardErrorPath #{var}/log/pure-ftpd.log StandardOutPath #{var}/log/pure-ftpd.log EOS end test do system bin/"pure-pw", "--help" end end