class PureFtpd < Formula desc "Secure and efficient FTP server" homepage "http://www.pureftpd.org/" url "http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.37.tar.gz" mirror "ftp://ftp.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.37.tar.gz" sha256 "a9c10b0b8b5772fbf2212bc46fece86f9d4bcc07e58dfd83b58e42a1b2acb76c" depends_on "openssl" def install args = ["--disable-dependency-tracking", "--prefix=#{prefix}", "--mandir=#{man}", "--sysconfdir=#{etc}", "--with-pam", "--with-altlog", "--with-puredb", "--with-throttling", "--with-ratios", "--with-quotas", "--with-ftpwho", "--with-virtualhosts", "--with-virtualchroot", "--with-diraliases", "--with-peruserlimits", "--with-tls", "--with-bonjour"] args << "--with-pgsql" if which "pg_config" args << "--with-mysql" if which "mysql" 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