1 | # $Id$ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | |
---|
5 | name pure-ftpd |
---|
6 | set pretty_name Pure-FTPd |
---|
7 | version 1.0.27 |
---|
8 | |
---|
9 | categories net |
---|
10 | platforms darwin |
---|
11 | maintainers hostwizard.com:scott |
---|
12 | license BSD |
---|
13 | |
---|
14 | homepage http://pureftpd.org/ |
---|
15 | description ${pretty_name} is a fast, production-quality, standard-conformant FTP (SSL/TLS) \ |
---|
16 | server, based upon Troll-FTPd.\ |
---|
17 | |
---|
18 | long_description ${pretty_name} has been designed to be secure in default configuration, it has no\ |
---|
19 | known vulnerabilities. Features Include: virtual domains, built-in 'ls', \ |
---|
20 | anti-warez system, configurable ports for passive downloads, FXP protocol, \ |
---|
21 | bandwidth throttling, ratios, LDAP / MySQL / PostgreSQL-based authentication,\ |
---|
22 | fortune files, Apache-like log files, text / HTML / XML real-time status report,\ |
---|
23 | virtual users, virtual quotas, privilege separation, SSL/TLS and more. |
---|
24 | |
---|
25 | master_sites ftp://ftp.pureftpd.org/pure-ftpd/releases/ \ |
---|
26 | ftp://ftp.fr.pureftpd.org/pure-ftpd/releases/ |
---|
27 | |
---|
28 | use_bzip2 yes |
---|
29 | |
---|
30 | checksums md5 7d18544384aa1649d483ba86518ed34e \ |
---|
31 | sha1 f4c3fcc68bea3b2dad9ff76624e23f072acd9c2e \ |
---|
32 | rmd160 2e6f2501e1d6da6c5caf32b802e7c2d481e2e6ee |
---|
33 | |
---|
34 | livecheck.type regex |
---|
35 | livecheck.url http://download.pureftpd.org/pub/${name}/releases/ |
---|
36 | livecheck.regex ${name}-(\[0-9.\]+)\\.tar |
---|
37 | |
---|
38 | configure.args --with-everything \ |
---|
39 | --with-pam \ |
---|
40 | --with-virtualchroot \ |
---|
41 | --with-paranoidmsg \ |
---|
42 | --with-bonjour \ |
---|
43 | --without-inetd \ |
---|
44 | --mandir=${prefix}/share/man \ |
---|
45 | --infodir=${prefix}/share/info \ |
---|
46 | --sysconfdir=${prefix}/etc/${name}/conf \ |
---|
47 | --localstatedir=${prefix}/var |
---|
48 | |
---|
49 | destroot.destdir prefix=${destroot}${prefix} \ |
---|
50 | mandir=${destroot}${prefix}/share/man |
---|
51 | |
---|
52 | post-destroot { |
---|
53 | file mkdir ${prefix}/etc/${name}/ssl |
---|
54 | file mkdir ${prefix}/etc/${name}/conf |
---|
55 | file mkdir ${prefix}/var/log/${name} |
---|
56 | file mkdir ${destroot}${prefix}/share/doc/${name} |
---|
57 | |
---|
58 | # Install the notes and readme files |
---|
59 | xinstall -m 644 -v -W ${worksrcpath} \ |
---|
60 | AUTHORS ChangeLog CONTACT COPYING FAQ HISTORY INSTALL NEWS README \ |
---|
61 | pureftpd-ldap.conf pureftpd-mysql.conf pureftpd-pgsql.conf pureftpd.schema \ |
---|
62 | README.Authentication-Modules README.Configuration-File \ |
---|
63 | README README.Authentication-Modules README.Configuration-File README.Contrib \ |
---|
64 | README.iPhone README.Donations README.LDAP README.MacOS-X README.PGSQL README.TLS \ |
---|
65 | README.MySQL README.Virtual-Users README.MySQL README.PGSQL README.TLS README.Virtual-Users \ |
---|
66 | THANKS \ |
---|
67 | ${destroot}${prefix}/share/doc/${name} |
---|
68 | |
---|
69 | # Copy in the sample launchd plists item |
---|
70 | file copy ${filespath}/org.pure-ftpd.ftpd.plist.basic.sample ${destroot}${prefix}/share/doc/${name}/org.pure-ftpd.ftpd.plist.basic.sample |
---|
71 | |
---|
72 | # Copy in the sample pure-ftpd pam file |
---|
73 | file copy ${filespath}/pure-ftpd.pam.sample ${destroot}${prefix}/share/doc/${name}/pure-ftpd.pam.sample |
---|
74 | } |
---|
75 | |
---|
76 | # Variants |
---|
77 | variant mysql5 conflicts postgresql description "Use native MySQL support for privileges database." { |
---|
78 | depends_lib-append path:bin/mysql_config5:mysql5 |
---|
79 | configure.args-append --with-mysql |
---|
80 | configure.cflags-append "-I${prefix}/include/mysql5/mysql" |
---|
81 | configure.ldflags-append "-L${prefix}/lib/mysql5/mysql" |
---|
82 | } |
---|
83 | |
---|
84 | variant postgresql conflicts mysql5 description "Use native postgreSQL support for privileges database." { |
---|
85 | depends_lib-append port:postgresql83 |
---|
86 | configure.args-append --with-pgsql |
---|
87 | } |
---|
88 | |
---|
89 | variant tls description "Encryption of ftp control and data channels using SSL/TLS" { |
---|
90 | depends_lib lib:libssl.dylib:openssl |
---|
91 | configure.args-append --with-tls \ |
---|
92 | --with-certfile=${prefix}/etc/${name}/ssl/pure-ftpd.pem |
---|
93 | } |
---|
94 | |
---|
95 | # Language variants, should only be able to choose one. |
---|
96 | set variants { |
---|
97 | lang_brazilian |
---|
98 | lang_czech |
---|
99 | lang_danish |
---|
100 | lang_dutch |
---|
101 | lang_french |
---|
102 | lang_french_funny |
---|
103 | lang_german |
---|
104 | lang_italian |
---|
105 | lang_korean |
---|
106 | lang_norwegian |
---|
107 | lang_polish |
---|
108 | lang_romanian |
---|
109 | lang_russian |
---|
110 | lang_simplified_chinese |
---|
111 | lang_slovak |
---|
112 | lang_spanish |
---|
113 | lang_swedish |
---|
114 | lang_trad_chinese |
---|
115 | } |
---|
116 | |
---|
117 | foreach variant_name $variants { |
---|
118 | # Quick way to remove the working variant from the list |
---|
119 | set the_conflicts [lsearch -all -inline -not -exact $variants $variant_name] |
---|
120 | # String replace away the lang_ part, as that is not part of the name used for the compile args |
---|
121 | set variant_configure_name [string map {"lang_" ""} $variant_name] |
---|
122 | set variant_line "variant $variant_name conflicts $the_conflicts description \"Use $variant_name for server messages\" { |
---|
123 | configure.args-append --with-language=$variant_configure_name }" |
---|
124 | eval $variant_line |
---|
125 | |
---|
126 | } |
---|
127 | |
---|
128 | # Notify the user how to launch the ftpd |
---|
129 | post-activate { |
---|
130 | ui_msg "---> Displaying post install instructions for ${pretty_name}" |
---|
131 | ui_msg "========================================================================" |
---|
132 | ui_msg "${pretty_name} documentation is located in: ${prefix}/share/doc/${name}" |
---|
133 | ui_msg "" |
---|
134 | |
---|
135 | ui_msg "You can start ${pretty_name} from the command line with:" |
---|
136 | ui_msg " sudo ${prefix}/sbin/${name} &" |
---|
137 | |
---|
138 | ui_msg "A future release of ${pretty_name} will no longer support" |
---|
139 | ui_msg "xinetd, and has been removed from this version. If you are using that" |
---|
140 | ui_msg "method to start ${pretty_name} now, please switch to using launchd(8)." |
---|
141 | ui_msg "" |
---|
142 | |
---|
143 | ui_msg "A sample launchd plist has been created to get you started." |
---|
144 | ui_msg " 1) org.pure-ftpd.ftpd.plist.basic.sample" |
---|
145 | ui_msg " Basic but secure chrooted ftp server" |
---|
146 | ui_msg "" |
---|
147 | |
---|
148 | ui_msg "To install the launchd item, issue the following commands:" |
---|
149 | ui_msg "cd ${prefix}/share/doc/${name}/" |
---|
150 | ui_msg "sudo cp org.pure-ftpd.ftpd.plist.basic.sample /Library/LaunchDaemons/org.pure-ftpd.ftpd.plist" |
---|
151 | ui_msg " - and then load the launchd item - " |
---|
152 | ui_msg "sudo launchctl load -w /Library/LaunchDaemons/org.pure-ftpd.ftpd.plist" |
---|
153 | ui_msg "" |
---|
154 | |
---|
155 | ui_msg "If you intend to use pure-FTPd with PAM, meaning you want to authenticate against Mac OS X" |
---|
156 | ui_msg "user accounts, please copy the pure-ftpd.pam.sample file to /etc/pam.d/pure-ftpd" |
---|
157 | ui_msg "cd ${prefix}/share/doc/${name}/" |
---|
158 | ui_msg "sudo cp pure-ftpd.pam.sample /etc/pam.d/pure-ftpd" |
---|
159 | |
---|
160 | ui_msg "You can now test the server with:" |
---|
161 | ui_msg " ftp localhost" |
---|
162 | ui_msg "You should see a Welcome to ${pretty_name} message." |
---|
163 | ui_msg "" |
---|
164 | |
---|
165 | ui_msg "See ${homepage} for more information." |
---|
166 | ui_msg "========================================================================" |
---|
167 | } |
---|