class Proftpd < Formula desc "Highly configurable GPL-licensed FTP server software" homepage "http://www.proftpd.org/" url "ftp://ftp.proftpd.org/distrib/source/proftpd-1.3.6b.tar.gz" mirror "https://fossies.org/linux/misc/proftpd-1.3.6b.tar.gz" mirror "https://ftp.osuosl.org/pub/blfs/conglomeration/proftpd/proftpd-1.3.6b.tar.gz" sha256 "fe5baf6c469a2b0b7f0e2611561b6fd5414300e32a76b96adb2ccfe05b5efb60" bottle do sha256 "deb508061dfb34bf77c92a5435cdb42bbb8a9b3084098ba39dcbfc53f013b56b" => :catalina sha256 "9abb9e0ec3f51055f7c2becadc0ba6bc911b886f32228a04c8564c51d36fc055" => :mojave sha256 "82ddf96573296e08144d4418b7aa85dfd1540150fa6c5f732a928c4147099dba" => :high_sierra end def install # fixes unknown group 'nogroup' # http://www.proftpd.org/docs/faq/linked/faq-ch4.html#AEN434 inreplace "sample-configurations/basic.conf", "nogroup", "nobody" system "./configure", "--prefix=#{prefix}", "--sysconfdir=#{etc}", "--localstatedir=#{var}" ENV.deparallelize install_user = ENV["USER"] install_group = `groups`.split[0] system "make", "INSTALL_USER=#{install_user}", "INSTALL_GROUP=#{install_group}", "install" end plist_options :manual => "proftpd" def plist; <<~EOS Label #{plist_name} RunAtLoad KeepAlive ProgramArguments #{opt_sbin}/proftpd UserName root WorkingDirectory #{HOMEBREW_PREFIX} StandardErrorPath /dev/null StandardOutPath /dev/null EOS end test do assert_match version.to_s, shell_output("#{opt_sbin}/proftpd -v") end end