1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-26 00:55:14 +00:00
freebsd-ports/ftp/vsftpd/Makefile
Tobias C. Berner 30cd242001 ftp: remove 'Created by' lines
A big Thank You to the original contributors of these ports:

  *  Aaron Dalton <aaron@FreeBSD.org>
  *  Alexander Kriventsov
  *  Anders Nordby <anders@fix.no>
  *  Andreas Fehlner <fehlner@gmx.de>
  *  Andrew Pantyukhin <infofarmer@FreeBSD.org>
  *  Andrey Zakhvatov
  *  Antonio Carlos Venancio Junior (<antonio@inf.ufsc.br>)
  *  Chris Piazza <cpiazza@FreeBSD.org>
  *  Damjan Marion <dmarion@open.hr>
  *  Emanuel Haupt <ehaupt@critical.ch>
  *  Eric Freeman <freebsdports@chillibear.com>
  *  Frank DENIS
  *  Frank Laszlo <laszlof@vonostingroup.com>
  *  Gea-Suan Lin (gslin@ccca.nctu.edu.tw)
  *  Gea-Suan Lin <gslin@ccca.nctu.edu.tw>
  *  George V. Neville-Neil <gnn@FreeBSD.org>
  *  Hye-Shik Chang
  *  Jordan Hubbard <jkh@FreeBSD.org>
  *  Jose Alonso Cardenas Marquez <acardenas@bsd.org.pe>
  *  Joseph Benden <joe@thrallingpenguin.com>
  *  Ju Pengfei <jupengfei@gmail.com>
  *  Jui-Nan Lin <jnlin@freebsd.cs.nctu.edu.tw>
  *  Mark Johnston <markj@FreeBSD.org>
  *  Martin Matuska (mm@FreeBSD.org)
  *  Marwan BURELLE <marwan.burelle@lri.fr>
  *  Maxim Ignatenko
  *  Maxim Sobolev <sobomax@FreeBSD.org>
  *  Neil Blakey-Milner
  *  Neil Blakey-Milner <nbm@rucus.ru.ac.za>
  *  Nick Leuta
  *  Nosov Artem <chip-set@mail.ru>
  *  Petr Holub <hopet@ics.muni.cz>
  *  Philippe Le Berre <philippe@le-berre.com>
  *  Piotr Kubaj <pkubaj@anongoth.pl>
  *  Po-Chuan Hsieh <sunpoet@FreeBSD.org>
  *  Roman Bogorodskiy
  *  Sergey Matveychuk <sem@FreeBSD.org>
  *  Sergey Skvortsov <skv@FreeBSD.org>
  *  Stephane Legrand
  *  Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>
  *  TAKATSU Tomonari <tota@FreeBSD.org>
  *  Thomas Gellekum <tg@FreeBSD.org>
  *  Tom McLaughlin <tmclaugh@sdf.lonestar.org>
  *  Tomokazu ISHII <t-ishii@tryplanet.com>
  *  Ulrich Spoerlein <uspoerlein@gmail.com>
  *  Wen Heping <wen@FreeBSD.org>
  *  Xavier Beaudouin <kiwi@oav.net>
  *  Yasuhiro Fukuma <yasuf@big.or.jp>
  *  Ying-Chieh Liao <ijliao@FreeBSD.org>
  *  ache
  *  cy@FreeBSD.org
  *  ijliao
  *  ports
  *  torstenb
  *  will

With hat:	portmgr
2022-07-20 16:21:53 +02:00

105 lines
3.3 KiB
Makefile

