vsftpd: allow building with openssl via option

Closes Homebrew/homebrew#8476.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
This commit is contained in:
Andrew J. Erickson 2011-11-06 14:59:08 -08:00 committed by Charlie Sharpsteen
parent d92d434698
commit ae82cb9723

View file

@ -5,10 +5,20 @@ class Vsftpd < Formula
md5 '2ea5d19978710527bb7444d93b67767a'
homepage 'https://security.appspot.com/vsftpd.html'
def options
[
["--openssl", "build with OpenSSL"],
]
end
# Patch so vsftpd doesn't depend on UTMPX, and can't find OS X's PAM library.
def patches; DATA; end
def install
if ARGV.include? "--openssl"
inreplace "builddefs.h", "#undef VSF_BUILD_SSL", "#define VSF_BUILD_SSL"
end
inreplace "defs.h", "/etc/vsftpd.conf", "#{etc}/vsftpd.conf"
inreplace "tunables.c", "/etc", etc
inreplace "tunables.c", "/var", var
@ -19,6 +29,15 @@ class Vsftpd < Formula
man5.install "vsftpd.conf.5"
man8.install "vsftpd.8"
end
def caveats
if ARGV.include? "--openssl"
return <<-EOD.undent
vsftpd was compiled with SSL support. To use it you must generate a SSL
certificate and set 'enable_ssl=YES' in your config file.
EOD
end
end
end
__END__