aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWesley Shields <wxs@FreeBSD.org>2011-04-17 13:34:01 +0000
committerWesley Shields <wxs@FreeBSD.org>2011-04-17 13:34:01 +0000
commit4a4892cbdbb1dc980f51f1b05281e74ba0002924 (patch)
tree3958fb1de2575e83373db4620f6e844323ef8648
parent9c638c5fe21fe2051e3dcbbf782348e821b5eae3 (diff)
downloadports-4a4892cbdbb1dc980f51f1b05281e74ba0002924.tar.gz
ports-4a4892cbdbb1dc980f51f1b05281e74ba0002924.zip
Notes
-rw-r--r--mail/mailman/Makefile13
-rw-r--r--mail/mailman/files/extra-patch-Mailman-Cgi-private.py30
-rw-r--r--mail/mailman/files/pkg-message.in8
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.
----------------------------------------------------------------------------