1998-02-13 18:39:02 +01:00
|
|
|
# New ports collection makefile for: proftpd
|
|
|
|
# Date created: 26 January 1998
|
|
|
|
# Whom: Stephane Legrand
|
|
|
|
#
|
1999-08-25 07:57:29 +02:00
|
|
|
# $FreeBSD$
|
1998-02-13 18:39:02 +01:00
|
|
|
#
|
|
|
|
|
2000-04-12 07:31:29 +02:00
|
|
|
PORTNAME= proftpd
|
2007-01-16 10:36:53 +01:00
|
|
|
DISTVERSION= 1.3.1rc2
|
2007-02-27 08:39:18 +01:00
|
|
|
PORTREVISION= 3
|
1999-08-02 12:44:03 +02:00
|
|
|
CATEGORIES= ftp
|
2004-11-15 18:10:45 +01:00
|
|
|
MASTER_SITES= ftp://ftp.proftpd.org/distrib/source/ \
|
2004-11-16 09:52:36 +01:00
|
|
|
ftp://ftp.fastorama.com/mirrors/ftp.proftpd.org/distrib/source/ \
|
|
|
|
ftp://ftp.dataguard.no/ftp/pub/proftpd/distrib/source/ \
|
|
|
|
ftp://spirit.bentel.sk/mirrors/Proftpd/distrib/source/ \
|
|
|
|
ftp://proftpd.networkedsystems.co.uk/distrib/source/ \
|
|
|
|
ftp://ftp.ethereal.com/mirrors/ftp.proftpd.org/distrib/source/ \
|
|
|
|
ftp://mirror.cybercomm.nl/pub/proftpd/distrib/source/
|
1999-08-23 02:00:19 +02:00
|
|
|
|
2006-06-25 04:51:59 +02:00
|
|
|
MAINTAINER?= beech@alaskaparadise.com
|
2004-05-14 08:46:12 +02:00
|
|
|
COMMENT?= Highly configurable ftp daemon
|
1998-02-13 18:39:02 +01:00
|
|
|
|
2003-03-24 14:33:28 +01:00
|
|
|
MAN1= ftpcount.1 ftpwho.1 ftptop.1
|
1999-10-11 06:41:55 +02:00
|
|
|
MAN5= xferlog.5
|
2005-06-22 20:48:39 +02:00
|
|
|
MAN8= proftpd.8 ftpshut.8 ftpdctl.8
|
1998-02-13 18:39:02 +01:00
|
|
|
|
2004-01-11 12:54:29 +01:00
|
|
|
PORTDOCSdoc= Configuration.html faq.html
|
|
|
|
PORTDOCScontrib=mod_ifsession.html mod_radius.html mod_rewrite.html \
|
2006-12-21 23:13:40 +01:00
|
|
|
mod_tls.html mod_wrap2.html mod_wrap2_file.html mod_wrap2_sql.html \
|
|
|
|
mod_ban.html mod_quotatab_radius.html ftpasswd.html
|
2004-01-11 12:54:29 +01:00
|
|
|
PORTDOCS= ${PORTDOCSdoc} ${PORTDOCScontrib}
|
|
|
|
|
1998-02-13 18:39:02 +01:00
|
|
|
USE_GMAKE= yes
|
2003-03-24 14:33:28 +01:00
|
|
|
USE_BZIP2= yes
|
2007-02-27 08:39:18 +01:00
|
|
|
USE_AUTOTOOLS= autoconf:259
|
|
|
|
GNU_CONFIGURE= yes
|
1998-02-13 18:39:02 +01:00
|
|
|
|
2005-06-22 20:48:39 +02:00
|
|
|
USE_RC_SUBR= proftpd.sh
|
2003-11-03 20:40:38 +01:00
|
|
|
|
1999-12-22 19:05:00 +01:00
|
|
|
CONFIGURE_ARGS= --localstatedir=/var/run \
|
2005-06-22 20:48:39 +02:00
|
|
|
--sysconfdir=${EXAMPLESDIR}/etc \
|
2007-03-25 03:33:59 +02:00
|
|
|
--enable-builtin-getnameinfo \
|
1999-12-22 19:05:00 +01:00
|
|
|
--disable-sendfile
|
1999-12-05 20:29:55 +01:00
|
|
|
|
2004-12-14 07:16:43 +01:00
|
|
|
OPTIONS= IPV6 "Use IPv6" off \
|
|
|
|
LDAP "Use LDAP" off \
|
2006-05-20 11:52:39 +02:00
|
|
|
LDAP_TLS "Use LDAP TLS (Requires LDAP)" off\
|
2004-12-14 07:16:43 +01:00
|
|
|
MYSQL "Use MySQL" off \
|
|
|
|
POSTGRESQL "Use Postgres" off \
|
|
|
|
OPENSSL "Include mod_tls" off \
|
|
|
|
QUOTA "Include mod_quota" off \
|
|
|
|
IFSESSION "Include mod_ifsession" on \
|
|
|
|
README "Include mod_readme" on \
|
|
|
|
RATIO "Include mod_ratio" on \
|
2006-12-21 23:13:40 +01:00
|
|
|
CTRLS "include controls" off \
|
2004-12-14 07:16:43 +01:00
|
|
|
REWRITE "Include mod_rewrite" on \
|
2006-12-21 23:13:40 +01:00
|
|
|
WRAP "Include mod_wrap2" on \
|
|
|
|
WRAP_FILE "include mod_wrap2_file" off \
|
|
|
|
WRAP_SQL "include mod_wrap2_sql" off \
|
|
|
|
RADIUS "Include mod_radius" off \
|
|
|
|
QUOTATAB_RADIUS "include mod_quotatab_radius" off \
|
|
|
|
BAN "include mod_ban (Requires CTRLS)" off \
|
2007-02-27 08:39:18 +01:00
|
|
|
NLS "Use nls (builds mod_lang)" off \
|
|
|
|
CYRFIX "Use patch for fix cyrillic encoding" off \
|
|
|
|
CODECONV "Use charset conversion (mod_codeconv)" off
|
2004-12-14 07:16:43 +01:00
|
|
|
|
2006-05-20 11:52:39 +02:00
|
|
|
MODULES?=
|
2006-12-26 17:59:14 +01:00
|
|
|
LIBDIRS?=
|
|
|
|
INCLUDEDIRS?=
|
2006-05-20 11:52:39 +02:00
|
|
|
|
2004-12-14 07:16:43 +01:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2006-05-20 11:52:39 +02:00
|
|
|
.if !defined(WITHOUT_RATIO)
|
2004-12-14 07:16:43 +01:00
|
|
|
MODULES:=${MODULES}:mod_ratio
|
|
|
|
.endif
|
|
|
|
|
2006-05-20 11:52:39 +02:00
|
|
|
.if !defined(WITHOUT_README)
|
2004-12-14 07:16:43 +01:00
|
|
|
MODULES:=${MODULES}:mod_readme
|
|
|
|
.endif
|
|
|
|
|
2006-05-20 11:52:39 +02:00
|
|
|
.if !defined(WITHOUT_REWRITE)
|
2004-12-14 07:16:43 +01:00
|
|
|
MODULES:=${MODULES}:mod_rewrite
|
|
|
|
.endif
|
|
|
|
|
2006-05-20 11:52:39 +02:00
|
|
|
.if !defined(WITHOUT_WRAP)
|
2006-12-21 23:13:40 +01:00
|
|
|
MODULES:=${MODULES}:mod_wrap2
|
|
|
|
INCLUDEDIRS:=${INCLUDEDIRS}:${WORKDIR}/include
|
|
|
|
LIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_WRAP_FILE)
|
|
|
|
INCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include
|
|
|
|
LIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib
|
|
|
|
MODULES:=${MODULES}:mod_wrap2_file
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_WRAP_SQL)
|
|
|
|
INCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include
|
|
|
|
LIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib
|
|
|
|
MODULES:=${MODULES}:mod_wrap2_sql
|
2004-12-14 07:16:43 +01:00
|
|
|
.endif
|
|
|
|
|
2005-10-10 07:38:26 +02:00
|
|
|
.if defined(WITH_RADIUS)
|
|
|
|
MODULES:=${MODULES}:mod_radius
|
|
|
|
.endif
|
|
|
|
|
2006-12-21 23:13:40 +01:00
|
|
|
.if defined(WITH_QUOTATAB_RADIUS)
|
|
|
|
MODULES:=${MODULES}:mod_quotatab_radius
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_BAN)
|
|
|
|
MODULES:=${MODULES}:mod_ban
|
|
|
|
.endif
|
|
|
|
|
2001-10-18 21:17:41 +02:00
|
|
|
.if defined(WITH_SETPASSENT)
|
|
|
|
CONFIGURE_ARGS+= --enable-force-setpassent
|
|
|
|
.endif
|
|
|
|
|
2001-03-07 01:32:00 +01:00
|
|
|
.if defined(WITHOUT_PAM)
|
2005-04-20 02:24:49 +02:00
|
|
|
CONFIGURE_ARGS+= --disable-auth-pam
|
2001-03-07 01:32:00 +01:00
|
|
|
.endif
|
|
|
|
|
2004-03-26 21:17:38 +01:00
|
|
|
.if defined(WITH_IPV6)
|
|
|
|
CONFIGURE_ARGS+= --enable-ipv6
|
|
|
|
.endif
|
|
|
|
|
2006-05-20 11:52:39 +02:00
|
|
|
.if !defined(WITH_IPV6)
|
2004-10-17 06:45:43 +02:00
|
|
|
CONFIGURE_ARGS+= --disable-ipv6
|
|
|
|
.endif
|
|
|
|
|
2006-12-21 23:13:40 +01:00
|
|
|
.if defined(WITH_NLS)
|
|
|
|
INCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include
|
|
|
|
LIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib
|
|
|
|
CONFIGURE_ARGS+= --enable-nls
|
2006-12-30 23:45:40 +01:00
|
|
|
USE_GETTEXT=yes
|
|
|
|
PROFTPD_LIBS+= -lintl -L${LOCALBASE}/lib
|
2006-12-21 23:13:40 +01:00
|
|
|
.endif
|
|
|
|
|
2007-02-27 08:39:18 +01:00
|
|
|
.if defined (WITH_CYRFIX)
|
|
|
|
EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-cyrillic-fix-netio.c
|
|
|
|
.endif
|
|
|
|
|
2000-11-24 23:29:11 +01:00
|
|
|
#allow user to override
|
2006-12-30 23:45:40 +01:00
|
|
|
MODULES?= mod_ratio:mod_readme:mod_rewrite:mod_wrap2:mod_ifsession
|
1999-12-05 20:29:55 +01:00
|
|
|
|
2006-11-04 01:39:33 +01:00
|
|
|
INCLUDEDIRS?=
|
|
|
|
LIBDIRS?=
|
2001-05-31 21:23:18 +02:00
|
|
|
|
2000-11-24 23:40:01 +01:00
|
|
|
.if defined(WITH_LDAP)
|
2003-11-03 20:40:38 +01:00
|
|
|
USE_OPENLDAP= yes
|
2001-03-07 01:33:55 +01:00
|
|
|
MODULES:=${MODULES}:mod_ldap
|
2005-07-30 06:51:41 +02:00
|
|
|
INCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include
|
|
|
|
LIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib
|
2000-11-24 23:40:01 +01:00
|
|
|
.endif
|
|
|
|
|
2000-12-16 05:33:48 +01:00
|
|
|
.if defined(WITH_MYSQL)
|
2003-11-03 20:40:38 +01:00
|
|
|
USE_MYSQL= yes
|
2001-03-07 01:33:55 +01:00
|
|
|
MODULES:=${MODULES}:mod_sql:mod_sql_mysql
|
2007-01-17 23:45:20 +01:00
|
|
|
INCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include:${LOCALBASE}/include/mysql
|
2005-07-30 06:51:41 +02:00
|
|
|
LIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib/mysql
|
2007-01-07 11:45:36 +01:00
|
|
|
PLIST_SUB+= MYSQL=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= MYSQL="@comment "
|
2000-12-16 05:33:48 +01:00
|
|
|
.endif
|
|
|
|
|
2004-04-19 23:57:55 +02:00
|
|
|
.if defined(WITH_POSTGRESQL)
|
2005-01-31 01:35:55 +01:00
|
|
|
USE_PGSQL= yes
|
2003-11-03 20:40:38 +01:00
|
|
|
MODULES:=${MODULES}:mod_sql:mod_sql_postgres
|
2005-07-30 06:51:41 +02:00
|
|
|
INCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include
|
|
|
|
LIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib
|
2001-08-17 21:00:51 +02:00
|
|
|
.endif
|
|
|
|
|
2003-11-03 20:40:38 +01:00
|
|
|
.if defined(WITH_OPENSSL)
|
|
|
|
CFLAGS+= -DHAVE_OPENSSL
|
2005-07-26 21:46:51 +02:00
|
|
|
.include <${PORTSDIR}/Mk/bsd.openssl.mk>
|
|
|
|
PROFTPD_LIBS+= -lssl -lcrypto -L${LOCALBASE}/lib
|
|
|
|
MODULES:=${MODULES}:mod_tls
|
2006-05-20 11:52:39 +02:00
|
|
|
.if defined(WITH_LDAP_TLS)
|
2006-05-26 20:39:15 +02:00
|
|
|
EXTRA_PATCHES+= ${FILESDIR}/extra_patch-ldap-tls-mod_ldap.c
|
2006-05-20 11:52:39 +02:00
|
|
|
.endif
|
2003-11-03 20:40:38 +01:00
|
|
|
.endif
|
|
|
|
|
2004-08-08 02:06:27 +02:00
|
|
|
.if defined(WITH_CTRLS)
|
2004-10-17 23:43:54 +02:00
|
|
|
CONFIGURE_ARGS+= --enable-ctrls
|
2005-10-10 07:28:57 +02:00
|
|
|
PLIST_FILES+= sbin/ftpdctl
|
|
|
|
.if !defined(WITHOUT_CTRLS_ADMIN)
|
|
|
|
MODULES:=${MODULES}:mod_ctrls_admin
|
|
|
|
.endif
|
2004-08-08 02:06:27 +02:00
|
|
|
.endif
|
|
|
|
|
2004-08-28 20:10:38 +02:00
|
|
|
.if defined(WITH_QUOTA)
|
|
|
|
MODULES:=${MODULES}:mod_quotatab:mod_quotatab_file
|
|
|
|
.if defined(WITH_LDAP)
|
|
|
|
MODULES:=${MODULES}:mod_quotatab_ldap
|
|
|
|
.endif
|
|
|
|
.if defined(WITH_POSTGRESQL) || defined(WITH_MYSQL)
|
|
|
|
MODULES:=${MODULES}:mod_quotatab_sql
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
2007-02-27 08:39:18 +01:00
|
|
|
.if defined(WITH_CODECONV)
|
2007-03-06 01:54:39 +01:00
|
|
|
USE_ICONV= YES
|
2007-02-27 08:39:18 +01:00
|
|
|
MODULES:=${MODULES}:mod_codeconv
|
2007-03-06 01:54:39 +01:00
|
|
|
INCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include
|
2007-02-27 08:39:18 +01:00
|
|
|
PROFTPD_LIBS+= -liconv -L${LOCALBASE}/lib
|
|
|
|
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-mod-codeconv
|
|
|
|
.endif
|
|
|
|
|
2005-10-10 07:38:26 +02:00
|
|
|
# mod_ifsession should be the last item in the modules list
|
2006-05-20 11:52:39 +02:00
|
|
|
.if !defined(WITHOUT_IFSESSION)
|
2005-10-10 07:38:26 +02:00
|
|
|
MODULES:=${MODULES}:mod_ifsession
|
|
|
|
.endif
|
|
|
|
|
2003-11-03 20:40:38 +01:00
|
|
|
# Keep this here below, in case similar constructs need to be made
|
|
|
|
CONFIGURE_ENV+= "LIBS=${PROFTPD_LIBS}"
|
2003-12-17 04:51:50 +01:00
|
|
|
|
1999-12-22 19:05:00 +01:00
|
|
|
.if !empty(MODULES)
|
2003-12-17 04:51:50 +01:00
|
|
|
CONFIGURE_ARGS+= --with-modules=${MODULES}
|
1999-12-22 19:05:00 +01:00
|
|
|
.endif
|
1999-12-05 20:29:55 +01:00
|
|
|
|
2001-05-31 21:23:18 +02:00
|
|
|
.if !empty(INCLUDEDIRS)
|
2003-12-17 04:51:50 +01:00
|
|
|
CONFIGURE_ARGS+= --with-includes=${INCLUDEDIRS}
|
2001-05-31 21:23:18 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if !empty(LIBDIRS)
|
2003-12-17 04:51:50 +01:00
|
|
|
CONFIGURE_ARGS+= --with-libraries=${LIBDIRS}
|
2000-11-24 23:40:01 +01:00
|
|
|
.endif
|
|
|
|
|
2004-12-14 07:16:43 +01:00
|
|
|
MODULES!=${ECHO} ${MODULES} | ${SED} -e 's,^:,,' -e 's,:$$,,'
|
|
|
|
|
2007-03-02 21:12:49 +01:00
|
|
|
post-patch:
|
|
|
|
.if defined(WITH_NLS)
|
|
|
|
${REINPLACE_CMD} -e 's|-lsupp|-lsupp -lintl|g' ${WRKSRC}/Makefile.in
|
|
|
|
.endif
|
|
|
|
|
1999-12-05 20:29:55 +01:00
|
|
|
pre-configure:
|
|
|
|
@${ECHO_MSG} "==> Configuring with ${MODULES}"
|
1998-02-13 18:39:02 +01:00
|
|
|
|
1998-02-20 07:39:07 +01:00
|
|
|
post-configure:
|
2005-06-25 21:08:44 +02:00
|
|
|
${REINPLACE_CMD} -e 's:${EXAMPLESDIR}:${PREFIX}:' ${WRKSRC}/config.h
|
2005-06-22 20:48:39 +02:00
|
|
|
${REINPLACE_CMD} -e 's: -lnsl::' ${WRKSRC}/Make.rules
|
|
|
|
${REINPLACE_CMD} -e 's:/usr/sbin:${PREFIX}/sbin:' \
|
1998-02-20 07:39:07 +01:00
|
|
|
-e 's:/usr/bin:${PREFIX}/bin:' \
|
2005-06-22 20:48:39 +02:00
|
|
|
${WRKSRC}/src/proftpd.8 ${WRKSRC}/utils/ftpshut.8 \
|
|
|
|
${WRKSRC}/utils/ftpcount.1
|
|
|
|
|
|
|
|
post-install:
|
2007-01-07 11:45:36 +01:00
|
|
|
@if [ ! -f ${PREFIX}/etc/proftpd.conf ]; then \
|
|
|
|
${CP} -p ${EXAMPLESDIR}/etc/proftpd.conf ${PREFIX}/etc/proftpd.conf ; \
|
|
|
|
fi
|
2004-01-11 12:54:29 +01:00
|
|
|
|
2000-11-24 23:23:38 +01:00
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
@${MKDIR} ${PREFIX}/share/doc/proftpd
|
2004-01-11 12:54:29 +01:00
|
|
|
.for f in ${PORTDOCSdoc}
|
|
|
|
@${INSTALL_DATA} ${WRKSRC}/doc/${f} ${PREFIX}/share/doc/proftpd
|
|
|
|
.endfor
|
|
|
|
.for f in ${PORTDOCScontrib}
|
2005-07-30 06:51:41 +02:00
|
|
|
@${INSTALL_DATA} ${WRKSRC}/doc/contrib/${f} ${PREFIX}/share/doc/proftpd
|
2004-01-11 12:54:29 +01:00
|
|
|
.endfor
|
2000-11-24 23:23:38 +01:00
|
|
|
.endif
|
1998-02-13 18:39:02 +01:00
|
|
|
|
2001-03-07 01:32:00 +01:00
|
|
|
.if !defined(WITHOUT_PAM)
|
1999-09-18 09:56:37 +02:00
|
|
|
@${CAT} ${PKGMESSAGE}
|
2001-03-07 01:32:00 +01:00
|
|
|
.endif
|
1999-09-18 09:56:37 +02:00
|
|
|
|
2005-10-10 07:28:57 +02:00
|
|
|
.if defined(WITH_CTRLS)
|
|
|
|
@${INSTALL_PROGRAM} ${WRKSRC}/ftpdctl ${PREFIX}/sbin/ftpdctl
|
|
|
|
@${INSTALL_MAN} ${WRKSRC}/src/ftpdctl.8 ${PREFIX}/man/man8/ftpdctl.8
|
|
|
|
.endif
|
|
|
|
|
2004-12-14 07:16:43 +01:00
|
|
|
.include <bsd.port.post.mk>
|