512758e6eb
Realign trailing EOS.
61 lines
2.1 KiB
Ruby
61 lines
2.1 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.6.tar.gz"
|
|
sha256 "91ef74b143495d5ff97c4d4770c6804072a8c8eb1ad1ecc8cc541b40e152ecaf"
|
|
|
|
bottle do
|
|
sha256 "58c448066f5eeb96a68b8b5727e0f83ae83857aeec7a2354c501b5f6a6405cf8" => :high_sierra
|
|
sha256 "ff7d5535f7aeb76aab782bdfb534ae22b3109840228c0c93ad6e7dcfecb56f5f" => :sierra
|
|
sha256 "4ac3a9a6ab8a21e05d82fefae042d7b94e920d5f3d172485202364b489d9d629" => :el_capitan
|
|
sha256 "ebf19b0218a7e3897457f91c6721a59ef897329db3f49461415b56168361a2d8" => :yosemite
|
|
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
|