source: trunk/dports/net/vsftpd/Portfile

Last change on this file was 139229, checked in by jeremyhu@…, 2 years ago

misc: Change port:openssl dependency to path:lib/libssl.dylib:openssl

This should allow usage of libressl as a replacement for openssl in relevant
ports. Not all ports have been tested, but libressl aims for API
compatibility with OpenSSL, so it is expected to work.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.5 KB
Line 
1# -*- 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
2# $Id: Portfile 139229 2015-08-08 03:10:35Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                vsftpd
7version             3.0.2
8revision            1
9categories          net
10license             {GPL-2 OpenSSLException}
11platforms           darwin
12maintainers         nomaintainer
13
14description         Secure FTP server for UNIX systems
15long_description    vsftpd is an FTP server, or daemon. The 'vs' stands for \
16                    Very Secure. Obviously this is not a guarantee, but a \
17                    reflection that it is written with security in mind, and \
18                    carefully designed to be resilient to attack.
19
20homepage            https://security.appspot.com/vsftpd.html
21master_sites        https://security.appspot.com/downloads/
22
23checksums           md5     8b00c749719089401315bd3c44dddbb2 \
24                    sha1    f36976bb1c5df25ac236d8a29e965ba2b825ccd0 \
25                    rmd160  35005dcc03537259338b5ea199df679221df362f
26                   
27patchfiles          patch-sysdeputil.c.diff \
28                    patch-vsf_findlibs.sh.diff \
29                    patch-vsftpd.conf.diff \
30                    patch-Makefile.diff
31
32configure {
33    reinplace "s|/etc/|${prefix}/etc/|g" \
34        ${worksrcpath}/Makefile \
35        ${worksrcpath}/defs.h \
36        ${worksrcpath}/tunables.c \
37        ${worksrcpath}/vsftpd.8 \
38        ${worksrcpath}/vsftpd.conf
39    reinplace "s|/var/|${prefix}/var/|g" \
40        ${worksrcpath}/tunables.c \
41        ${worksrcpath}/vsftpd.conf.5 \
42        ${worksrcpath}/vsftpd.conf
43    reinplace "s|/usr/share/empty|${prefix}/var/empty|g" \
44        ${worksrcpath}/tunables.c
45    reinplace "s|/usr/share/ssl/|${prefix}/share/ssl/|g" \
46        ${worksrcpath}/tunables.c
47    reinplace "s|/etc/vsftpd|${prefix}/etc/vsftpd|g" \
48        ${worksrcpath}/vsftpd.conf.5
49
50    reinplace "s|/usr/local/man|${destroot}${prefix}/share/man|g" \
51        ${worksrcpath}/Makefile
52    reinplace "s|/usr/local|${destroot}${prefix}|g" \
53        ${worksrcpath}/Makefile
54    reinplace "s|-Werror||g" ${worksrcpath}/Makefile
55}
56
57build.target
58
59startupitem.create yes
60startupitem.name ${name}
61startupitem.executable ${prefix}/sbin/${name} ${prefix}/etc/${name}.conf
62
63post-destroot {
64    xinstall ${worksrcpath}/vsftpd.conf ${destroot}${prefix}/etc/vsftpd.conf.sample
65    set docdir ${destroot}${prefix}/share/doc/${name}-${version}
66    xinstall -d ${docdir}
67    xinstall -m 644 -W ${worksrcpath} AUDIT BENCHMARKS BUGS COPYING FAQ LICENSE \
68        README README.security README.ssl SIZE SPEED TODO TUNING \
69        ${docdir}
70    file copy ${worksrcpath}/EXAMPLE ${docdir}
71    file copy ${worksrcpath}/SECURITY ${docdir}
72}
73
74post-activate {
75    if {![file exists ${prefix}/etc/vsftpd.conf]} {
76        copy ${prefix}/etc/vsftpd.conf.sample \
77            ${prefix}/etc/vsftpd.conf
78    }
79}
80
81destroot.keepdirs   "${destroot}${prefix}/var/empty/" \
82                    "${destroot}${prefix}/var/log/"
83
84variant ssl description "Enable SSL support" {
85    depends_lib-append  path:lib/libssl.dylib:openssl
86
87    post-configure {
88        reinplace "s|#undef VSF_BUILD_SSL|#define VSF_BUILD_SSL|" \
89        ${worksrcpath}/builddefs.h
90    }
91
92    build.env-append    LDFLAGS=${configure.ldflags}
93}
94
95platform darwin 9 {
96    patchfiles-append oldpam.diff
97}
98
99notes               "To configure ${name} edit ${prefix}/etc/vsftpd.conf."
100
101livecheck.type      regex
102livecheck.url       ${homepage}
103livecheck.regex     "vsftpd-(\\d+(?:\\.\\d+)*)"
Note: See TracBrowser for help on using the repository browser.