diff options
author | Michael Haro <mharo@FreeBSD.org> | 2003-11-03 19:40:38 +0000 |
---|---|---|
committer | Michael Haro <mharo@FreeBSD.org> | 2003-11-03 19:40:38 +0000 |
commit | 45ffb9a9c1b90b930460354408d55af726f1a039 (patch) | |
tree | f2007681dae1c27c7c3a9ac28ae62097ff15ab7b /ftp/proftpd | |
parent | - Fix build on -current (diff) |
58774 Andrew J. Caines <A.J.Caines@halplant.com>
upgrade to 1.2.9
58415 Melvyn Sopacua <mdev@idg.nl>
add WITH_OPENSSL
57385 Martin Matuska <martin@tradex.sk>
adds rc_subr support
54783 Bruce M Simpson <bms@spc.org>
Ability to support multiple versions MYSQL and LDAP using the WITH_*
variables.
I ended up using the stuff provided in bsd.port.mk with his patches
Notes
Notes:
svn path=/head/; revision=92990
Diffstat (limited to 'ftp/proftpd')
-rw-r--r-- | ftp/proftpd/Makefile | 37 | ||||
-rw-r--r-- | ftp/proftpd/distinfo | 2 | ||||
-rw-r--r-- | ftp/proftpd/files/patch-ah | 6 | ||||
-rw-r--r-- | ftp/proftpd/files/patch-configure | 13 | ||||
-rw-r--r-- | ftp/proftpd/files/patch-contrib::mod_sql_mysql.c | 11 | ||||
-rw-r--r-- | ftp/proftpd/files/patch-pgsql | 11 | ||||
-rw-r--r-- | ftp/proftpd/files/proftpd.sh | 41 | ||||
-rw-r--r-- | ftp/proftpd/files/proftpd.sh.sample | 19 | ||||
-rw-r--r-- | ftp/proftpd/pkg-plist | 2 |
9 files changed, 92 insertions, 50 deletions
diff --git a/ftp/proftpd/Makefile b/ftp/proftpd/Makefile index 0d3009814a89..7a6eab958580 100644 --- a/ftp/proftpd/Makefile +++ b/ftp/proftpd/Makefile @@ -6,15 +6,12 @@ # PORTNAME= proftpd -PORTVERSION= 1.2.8 -PORTREVISION= 1 +PORTVERSION= 1.2.9 CATEGORIES= ftp MASTER_SITES= ftp://ftp.proftpd.net/distrib/source/ \ ftp://ftp.stikman.com/pub/proftpd/source/ \ ftp://ftp.dataguard.no/pub/proftpd/distrib/source/ \ ftp://ftp.club-internet.fr/pub/mirrors/ftp.proftpd.org/distrib/source/ -DISTNAME= ${PORTNAME}-${PORTVERSION}p -WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} MAINTAINER= mharo@FreeBSD.org COMMENT= Highly configurable ftp daemon @@ -29,6 +26,17 @@ USE_BZIP2= yes # WANT_AUTOCONF_VER=213 # USE_AUTOCONF= yes +SED_SCRIPT= -e 's|%%PREFIX%%|${PREFIX}|g' + +USE_RC_SUBR= yes +RC_DIR= ${PREFIX}/etc/rc.d +RC_SUFX= .sh +SED_SCRIPT+= -e 's|%%RC_SUBR%%|${RC_SUBR}|g' \ + -e 's|%%RC_DIR%%|${RC_DIR}|g' \ + -e 's|%%RC_SUFX%%|${RC_SUFX}|g' +PLIST_SUB+= RC_DIR=${RC_DIR} \ + RC_SUFX=${RC_SUFX} + CONFIGURE_ARGS= --localstatedir=/var/run \ --disable-sendfile @@ -47,27 +55,36 @@ INCLUDEDIRS= LIBDIRS= .if defined(WITH_LDAP) +USE_OPENLDAP= yes MODULES:=${MODULES}:mod_ldap -BUILD_DEPENDS+= ${LOCALBASE}/lib/libldap.a:${PORTSDIR}/net/openldap12 INCLUDEDIRS:=${INCLUDEDIRS}:${PREFIX}/include LIBDIRS:=${LIBDIRS}:${PREFIX}/lib .endif .if defined(WITH_MYSQL) +USE_MYSQL= yes MODULES:=${MODULES}:mod_sql:mod_sql_mysql -LIB_DEPENDS+= mysqlclient.10:${PORTSDIR}/databases/mysql323-client INCLUDEDIRS:=${INCLUDEDIRS}:${PREFIX}/include LIBDIRS:=${LIBDIRS}:${PREFIX}/lib/mysql .endif .if defined(WITH_POSTGRES) POSTGRESQL_PORT?= databases/postgresql7 -MODULES:=${MODULES}:mod_sql:mod_sql_postgres LIB_DEPENDS+= pq.3:${PORTSDIR}/${POSTGRESQL_PORT} +MODULES:=${MODULES}:mod_sql:mod_sql_postgres INCLUDEDIRS:=${INCLUDEDIRS}:${PREFIX}/include LIBDIRS:=${LIBDIRS}:${PREFIX}/lib .endif +.if defined(WITH_OPENSSL) +CFLAGS+= -DHAVE_OPENSSL +USE_OPENSSL= yes +PROFTPD_LIBS+= -lssl -lcrypto +.endif + +# Keep this here below, in case similar constructs need to be made +CONFIGURE_ENV+= "LIBS=${PROFTPD_LIBS}" + .if !empty(MODULES) CONFIGURE_ARGS+= --with-modules=${MODULES} .endif @@ -104,6 +121,10 @@ post-configure: @${SED} -e 's:/usr/bin:${PREFIX}/bin:' \ < ${WRKSRC}/utils/ftpcount.1.pre_sed > ${WRKSRC}/utils/ftpcount.1 +post-build: + @${SED} ${SED_SCRIPT} ${FILESDIR}/proftpd.sh > ${WRKSRC}/proftpd.sh + + do-install: @${INSTALL_PROGRAM} ${WRKSRC}/ftpcount ${PREFIX}/bin/ftpcount @${INSTALL_PROGRAM} ${WRKSRC}/ftpwho ${PREFIX}/bin/ftpwho @@ -122,7 +143,7 @@ do-install: ${INSTALL_DATA} \ ${WRKSRC}/sample-configurations/basic.conf ${PREFIX}/etc/proftpd.conf; \ fi - @${SED} -e 's,/usr/local,${PREFIX},g' ${FILESDIR}/proftpd.sh.sample > ${PREFIX}/etc/rc.d/proftpd.sh.sample + @${INSTALL_SCRIPT} ${WRKSRC}/proftpd.sh ${PREFIX}/etc/rc.d/proftpd${RC_SUFX} .if !defined(NOPORTDOCS) @${MKDIR} ${PREFIX}/share/doc/proftpd @${INSTALL_DATA} ${WRKSRC}/doc/Configuration.html ${PREFIX}/share/doc/proftpd diff --git a/ftp/proftpd/distinfo b/ftp/proftpd/distinfo index bacbdb1f1947..efb8524dbb97 100644 --- a/ftp/proftpd/distinfo +++ b/ftp/proftpd/distinfo @@ -1 +1 @@ -MD5 (proftpd-1.2.8p.tar.bz2) = 417e41092610816bd203c3766e96f23b +MD5 (proftpd-1.2.9.tar.bz2) = 7c85503b160a36a96594ef75f3180a07 diff --git a/ftp/proftpd/files/patch-ah b/ftp/proftpd/files/patch-ah index b859648d8cf3..2b9dc49f0b01 100644 --- a/ftp/proftpd/files/patch-ah +++ b/ftp/proftpd/files/patch-ah @@ -1,10 +1,10 @@ --- modules/mod_auth_unix.c.orig Thu Mar 13 14:00:00 2003 +++ modules/mod_auth_unix.c Thu Mar 13 14:04:45 2003 -@@ -58,6 +58,7 @@ +@@ -57,6 +57,7 @@ #endif /* HAVE_HPSECURITY_H or HPUX10 or HPUX11 */ #if defined(HAVE_PROT_H) || defined(COMSEC) -+#include <krb.h> - #include <prot.h> ++# include <krb.h> + # include <prot.h> #endif diff --git a/ftp/proftpd/files/patch-configure b/ftp/proftpd/files/patch-configure index cac88f2bf706..1f7399541f8d 100644 --- a/ftp/proftpd/files/patch-configure +++ b/ftp/proftpd/files/patch-configure @@ -1,12 +1,11 @@ --- ./configure.orig Fri Mar 14 18:19:10 2003 +++ ./configure Fri Mar 14 18:19:25 2003 @@ -11202,8 +11202,8 @@ - #if HAVE_NETDB_H - #include <netdb.h> - #endif --#include <sys/socket.h> - #include <sys/types.h> -+#include <sys/socket.h> + #if HAVE_NETDB_H + #include <netdb.h> + #endif +- #include <sys/socket.h> + #include <sys/types.h> ++ #include <sys/socket.h> int - main () diff --git a/ftp/proftpd/files/patch-contrib::mod_sql_mysql.c b/ftp/proftpd/files/patch-contrib::mod_sql_mysql.c new file mode 100644 index 000000000000..9da89767a223 --- /dev/null +++ b/ftp/proftpd/files/patch-contrib::mod_sql_mysql.c @@ -0,0 +1,11 @@ +--- contrib/mod_sql_mysql.c.orig Sun Nov 2 00:30:13 2003 ++++ contrib/mod_sql_mysql.c Sun Nov 2 00:30:23 2003 +@@ -134,7 +134,7 @@ + + #define _MYSQL_PORT "3306" + +-#include <mysql.h> ++#include <mysql/mysql.h> + #include "conf.h" + #include "../contrib/mod_sql.h" + diff --git a/ftp/proftpd/files/patch-pgsql b/ftp/proftpd/files/patch-pgsql deleted file mode 100644 index 9c169e79c8f6..000000000000 --- a/ftp/proftpd/files/patch-pgsql +++ /dev/null @@ -1,11 +0,0 @@ ---- ./contrib/mod_sql_postgres.c.orig Sun Oct 6 21:47:43 2002 -+++ ./contrib/mod_sql_postgres.c Sun Oct 6 21:47:50 2002 -@@ -35,7 +35,7 @@ - - #define _POSTGRES_PORT "5432" - --#include <pgsql/libpq-fe.h> -+#include <libpq-fe.h> - #include "conf.h" - #include "../contrib/mod_sql.h" - diff --git a/ftp/proftpd/files/proftpd.sh b/ftp/proftpd/files/proftpd.sh new file mode 100644 index 000000000000..244e80cb9346 --- /dev/null +++ b/ftp/proftpd/files/proftpd.sh @@ -0,0 +1,41 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: proftpd +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: FreeBSD shutdown + +# +# Add the following lines to /etc/rc.conf to enable proftpd: +# +#proftpd_enable="YES" +# +# See proftpd(8) for flags +# + +. %%RC_SUBR%% + +name=proftpd +rcvar=`set_rcvar` + +command=%%PREFIX%%/libexec/proftpd +pidfile=/var/run/proftpd.pid +required_files=%%PREFIX%%/etc/proftpd.conf + +stop_postcmd=stop_postcmd + +stop_postcmd() +{ + rm -f $pidfile +} + +# set defaults + +proftpd_enable=${proftpd_enable:-"NO"} +proftpd_flags=${proftpd_flags:-""} + +load_rc_config $name +run_rc_command "$1" diff --git a/ftp/proftpd/files/proftpd.sh.sample b/ftp/proftpd/files/proftpd.sh.sample deleted file mode 100644 index ad976fa3984f..000000000000 --- a/ftp/proftpd/files/proftpd.sh.sample +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -case "$1" in - -start) - /bin/mkdir -p /var/run/proftpd - if [ -x /usr/local/libexec/proftpd ]; then - /usr/local/libexec/proftpd && echo -n ' proftpd' - fi - ;; - -stop) - killall proftpd - ;; -*) - echo "$0 start | stop" - ;; - -esac diff --git a/ftp/proftpd/pkg-plist b/ftp/proftpd/pkg-plist index 7413827b0d81..242c00f554f9 100644 --- a/ftp/proftpd/pkg-plist +++ b/ftp/proftpd/pkg-plist @@ -3,7 +3,7 @@ bin/ftpcount bin/ftptop bin/ftpwho etc/proftpd.conf.default -etc/rc.d/proftpd.sh.sample +etc/rc.d/proftpd%%RC_SUFX%% @exec if [ ! -f %D/etc/proftpd.conf ] ; then cp -p %D/%F %B/proftpd.conf; fi libexec/proftpd sbin/ftpshut |