60 lines
2 KiB
Ruby
60 lines
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.5d.tar.gz"
|
|
sha256 "f4e2997be7f22a5b31d7ac72497ed4f4471d24d32385978350410713e76129ac"
|
|
|
|
bottle do
|
|
sha256 "b8ce132ef4cf864ae2c4d5cde3b118182f5264034f72b71d337c370b242daa39" => :sierra
|
|
sha256 "ab2c7ca148715c53e120508406a279bba028bfae719ff935438bfb45062733a6" => :el_capitan
|
|
sha256 "b246efcec181bc4154a7bc4318c59e357ab07af819987ffacaf12aa3f41ca1cf" => :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.undent
|
|
<?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
|