diff options
author | wxs <wxs@FreeBSD.org> | 2011-04-17 21:34:01 +0800 |
---|---|---|
committer | wxs <wxs@FreeBSD.org> | 2011-04-17 21:34:01 +0800 |
commit | 26338c0b3c512b757ed40bfc9ec88996ce6f511c (patch) | |
tree | 140d1476b7f7f6487f25e264caafd821ea578590 /mail/mailman | |
parent | 7eda87f6d71eb3b6a784a5bb3d3055a044d86c6b (diff) | |
download | freebsd-ports-gnome-26338c0b3c512b757ed40bfc9ec88996ce6f511c.tar.gz freebsd-ports-gnome-26338c0b3c512b757ed40bfc9ec88996ce6f511c.tar.zst freebsd-ports-gnome-26338c0b3c512b757ed40bfc9ec88996ce6f511c.zip |
Add option for NAMAZU2, off by default so no PORTREVISION bump.
PR: portts/156296
Submitted by: TAKATSU Tomonari <tota@FreeBSD.org>
Diffstat (limited to 'mail/mailman')
-rw-r--r-- | mail/mailman/Makefile | 13 | ||||
-rw-r--r-- | mail/mailman/files/extra-patch-Mailman-Cgi-private.py | 30 | ||||
-rw-r--r-- | mail/mailman/files/pkg-message.in | 8 |
3 files changed, 49 insertions, 2 deletions
diff --git a/mail/mailman/Makefile b/mail/mailman/Makefile index fc53bfb1d3fb..4297247cfcda 100644 --- a/mail/mailman/Makefile +++ b/mail/mailman/Makefile @@ -7,7 +7,6 @@ PORTNAME= mailman DISTVERSION= 2.1.14 -PORTREVISION= 1 CATEGORIES?= mail MASTER_SITES= ${MASTER_SITE_GNU} \ SF/${PORTNAME}/Mailman%202.1%20%28stable%29/${PORTVERSION} @@ -24,7 +23,8 @@ OPTIONS= SENDMAIL "for use with sendmail" off \ POSTFIX "for use with postfix" off \ COURIER "for use with courier" off \ CHINESE "support for Chinese mailing lists" off \ - HTDIG "htdig integration patches" off + HTDIG "htdig integration patches" off \ + NAMAZU2 "make private archives searchable with namazu2" off HAS_CONFIGURE= yes USE_PYTHON= yes @@ -124,6 +124,15 @@ PLIST_SUB+= SUB_HTDIG="" PLIST_SUB+= SUB_HTDIG="@comment " .endif +.if defined(WITH_NAMAZU2) +.if defined(PKGNAMEPREFIX) && ${PKGNAMEPREFIX} == "ja-" +RUN_DEPENDS+= mknmz:${PORTSDIR}/japanese/namazu2 +.else +RUN_DEPENDS+= mknmz:${PORTSDIR}/databases/namazu2 +.endif +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-Mailman-Cgi-private.py +.endif + pre-fetch: @${ECHO} "" @${ECHO} "You may change the following build options:" diff --git a/mail/mailman/files/extra-patch-Mailman-Cgi-private.py b/mail/mailman/files/extra-patch-Mailman-Cgi-private.py new file mode 100644 index 000000000000..2f6632f2c9c7 --- /dev/null +++ b/mail/mailman/files/extra-patch-Mailman-Cgi-private.py @@ -0,0 +1,30 @@ +--- Mailman/Cgi/private.py.orig 2010-09-21 03:18:27.000000000 +0900 ++++ Mailman/Cgi/private.py 2011-04-08 22:28:09.000000000 +0900 +@@ -116,6 +116,7 @@ + + i18n.set_language(mlist.preferred_language) + doc.set_language(mlist.preferred_language) ++ is_cgi = 0 + + cgidata = cgi.FieldStorage() + username = cgidata.getvalue('username', '') +@@ -179,6 +180,10 @@ + elif true_filename.endswith('.gz'): + import gzip + f = gzip.open(true_filename, 'r') ++ elif true_filename.endswith('namazu.cgi'): ++ os.putenv('SCRIPT_NAME', 'namazu.cgi') ++ f = os.popen(true_filename, 'r') ++ is_cgi = 1 + else: + f = open(true_filename, 'r') + except IOError: +@@ -188,6 +193,7 @@ + print doc.Format() + syslog('error', 'Private archive file not found: %s', true_filename) + else: +- print 'Content-type: %s\n' % ctype ++ if not is_cgi: ++ print 'Content-type: %s\n' % ctype + sys.stdout.write(f.read()) + f.close() diff --git a/mail/mailman/files/pkg-message.in b/mail/mailman/files/pkg-message.in index 0b34fa0faba5..8c6f6452f90a 100644 --- a/mail/mailman/files/pkg-message.in +++ b/mail/mailman/files/pkg-message.in @@ -18,4 +18,12 @@ installed in %%MAILMANDIR%%/bin Note (3): As of version 2.1, Mailman's queue runner runs as a daemon and is started by a script in %%LOCALBASE%%/etc/rc.d + +In order to make private archives searchable with namazu2, you need copy +or link %%LOCALBASE%%/libexec/namazu.cgi to +MAILMANDIR%%/archives/private/<ML name>/ and configure .namazurc +to refer to %%LOCALBASE%%/etc/namazu/namazu-sample. +See also +http://www.python.jp/pipermail/mailman-users-jp/2004-August/001008.html +written in Japanese. ---------------------------------------------------------------------------- |