Files

105 lines
3.5 KiB
Tcl

# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
PortSystem 1.0
name vsftpd
version 3.0.5
revision 1
categories net
license {GPL-2 OpenSSLException}
platforms darwin
maintainers nomaintainer
description Secure FTP server for UNIX systems
long_description vsftpd is an FTP server, or daemon. The 'vs' stands for \
Very Secure. Obviously this is not a guarantee, but a \
reflection that it is written with security in mind, and \
carefully designed to be resilient to attack.
homepage https://security.appspot.com/vsftpd.html
master_sites https://security.appspot.com/downloads/
checksums rmd160 f308bbd0b214a1af7438b1f84e9b12cacf06858d \
sha256 26b602ae454b0ba6d99ef44a09b6b9e0dfa7f67228106736df1f278c70bc91d3 \
size 197778
patchfiles patch-sysdeputil.c.diff \
patch-vsf_findlibs.sh.diff \
patch-vsftpd.conf.diff \
patch-Makefile.diff \
patch-sysutil.c.diff
configure {
reinplace "s|/etc/|${prefix}/etc/|g" \
${worksrcpath}/Makefile \
${worksrcpath}/defs.h \
${worksrcpath}/tunables.c \
${worksrcpath}/vsftpd.8 \
${worksrcpath}/vsftpd.conf
reinplace "s|/var/|${prefix}/var/|g" \
${worksrcpath}/tunables.c \
${worksrcpath}/vsftpd.conf.5 \
${worksrcpath}/vsftpd.conf
reinplace "s|/usr/share/empty|${prefix}/var/empty|g" \
${worksrcpath}/tunables.c
reinplace "s|/usr/share/ssl/|${prefix}/share/ssl/|g" \
${worksrcpath}/tunables.c
reinplace "s|/etc/vsftpd|${prefix}/etc/vsftpd|g" \
${worksrcpath}/vsftpd.conf.5
reinplace "s|/usr/local/man|${destroot}${prefix}/share/man|g" \
${worksrcpath}/Makefile
reinplace "s|/usr/local|${destroot}${prefix}|g" \
${worksrcpath}/Makefile
reinplace "s|-Werror||g" ${worksrcpath}/Makefile
}
build.args-append CC=${configure.cc}
build.target
startupitem.create yes
startupitem.name ${name}
startupitem.executable ${prefix}/sbin/${name} ${prefix}/etc/${name}.conf
post-destroot {
xinstall ${worksrcpath}/vsftpd.conf ${destroot}${prefix}/etc/vsftpd.conf.sample
set docdir ${destroot}${prefix}/share/doc/${name}-${version}
xinstall -d ${docdir}
xinstall -m 644 -W ${worksrcpath} AUDIT BENCHMARKS BUGS COPYING FAQ LICENSE \
README README.security README.ssl SIZE SPEED TODO TUNING \
${docdir}
file copy ${worksrcpath}/EXAMPLE ${docdir}
file copy ${worksrcpath}/SECURITY ${docdir}
}
post-activate {
if {![file exists ${prefix}/etc/vsftpd.conf]} {
copy ${prefix}/etc/vsftpd.conf.sample \
${prefix}/etc/vsftpd.conf
}
}
destroot.keepdirs "${destroot}${prefix}/var/empty/" \
"${destroot}${prefix}/var/log/"
variant ssl description "Enable SSL support" {
depends_lib-append path:lib/libssl.dylib:openssl
post-configure {
reinplace "s|#undef VSF_BUILD_SSL|#define VSF_BUILD_SSL|" \
${worksrcpath}/builddefs.h
}
build.env-append LDFLAGS=${configure.ldflags}
}
platform darwin 9 {
patchfiles-append oldpam.diff
}
notes "To configure ${name} edit ${prefix}/etc/vsftpd.conf."
livecheck.type regex
livecheck.url ${homepage}
livecheck.regex "vsftpd-(\\d+(?:\\.\\d+)*)"