diff options
author | Beech Rintoul <beech@FreeBSD.org> | 2008-09-23 03:12:28 +0000 |
---|---|---|
committer | Beech Rintoul <beech@FreeBSD.org> | 2008-09-23 03:12:28 +0000 |
commit | 89c178b3fb73bd601d38234162e47978ec3e78ff (patch) | |
tree | d7c1b5bc056a8e84059974539e010f1f4138b271 /ftp/proftpd-devel | |
parent | 7c046792875f57ecd0dd072cb96ba7f5843fc5f0 (diff) | |
download | ports-89c178b3fb73bd601d38234162e47978ec3e78ff.tar.gz ports-89c178b3fb73bd601d38234162e47978ec3e78ff.zip |
Notes
Diffstat (limited to 'ftp/proftpd-devel')
-rw-r--r-- | ftp/proftpd-devel/Makefile | 47 | ||||
-rw-r--r-- | ftp/proftpd-devel/distinfo | 21 | ||||
-rw-r--r-- | ftp/proftpd-devel/files/extra-patch-mod-codeconv | 298 | ||||
-rw-r--r-- | ftp/proftpd-devel/pkg-plist | 14 |
4 files changed, 30 insertions, 350 deletions
diff --git a/ftp/proftpd-devel/Makefile b/ftp/proftpd-devel/Makefile index b3015833a69f..072b4df6e615 100644 --- a/ftp/proftpd-devel/Makefile +++ b/ftp/proftpd-devel/Makefile @@ -6,20 +6,11 @@ # PORTNAME= proftpd -DISTVERSION= 1.3.2rc1 -PORTREVISION= 2 +DISTVERSION= 1.3.20080920 CATEGORIES= ftp -MASTER_SITES= ftp://ftp.proftpd.org/distrib/source/ \ - 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/ \ - http://mirrors.ibiblio.org/pub/mirrors/proftpd/distrib/source/ \ - http://www.mirrorservice.org/sites/ftp.proftpd.org/distrib/source/ \ - CENKES:clam \ - http://www.smartftp.com/oss/proftpd/:digest \ - http://lev.serebryakov.spb.ru/mod_comb/:comb\ - http://labratsoftware.com/mod_sql_tds/:sql_tds \ +MASTER_SITES= http://www.alaskaparadise.com/freebsd/ \ + LOCAL/beech \ + LOCAL/beech:clam \ LOCAL/beech:digest \ LOCAL/beech:comb \ LOCAL/beech:sql_tds @@ -93,8 +84,7 @@ OPTIONS= IPV6 "Use IPv6" off \ UNIQUE "Include mod_unique_id" off \ CLAMAV "Include mod_clamav" off \ DIGEST "Include mod_digest" off \ - COMB "Include mod_comb (multistream upload)" off \ - CODECONV "Use charset conversion (mod_codeconv)" off + COMB "Include mod_comb (multistream upload)" off MODULES?= LIBDIRS?= @@ -247,14 +237,18 @@ MODULES:=${MODULES}:mod_unique_id .endif .if defined(WITH_CLAMAV) -#http://www.uglyboxindustries.com/mod_clamav_new.c -DISTFILES+= mod_clamav-0.5.1.tar.bz2:clam -EXTRACT_ONLY+= mod_clamav-0.5.1.tar.bz2 +#http://www.thrallingpenguin.com/resources/mod_clamav-0.10.tar.bz2 +DISTFILES+= mod_clamav-0.10.tar.bz2:clam +EXTRACT_ONLY+= mod_clamav-0.10.tar.bz2 +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-modules_mod_xfer.c USE_CLAMAV= yes MODULES:=${MODULES}:mod_clamav LIB_DEPENDS+= clamav.5:${PORTSDIR}/security/clamav INCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include LIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib +PLIST_SUB= CLAMAV="" +.else +PLIST_SUB= CLAMAV="@comment " .endif .if defined(WITH_DIGEST) @@ -282,15 +276,6 @@ LIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib LIB_DEPENDS+= sybdb.5:${PORTSDIR}/databases/freetds .endif -.if defined(WITH_CODECONV) -USE_ICONV= YES -MODULES:=${MODULES}:mod_codeconv -INCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include -CONFIGURE_ARGS+= --disable-sendfile -PROFTPD_LIBS+= -liconv -L${LOCALBASE}/lib -EXTRA_PATCHES+= ${FILESDIR}/extra-patch-mod-codeconv -.endif - # mod_ifsession should be the last item in the modules list .if !defined(WITHOUT_IFSESSION) MODULES:=${MODULES}:mod_ifsession @@ -315,7 +300,7 @@ MODULES!=${ECHO} ${MODULES} | ${SED} -e 's,^:,,' -e 's,:$$,,' post-extract: .if defined(WITH_CLAMAV) - @${MV} ${WRKDIR}/mod_clamav_new.c ${WRKSRC}/modules/mod_clamav.c + @${CP} ${WRKDIR}/mod_clamav-0.10/mod_clamav.* ${WRKSRC}/contrib .endif .if defined(WITH_DIGEST) @${CP} ${DISTDIR}/${DIST_SUBDIR}/mod_digest.c ${WRKSRC}/modules/ @@ -351,7 +336,7 @@ post-configure: ${WRKSRC}/utils/ftpcount.1 pre-install: - @cd ${LOCALBASE}/lib && ${INSTALL} -d pkgconfig + @cd ${PREFIX}/lib && ${INSTALL} -d pkgconfig post-install: @cd ${PREFIX}/etc/ && ${CP} -n proftpd.conf.sample proftpd.conf @@ -370,7 +355,7 @@ post-install: @${INSTALL_PROGRAM} ${WRKSRC}/ftpdctl ${PREFIX}/sbin/ @${INSTALL_MAN} ${WRKSRC}/src/ftpdctl.8 ${MAN8PREFIX}/man/man8/ .endif - @cd ${LOCALBASE}/lib/pkgconfig && ${MV} proftpd.pc ${LOCALBASE}/libdata/pkgconfig - @${RM} -r ${LOCALBASE}/lib/pkgconfig + @cd ${PREFIX}/lib/pkgconfig && ${MV} proftpd.pc ${PREFIX}/libdata/pkgconfig + @${RM} -r ${PREFIX}/lib/pkgconfig .include <bsd.port.post.mk> diff --git a/ftp/proftpd-devel/distinfo b/ftp/proftpd-devel/distinfo index 202de7ef0873..368d4ca38fd6 100644 --- a/ftp/proftpd-devel/distinfo +++ b/ftp/proftpd-devel/distinfo @@ -1,15 +1,6 @@ -MD5 (proftpd-1.3.2rc1.tar.bz2) = 3fdfe02f632c36ac236deedd85174643 -SHA256 (proftpd-1.3.2rc1.tar.bz2) = d3ac73d7f575ae797cd57e1879b654071fe58e43c3ff8d5ef2a80d6d21475ecc -SIZE (proftpd-1.3.2rc1.tar.bz2) = 2331814 -MD5 (mod_clamav-0.5.1.tar.bz2) = ce9e3f58f05d55d7ec98f97a69889bb8 -SHA256 (mod_clamav-0.5.1.tar.bz2) = de6779ed7a6fe8f5ab809366d7b7793c7658b513d2147c2b7ea0d530549dc92b -SIZE (mod_clamav-0.5.1.tar.bz2) = 3054 -MD5 (mod_digest.c) = e706e66fa4d82cf7875a1a5d6767fe00 -SHA256 (mod_digest.c) = 18174e3d3c1d61367d78c228e6510b0a21c11458f389630df281bb84d467d399 -SIZE (mod_digest.c) = 39073 -MD5 (mod_comb-0.1.tar.bz2) = 99ee47c8b5147196c9a2faa4596eaae7 -SHA256 (mod_comb-0.1.tar.bz2) = 05786083c05cb3e53e3ff723b1ca2036af68d5cd9ebb26d2ae1e8009e05b77f1 -SIZE (mod_comb-0.1.tar.bz2) = 11617 -MD5 (mod_sql_tds-4.5.tar.bz2) = 6fe1feac62f483c2e536d0e3a0abe619 -SHA256 (mod_sql_tds-4.5.tar.bz2) = 4b225c2e945a2587cbb46161a263a8e40922da7bd6beb3fdb76c01aaaac705f5 -SIZE (mod_sql_tds-4.5.tar.bz2) = 10923 +MD5 (proftpd-1.3.20080920.tar.bz2) = 71fcf129c941ee12219a7c1f3aa8257b +SHA256 (proftpd-1.3.20080920.tar.bz2) = d67189b56d959854e678321eeb851453027d293b0d3d3de8781a883a2bf34837 +SIZE (proftpd-1.3.20080920.tar.bz2) = 2345333 +MD5 (mod_clamav-0.10.tar.bz2) = 7150cde88f6c692711c007f6312bd495 +SHA256 (mod_clamav-0.10.tar.bz2) = 4f6d09979514a8b3f120890753dcf7c6247dfce0aa09d340edf8a359b031a1f4 +SIZE (mod_clamav-0.10.tar.bz2) = 5435 diff --git a/ftp/proftpd-devel/files/extra-patch-mod-codeconv b/ftp/proftpd-devel/files/extra-patch-mod-codeconv deleted file mode 100644 index 875533a456cb..000000000000 --- a/ftp/proftpd-devel/files/extra-patch-mod-codeconv +++ /dev/null @@ -1,298 +0,0 @@ -diff -r -u -P modules/mod_codeconv.c modules/mod_codeconv.c ---- modules/mod_codeconv.c 1970-01-01 03:00:00.000000000 +0300 -+++ modules/mod_codeconv.c 2008-03-24 02:55:39.000000000 +0300 -@@ -0,0 +1,231 @@ -+/* -+ * ProFTPD: mod_codeconv -- local <-> remote charset conversion -+ * -+ * Copyright (c) 2004 by TSUJIKAWA Tohru <tsujikawa@tsg.ne.jp> / All rights reserved. -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. -+ * -+ */ -+ -+ -+#include "conf.h" -+#include <iconv.h> -+ -+ -+// -+// directive -+// -+#define DIRECTIVE_CHARSETLOCAL "CharsetLocal" -+#define DIRECTIVE_CHARSETREMOTE "CharsetRemote" -+ -+ -+// -+// initialization -+// -+static int codeconv_init(void) -+{ -+ return 0; -+} -+ -+static int codeconv_sess_init(void) -+{ -+ return 0; -+} -+ -+ -+char* remote2local(struct pool* pool, char* remote) -+{ -+ iconv_t ic; -+ char* local; -+ char* in_ptr; -+ char* out_ptr; -+ size_t inbytesleft, outbytesleft; -+ -+ config_rec* conf_l = NULL; -+ config_rec* conf_r = NULL; -+ -+ conf_l = find_config(main_server->conf, CONF_PARAM, DIRECTIVE_CHARSETLOCAL, FALSE); -+ conf_r = find_config(main_server->conf, CONF_PARAM, DIRECTIVE_CHARSETREMOTE, FALSE); -+ if (!conf_l || !conf_r) return NULL; -+ -+ ic = iconv_open(conf_l->argv[0], conf_r->argv[0]); -+ if (ic == (iconv_t)(-1)) return NULL; -+ -+ iconv(ic, NULL, NULL, NULL, NULL); -+ -+ inbytesleft = remote != NULL ? strlen(remote) : 0; -+ outbytesleft = inbytesleft*3; -+ local = palloc(pool, outbytesleft+1); -+ -+ in_ptr = remote; -+ out_ptr = local; -+ while (inbytesleft) { -+ if (iconv(ic, &in_ptr, &inbytesleft, &out_ptr, &outbytesleft) == -1) { -+ *out_ptr = '?'; out_ptr++; outbytesleft--; -+ in_ptr++; inbytesleft--; -+ break; -+ } -+ } -+ *out_ptr = 0; -+ -+ iconv_close(ic); -+ -+ return local; -+} -+ -+ -+char* local2remote(char* local) -+{ -+ iconv_t ic; -+ char* remote; -+ char* in_ptr; -+ char* out_ptr; -+ size_t inbytesleft, outbytesleft; -+ -+ config_rec* conf_l = NULL; -+ config_rec* conf_r = NULL; -+ -+ conf_l = find_config(main_server->conf, CONF_PARAM, DIRECTIVE_CHARSETLOCAL, FALSE); -+ conf_r = find_config(main_server->conf, CONF_PARAM, DIRECTIVE_CHARSETREMOTE, FALSE); -+ if (!conf_l || !conf_r) return NULL; -+ -+ ic = iconv_open(conf_r->argv[0], conf_l->argv[0]); -+ if (ic == (iconv_t)(-1)) return NULL; -+ -+ iconv(ic, NULL, NULL, NULL, NULL); -+ -+ inbytesleft = local != NULL ? strlen(local) : 0; -+ outbytesleft = inbytesleft*3; -+ remote = malloc(outbytesleft+1); -+ -+ in_ptr = local; -+ out_ptr = remote; -+ while (inbytesleft) { -+ if (iconv(ic, &in_ptr, &inbytesleft, &out_ptr, &outbytesleft) == -1) { -+ *out_ptr = '?'; out_ptr++; outbytesleft--; -+ in_ptr++; inbytesleft--; -+ break; -+ } -+ } -+ *out_ptr = 0; -+ -+ iconv_close(ic); -+ -+ return remote; -+} -+ -+ -+// -+// module handler -+// -+MODRET codeconv_pre_any(cmd_rec* cmd) -+{ -+ char* p; -+ int i; -+ -+ p = remote2local(cmd->pool, cmd->arg); -+ if (p) cmd->arg = p; -+ -+ for (i = 0; i < cmd->argc; i++) { -+ p = remote2local(cmd->pool, cmd->argv[i]); -+ if (p) cmd->argv[i] = p; -+ } -+ -+ return DECLINED(cmd); -+} -+ -+ -+// -+// local charset directive "CharsetLocal" -+// -+MODRET set_charsetlocal(cmd_rec *cmd) { -+ config_rec *c = NULL; -+ -+ /* Syntax: CharsetLocal iconv-charset-name */ -+ -+ CHECK_ARGS(cmd, 1); -+ CHECK_CONF(cmd, CONF_ROOT|CONF_VIRTUAL|CONF_GLOBAL); -+ -+ c = add_config_param_str(DIRECTIVE_CHARSETLOCAL, 1, cmd->argv[1]); -+ -+ return HANDLED(cmd); -+} -+ -+// -+// remote charset directive "CharsetRemote" -+// -+MODRET set_charsetremote(cmd_rec *cmd) { -+ config_rec *c = NULL; -+ -+ /* Syntax: CharsetRemote iconv-charset-name */ -+ -+ CHECK_ARGS(cmd, 1); -+ CHECK_CONF(cmd, CONF_ROOT|CONF_VIRTUAL|CONF_GLOBAL); -+ -+ c = add_config_param_str(DIRECTIVE_CHARSETREMOTE, 1, cmd->argv[1]); -+ -+ return HANDLED(cmd); -+} -+ -+ -+// -+// module ÍÑ directive -+// -+static conftable codeconv_conftab[] = { -+ { DIRECTIVE_CHARSETLOCAL, set_charsetlocal, NULL }, -+ { DIRECTIVE_CHARSETREMOTE, set_charsetremote, NULL }, -+ { NULL, NULL, NULL } -+}; -+ -+ -+// -+// trap ¤¹¤ë¥³¥Þ¥ó¥É°ìÍ÷ -+// -+static cmdtable codeconv_cmdtab[] = { -+ { PRE_CMD, C_ANY, G_NONE, codeconv_pre_any, FALSE, FALSE }, -+ { 0, NULL } -+}; -+ -+ -+// -+// module ¾ðÊó -+// -+module codeconv_module = { -+ -+ /* Always NULL */ -+ NULL, NULL, -+ -+ /* Module API version (2.0) */ -+ 0x20, -+ -+ /* Module name */ -+ "codeconv", -+ -+ /* Module configuration directive handlers */ -+ codeconv_conftab, -+ -+ /* Module command handlers */ -+ codeconv_cmdtab, -+ -+ /* Module authentication handlers (none in this case) */ -+ NULL, -+ -+ /* Module initialization */ -+ codeconv_init, -+ -+ /* Session initialization */ -+ codeconv_sess_init -+ -+}; - -diff -r -u -P modules/mod_ls.c modules/mod_ls.c ---- modules/mod_ls.c 2007-09-28 04:53:59.000000000 +0400 -+++ modules/mod_ls.c 2008-03-24 02:55:39.000000000 +0300 -@@ -244,12 +244,15 @@ - return res; - } - -+extern char* local2remote(char*); -+ - /* sendline() now has an internal buffer, to help speed up LIST output. */ - static int sendline(int flags, char *fmt, ...) { - static char listbuf[PR_TUNABLE_BUFFER_SIZE] = {'\0'}; - va_list msg; - char buf[PR_TUNABLE_BUFFER_SIZE+1] = {'\0'}; - int res = 0; -+ char* buf2; - - if (flags & LS_SENDLINE_FL_FLUSH) { - size_t listbuflen = strlen(listbuf); -@@ -274,6 +277,13 @@ - - buf[sizeof(buf)-1] = '\0'; - -+ if (buf[0]) { -+ buf2 = local2remote(buf); -+ if (buf2) { -+ strcpy(buf, buf2); free(buf2); -+ } -+ } -+ - /* If buf won't fit completely into listbuf, flush listbuf */ - if (strlen(buf) >= (sizeof(listbuf) - strlen(listbuf))) { - res = pr_data_xfer(listbuf, strlen(listbuf)); -diff -r -u -P src/netio.c src/netio.c ---- src/netio.c 2007-08-22 18:50:23.000000000 +0400 -+++ src/netio.c 2008-03-24 02:55:39.000000000 +0300 -@@ -547,9 +547,12 @@ - return -1; - } - -+extern char* local2remote(char* local); -+ - int pr_netio_printf(pr_netio_stream_t *nstrm, const char *fmt, ...) { - va_list msg; - char buf[PR_RESPONSE_BUFFER_SIZE] = {'\0'}; -+ char* p; - - if (!nstrm) { - errno = EINVAL; -@@ -561,6 +564,13 @@ - va_end(msg); - buf[sizeof(buf)-1] = '\0'; - -+ if (buf[0]) { -+ p = local2remote(buf); -+ if (p) { -+ strcpy(buf, p); free(p); -+ } -+ } -+ - return pr_netio_write(nstrm, buf, strlen(buf)); - } diff --git a/ftp/proftpd-devel/pkg-plist b/ftp/proftpd-devel/pkg-plist index f63fd23793be..71ccaee85b00 100644 --- a/ftp/proftpd-devel/pkg-plist +++ b/ftp/proftpd-devel/pkg-plist @@ -2,8 +2,10 @@ bin/ftpcount bin/ftpdctl bin/ftptop bin/ftpwho -libdata/pkgconfig/proftpd.pc -lib/proftpd/libsupp.a +bin/prxs +@unexec if cmp -s %D/etc/proftpd.conf %D/etc/proftpd.conf.sample; then rm -f %D/etc/proftpd.conf; fi +etc/proftpd.conf.sample +@exec cp -n %D/%F %B/proftpd.conf include/proftpd/auth.h include/proftpd/bindings.h include/proftpd/buildstamp.h @@ -20,6 +22,7 @@ include/proftpd/display.h include/proftpd/encode.h include/proftpd/env.h include/proftpd/event.h +include/proftpd/expr.h include/proftpd/feat.h include/proftpd/fsio.h include/proftpd/ftp.h @@ -29,6 +32,7 @@ include/proftpd/inet.h include/proftpd/libsupp.h include/proftpd/log.h include/proftpd/mkhome.h +%%CLAMAV%%include/proftpd/mod_clamav.h include/proftpd/mod_ctrls.h include/proftpd/modules.h include/proftpd/netacl.h @@ -49,16 +53,14 @@ include/proftpd/sets.h include/proftpd/str.h include/proftpd/support.h include/proftpd/table.h +include/proftpd/throttle.h include/proftpd/timers.h include/proftpd/trace.h include/proftpd/var.h include/proftpd/version.h include/proftpd/xferlog.h +libdata/pkgconfig/proftpd.pc sbin/ftpshut sbin/in.proftpd sbin/proftpd -@unexec if cmp -s %D/etc/proftpd.conf %D/etc/proftpd.conf.sample; then rm -f %D/etc/proftpd.conf; fi -etc/proftpd.conf.sample -@exec cp -n %D/%F %B/proftpd.conf -@dirrm lib/proftpd @dirrm include/proftpd |