64 lines
2.2 KiB
Ruby
64 lines
2.2 KiB
Ruby
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.6c.tar.gz"
|
|
mirror "https://fossies.org/linux/misc/proftpd-1.3.6c.tar.gz"
|
|
mirror "https://ftp.osuosl.org/pub/blfs/conglomeration/proftpd/proftpd-1.3.6c.tar.gz"
|
|
sha256 "fa3541c4b34136a7b80cb12a2f6f9a0cab5118a5b0a1653d40af49c6479c35ad"
|
|
|
|
bottle do
|
|
sha256 "096d6a619238c4077e541a3cd9e2b9f68aaf1d89ce5c6fa5432d31a25f66115f" => :catalina
|
|
sha256 "4ca5576cb0fa5a34b9497c0f0717014729f06214a41389db42e45264703a7182" => :mojave
|
|
sha256 "eb14442fb150bcae6314a12df485a705277f8c6cc5ea679347dedea3d065bedf" => :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
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
<plist version="1.0">
|
|
<dict>
|
|
<key>Label</key>
|
|
<string>#{plist_name}</string>
|
|
<key>RunAtLoad</key>
|
|
<true/>
|
|
<key>KeepAlive</key>
|
|
<false/>
|
|
<key>ProgramArguments</key>
|
|
<array>
|
|
<string>#{opt_sbin}/proftpd</string>
|
|
</array>
|
|
<key>UserName</key>
|
|
<string>root</string>
|
|
<key>WorkingDirectory</key>
|
|
<string>#{HOMEBREW_PREFIX}</string>
|
|
<key>StandardErrorPath</key>
|
|
<string>/dev/null</string>
|
|
<key>StandardOutPath</key>
|
|
<string>/dev/null</string>
|
|
</dict>
|
|
</plist>
|
|
EOS
|
|
end
|
|
|
|
test do
|
|
assert_match version.to_s, shell_output("#{opt_sbin}/proftpd -v")
|
|
end
|
|
end
|