2001-02-03 19:07:43 +00:00
|
|
|
# New ports collection makefile for: vsftpd
|
|
|
|
# Date created: 03 Feb 2001
|
|
|
|
# Whom: Neil Blakey-Milner
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= vsftpd
|
2005-04-10 04:31:32 +00:00
|
|
|
PORTVERSION= 2.0.3
|
2004-03-12 19:28:03 +00:00
|
|
|
CATEGORIES= ftp ipv6
|
2002-08-04 19:53:07 +00:00
|
|
|
MASTER_SITES= ftp://vsftpd.beasts.org/users/cevans/
|
2001-02-03 19:07:43 +00:00
|
|
|
|
2002-10-28 20:40:04 +00:00
|
|
|
MAINTAINER= dinoex@FreeBSD.org
|
2003-02-20 19:21:25 +00:00
|
|
|
COMMENT= A FTP daemon that aims to be "very secure"
|
2001-02-03 19:07:43 +00:00
|
|
|
|
2003-12-12 19:17:17 +00:00
|
|
|
USE_REINPLACE= yes
|
2001-02-03 19:07:43 +00:00
|
|
|
ALL_TARGET= vsftpd
|
2001-12-18 04:38:53 +00:00
|
|
|
MAN5= vsftpd.conf.5
|
|
|
|
MAN8= vsftpd.8
|
2003-10-19 19:21:10 +00:00
|
|
|
DOCFILES= AUDIT BENCHMARKS BUGS Changelog FAQ INSTALL LICENSE \
|
2004-07-06 20:28:39 +00:00
|
|
|
README README.security README.ssl REFS REWARD \
|
|
|
|
SIZE SPEED TODO TUNING
|
|
|
|
|
2005-04-10 04:31:32 +00:00
|
|
|
LDFLAGS+= -lwrap
|
|
|
|
|
2005-05-02 10:40:20 +00:00
|
|
|
OPTIONS= RC_NG "install RC_NG script" off
|
|
|
|
|
2004-07-06 20:28:39 +00:00
|
|
|
.if !defined(WITHOUT_SSL) && defined(WITH_VSFTPD_SSL)
|
|
|
|
USE_OPENSSL= yes
|
|
|
|
CFLAGS+= -I${OPENSSLINC}
|
|
|
|
LDFLAGS+= -L${OPENSSLLIB}
|
2005-04-10 04:31:32 +00:00
|
|
|
.else
|
|
|
|
MAKE_ENV+= LDFLAGS="${LDFLAGS}"
|
2004-07-06 20:28:39 +00:00
|
|
|
.endif
|
2001-12-18 04:38:53 +00:00
|
|
|
|
2002-10-26 02:55:52 +00:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2005-05-02 10:40:20 +00:00
|
|
|
.if defined(WITH_RC_NG)
|
|
|
|
USE_RC_SUBR= yes
|
|
|
|
PLIST_SUB+= RC_NG=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= RC_NG="@comment "
|
|
|
|
.endif
|
|
|
|
|
2002-11-11 04:03:25 +00:00
|
|
|
do-configure:
|
2005-05-02 10:40:20 +00:00
|
|
|
.if defined(WITH_RC_NG)
|
|
|
|
@${SED} -e 's,%%RC_SUBR%%,${RC_SUBR},g' -e 's,%%PREFIX%%,${PREFIX},g' \
|
|
|
|
${FILESDIR}/${PORTNAME}.sh >${WRKDIR}/${PORTNAME}.sh
|
|
|
|
.endif
|
2003-12-12 19:17:17 +00:00
|
|
|
${REINPLACE_CMD} -e "s=/etc/vsftpd.conf=${PREFIX}/etc/vsftpd.conf=" \
|
|
|
|
${WRKSRC}/defs.h
|
2004-07-06 20:28:39 +00:00
|
|
|
${REINPLACE_CMD} \
|
|
|
|
-e "s|^CC = gcc|CC = ${CC}|" \
|
|
|
|
-e "s|^CFLAGS =|CFLAGS = ${CFLAGS}|" \
|
|
|
|
-e "s| -Wl,-s| -Wl,-s ${LDFLAGS}|" \
|
2003-12-12 19:17:17 +00:00
|
|
|
${WRKSRC}/Makefile
|
|
|
|
${REINPLACE_CMD} -e \
|
|
|
|
"s/#undef VSF_BUILD_TCPWRAPPERS/#define VSF_BUILD_TCPWRAPPERS 1/" \
|
|
|
|
${WRKSRC}/builddefs.h
|
2002-11-11 04:03:25 +00:00
|
|
|
${ECHO_CMD} "secure_chroot_dir=${PREFIX}/share/vsftpd/empty" >> \
|
2001-12-18 04:38:53 +00:00
|
|
|
${WRKSRC}/vsftpd.conf
|
2003-12-28 20:14:32 +00:00
|
|
|
${REINPLACE_CMD} -e "s=/etc/v=${PREFIX}/etc/v=" \
|
|
|
|
${WRKSRC}/vsftpd.8 ${WRKSRC}/vsftpd.conf.5 ${WRKSRC}/tunables.c
|
2004-07-06 20:28:39 +00:00
|
|
|
.if !defined(WITHOUT_SSL) && defined(WITH_VSFTPD_SSL)
|
|
|
|
${REINPLACE_CMD} -e \
|
|
|
|
"s/#undef VSF_BUILD_SSL/#define VSF_BUILD_SSL 1/" \
|
|
|
|
${WRKSRC}/builddefs.h
|
|
|
|
.endif
|
2001-02-03 19:07:43 +00:00
|
|
|
|
|
|
|
do-install:
|
2002-11-11 04:03:25 +00:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/vsftpd ${PREFIX}/libexec/
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/vsftpd.conf ${PREFIX}/etc/vsftpd.conf.dist
|
|
|
|
${INSTALL} -d ${PREFIX}/share/vsftpd/empty
|
2001-02-03 19:07:43 +00:00
|
|
|
@if [ ! -e ${PREFIX}/etc/vsftpd.conf ]; then \
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/vsftpd.conf ${PREFIX}/etc/ ; \
|
|
|
|
fi
|
2002-11-11 04:03:25 +00:00
|
|
|
${MKDIR} ${PREFIX}/share/vsftpd/empty
|
2001-12-18 04:38:53 +00:00
|
|
|
@for i in ${MAN8} ; do \
|
|
|
|
${INSTALL_MAN} -m 644 ${WRKSRC}/$${i} ${MANPREFIX}/man/man8/ ; \
|
|
|
|
done
|
|
|
|
@for i in ${MAN5} ; do \
|
|
|
|
${INSTALL_MAN} -m 644 ${WRKSRC}/$${i} ${MANPREFIX}/man/man5/ ; \
|
|
|
|
done
|
2003-12-12 19:17:17 +00:00
|
|
|
${SH} ${PKGINSTALL}
|
2002-11-11 04:03:25 +00:00
|
|
|
${MKDIR} /var/ftp
|
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
${MKDIR} ${DOCSDIR}
|
|
|
|
.for i in ${DOCFILES}
|
|
|
|
${INSTALL_DATA} -m 644 ${WRKSRC}/${i} ${DOCSDIR}
|
|
|
|
.endfor
|
|
|
|
.for i in EXAMPLE SECURITY
|
|
|
|
${MKDIR} ${DOCSDIR}/${i}
|
|
|
|
${CP} -p -R -L ${WRKSRC}/${i}/./ ${DOCSDIR}/${i}/
|
|
|
|
${CHMOD} -R -L a+rX,go-w ${DOCSDIR}/${i}/
|
|
|
|
.endfor
|
|
|
|
.endif
|
2005-05-02 10:40:20 +00:00
|
|
|
.if defined(WITH_RC_NG)
|
|
|
|
@${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}.sh ${PREFIX}/etc/rc.d/${PORTNAME}.sh
|
|
|
|
.endif
|
2001-02-03 19:07:43 +00:00
|
|
|
|
2002-10-26 02:55:52 +00:00
|
|
|
.include <bsd.port.post.mk>
|