1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
|
# New ports collection makefile for: pure-ftpd
# Date created: 22 April 2001
# Whom: Frank DENIS
#
# $FreeBSD$
#
PORTNAME= pure-ftpd
PORTVERSION= 1.0.35
CATEGORIES= ftp ipv6
MASTER_SITES= http://download.pureftpd.org/pub/pure-ftpd/releases/ \
ftp://ftp.pureftpd.org/pub/pure-ftpd/releases/ \
SF/pureftpd/Pure-FTPd/${PORTVERSION}
MAINTAINER= garga@FreeBSD.org
COMMENT= A small, easy to set up, fast and very secure FTP server
SUB_FILES= pkg-message
SUB_LIST= PAM_DIR=${PAM_DIR} PAM_TARGET=${PAM_TARGET}
USE_BZIP2= yes
USE_PERL5_RUN= yes
USE_RC_SUBR= pure-ftpd.sh
GNU_CONFIGURE= yes
MAKE_JOBS_SAFE= yes
CONFIGURE_ARGS= --with-everything \
--with-paranoidmsg \
--sysconfdir=${PREFIX}/etc \
--localstatedir=/var
MAN8= pure-ftpd.8 pure-ftpwho.8 pure-mrtginfo.8 pure-statsdecode.8 \
pure-uploadscript.8 pure-pw.8 pure-pwconvert.8 pure-quotacheck.8 \
pure-authd.8
OPTIONS= LDAP "Support for users in LDAP directories" off \
MYSQL "Support for users in MySQL database" off \
PAM "Support for PAM authentication" on \
PGSQL "Support for users in PostgreSQL database" off \
TLS "Support for TLS (experimental)" off \
PRIVSEP "Enable privilege separation" on \
PERUSERLIMITS "Per-user concurrency limits" off \
THROTTLING "Bandwidth throttling" off \
UPLOADSCRIPT "Support uploadscript daemon" off \
UTF8 "Support for charset conversion" off \
SENDFILE "Support for the sendfile syscall" on \
LARGEFILE "Support downloading files larger than 2Gb" off \
VIRTUALCHROOT "Follow symlinks outside a chroot jail" on \
ANONRESUME "Allow anonymous user to resume file upload" off \
ANONRENAME "Allow anonymous user to rename file" off \
ANONDELETE "Allow anonymous user to delete file" off
.include <bsd.port.pre.mk>
# language support requested?
.if defined(WITH_LANG)
CONFIGURE_ARGS+= --with-language="${WITH_LANG}"
.endif
# ldap support requested?
.if defined(WITH_LDAP)
USE_OPENLDAP= YES
CONFIGURE_ARGS+= --with-ldap
.endif
# mysql support requested?
.if defined(WITH_MYSQL)
USE_MYSQL= YES
CONFIGURE_ARGS+= --with-mysql
.endif
# postgresql support requested?
.if defined(WITH_PGSQL)
USE_PGSQL= YES
CONFIGURE_ARGS+= --with-pgsql
.endif
# privilege separation requested?
.if defined(WITH_PRIVSEP)
CONFIGURE_ARGS+= --with-privsep
.endif
# per-user concurrency limits requested?
.if defined(WITH_PERUSERLIMITS)
CONFIGURE_ARGS+= --with-peruserlimits
.endif
# throttling requested?
.if defined(WITH_THROTTLING)
CONFIGURE_ARGS+= --with-throttling
.endif
# TLS
.if defined(WITH_TLS)
CONFIGURE_ARGS+= --with-tls
# different certificate file location?
. if defined(WITH_CERTFILE)
CONFIGURE_ARGS+= --with-certfile=${WITH_CERTFILE}
. endif
.endif
# if mysql or ldap are disabled, enable pam
.if !defined(WITHOUT_PAM)
CONFIGURE_ARGS+= --with-pam
.endif
# support uploadscript?
.if defined (WITH_UPLOADSCRIPT)
CONFIGURE_ARGS+= --with-uploadscript
.endif
# RFC 2640 charset conversion requested?
.if defined(WITH_UTF8)
USE_ICONV= YES
CONFIGURE_ARGS+= --with-rfc2640
.endif
.if defined(WITH_SENDFILE)
CONFIGURE_ARGS+= --with-sendfile
.else
CONFIGURE_ARGS+= --without-sendfile
.endif
.if defined(WITH_LARGEFILE)
CONFIGURE_ARGS+= --enable-largefile
.else
CONFIGURE_ARGS+= --disable-largefile
.endif
.if defined(WITH_VIRTUALCHROOT)
CONFIGURE_ARGS+= --with-virtualchroot
.else
CONFIGURE_ARGS+= --without-virtualchroot
.endif
.if defined(WITH_ANONRESUME)
CFLAGS+= -DANON_CAN_RESUME
.endif
.if defined(WITH_ANONRENAME)
CFLAGS+= -DANON_CAN_RENAME
.endif
.if defined(WITH_ANONDELETE)
CFLAGS+= -DANON_CAN_DELETE
.endif
PAM_TEMPL?= ${FILESDIR}/pam.conf.5
PAM_DIR?= ${EXAMPLESDIR}/pam
PAM_TARGET?= pure-ftpd
PORTDOCS= AUTHORS CONTACT COPYING HISTORY NEWS \
README README.Configuration-File README.Contrib README.LDAP \
README.MySQL README.PGSQL README.Virtual-Users \
README.Authentication-Modules THANKS pure-ftpd.png \
pureftpd.schema README.TLS
PORTEXAMPLES= *
CONTRIB= xml_python_processors.txt pure-stat.pl pure-vpopauth.pl
pre-fetch:
@${ECHO_MSG} "You can use the following additional options:"
@${ECHO_MSG} "WITH_CERTFILE=/path - Set different location of certificate file for TLS"
@${ECHO_MSG} "WITH_LANG=lang - Enable compilation of language support, lang is one of"
@${ECHO_MSG} " english, german, romanian, french, french-funny, polish, spanish,"
@${ECHO_MSG} " danish, dutch, italian, brazilian-portuguese, slovak, korean, swedish,"
@${ECHO_MSG} " norwegian, russian, traditional-chinese, simplified-chinese, czech,"
@${ECHO_MSG} " turkish, hungarian, catalan"
@${ECHO_MSG} ""
post-patch:
@${REINPLACE_CMD} -e 's|$${exec_prefix}|${PREFIX}|g' \
${WRKSRC}/configuration-file/pure-config.pl.in
post-install:
${INSTALL_DATA} ${WRKSRC}/pureftpd-ldap.conf ${PREFIX}/etc/pureftpd-ldap.conf.sample
${INSTALL_DATA} ${WRKSRC}/pureftpd-mysql.conf ${PREFIX}/etc/pureftpd-mysql.conf.sample
${INSTALL_DATA} ${WRKSRC}/pureftpd-pgsql.conf ${PREFIX}/etc/pureftpd-pgsql.conf.sample
${INSTALL_DATA} ${WRKSRC}/configuration-file/pure-ftpd.conf ${PREFIX}/etc/pure-ftpd.conf.sample
${INSTALL_SCRIPT} ${WRKSRC}/configuration-file/pure-config.pl ${PREFIX}/sbin/
.if !defined(NOPORTEXAMPLES)
@${MKDIR} ${EXAMPLESDIR}
cd ${WRKSRC}/contrib && ${INSTALL_SCRIPT} ${CONTRIB} ${EXAMPLESDIR}
${MKDIR} ${PAM_DIR}
${INSTALL_DATA} ${PAM_TEMPL} ${PAM_DIR}/${PAM_TARGET}
.endif
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
. for doc in ${PORTDOCS}
${INSTALL_DATA} ${WRKSRC}/${doc} ${DOCSDIR}
. endfor
.endif
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>
|