PORTNAME= vsftpd
PORTVERSION= 3.0.5
CATEGORIES= ftp
MASTER_SITES= https://security.appspot.com/downloads/ \
GENTOO
PKGNAMESUFFIX?= ${SSL_SUFFIX}${PKGNAMESUFFIX2}
MAINTAINER= dinoex@FreeBSD.org
COMMENT= FTP daemon that aims to be "very secure"
LICENSE= GPLv2
#USERS= ftp
#GROUPS= ftp
USES= cpe alias
ALL_TARGET= vsftpd
USE_RC_SUBR= vsftpd
DOCFILES= AUDIT BENCHMARKS BUGS Changelog FAQ INSTALL LICENSE \
README README.security README.ssl REFS REWARD \
SIZE SPEED TODO TUNING
CPE_VENDOR= vsftpd_project
OPTIONS_DEFINE= VSFTPD_SSL PIDFILE STACKPROTECTOR DOCS
OPTIONS_DEFAULT?= VSFTPD_SSL STACKPROTECTOR
NO_OPTIONS_SORT=yes
VSFTPD_SSL_DESC=Include support for SSL
PIDFILE_DESC= Unofficial support for pidfile
STACKPROTECTOR_DESC= Build with stack-protector
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MVSFTPD_SSL} && !defined(WITHOUT_SSL)
USES+= ssl
SSL_SUFFIX= -ssl
CFLAGS+= -I${OPENSSLINC}
LDFLAGS+= -L${OPENSSLLIB}
.endif
.if ${PORT_OPTIONS:MPIDFILE}
EXTRA_PATCHES+= ${FILESDIR}/pidfile.patch
.endif
VSFTPD_OPTIMIZED= ${CFLAGS:M-O*}
.if defined(CFLAGS) && !empty(VSFTPD_OPTIMIZED)
VSFTPD_NO_OPTIMIZED= -e "s|-O2 ||"
.endif
.if ${PORT_OPTIONS:MSTACKPROTECTOR}
# BROKEN on FreeBSD with undefined reference to `__stack_chk_fail_local'
VSFTPD_LIBS= -lssp_nonshared
.else
VSFTPD_NO_SSP= -e "s|-fstack-protector --param=ssp-buffer-size=4 ||"
.endif
do-configure:
.if ${PORT_OPTIONS:MVSFTPD_SSL} && !defined(WITHOUT_SSL)
${REINPLACE_CMD} -e \
"s|#undef VSF_BUILD_TCPWRAPPERS|#define VSF_BUILD_TCPWRAPPERS 1|" \
-e "s|#undef VSF_BUILD_SSL|#define VSF_BUILD_SSL 1|" \
${WRKSRC}/builddefs.h
.else
${REINPLACE_CMD} -e \
"s|#undef VSF_BUILD_TCPWRAPPERS|#define VSF_BUILD_TCPWRAPPERS 1|" \
${WRKSRC}/builddefs.h
.endif
${REINPLACE_CMD} -e "s|^listen=.*|listen=NO|" \
-e "s|/etc/vsftpd.conf|${PREFIX}/etc/vsftpd.conf|" \
${WRKSRC}/defs.h ${WRKSRC}/vsftpd.conf
${REINPLACE_CMD} -e "s|/etc/v|${PREFIX}/etc/v|" \
${WRKSRC}/vsftpd.8 ${WRKSRC}/vsftpd.conf.5 ${WRKSRC}/tunables.c
${REINPLACE_CMD} ${VSFTPD_NO_OPTIMIZED} ${VSFTPD_NO_SSP} \
-e "s|^CC = gcc|CC = ${CC}|" \
-e "s|^CFLAGS = |CFLAGS = ${CFLAGS} |" \
-e "s|^LDFLAGS = |LDFLAGS = ${LDFLAGS} |" \
-e "s| -Wl,-s| ${VSFTPD_LIBS}|" \
${WRKSRC}/Makefile
${REINPLACE_CMD} -e '/-lutil/d' ${WRKSRC}/vsf_findlibs.sh
@${ECHO_CMD} "secure_chroot_dir=${PREFIX}/share/vsftpd/empty" >> \
${WRKSRC}/vsftpd.conf
@${ECHO_CMD} >>${WRKSRC}/vsftpd.conf ""
@${ECHO_CMD} >>${WRKSRC}/vsftpd.conf \
"# If using vsftpd in standalone mode, uncomment the next two lines:"
@${ECHO_CMD} >>${WRKSRC}/vsftpd.conf "# listen=YES"
@${ECHO_CMD} >>${WRKSRC}/vsftpd.conf "# background=YES"
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/vsftpd ${STAGEDIR}${PREFIX}/libexec/
${INSTALL_DATA} ${WRKSRC}/vsftpd.conf ${STAGEDIR}${PREFIX}/etc/vsftpd.conf.dist
${INSTALL_MAN} ${WRKSRC}/vsftpd.conf.5 ${STAGEDIR}${PREFIX}/man/man5/
${INSTALL_MAN} ${WRKSRC}/vsftpd.8 ${STAGEDIR}${PREFIX}/man/man8/
${MKDIR} ${STAGEDIR}/var/ftp ${STAGEDIR}${PREFIX}/share/vsftpd/empty
do-install-DOCS-on:
${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${DOCFILES:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}/
.for i in EXAMPLE SECURITY
${MKDIR} ${STAGEDIR}${DOCSDIR}/${i}
${CP} -p -R -L ${WRKSRC}/${i}/./ ${STAGEDIR}${DOCSDIR}/${i}/
${CHMOD} -R -L a+rX,go-w ${STAGEDIR}${DOCSDIR}/${i}/
.endfor
.include <bsd.port.mk>