# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
description Mailman, the GNU Mailing List Manager
long_description Mailman is free software for managing electronic \
mail discussion and e-newsletter lists. Mailman is \
integrated with the web, making it easy for users \
to manage their accounts and for list owners to \
administer their lists. Mailman supports built-in \
archiving, automatic bounce processing, content \
filtering, digest delivery, spam filters, and more.
homepage http://www.list.org/
depends_lib port:python27 \
checksums rmd160 d3ea74a88214a81563a1b5f52166f7352136777d \
sha256 838872713601e8a124146e550f53709482c1ef168f1e16d201465c651cbf0d2c \
startupitem.start "${prefix}/share/mailman/bin/mailman.init start"
startupitem.stop "${prefix}/share/mailman/bin/mailman.init stop"
# Mailman installation directories
set execdir ${prefix}/libexec/${name}
set sharedir ${prefix}/share/${name}
set datadir ${prefix}/var/${name}
set docdir ${prefix}/share/doc/${name}
set confdir ${prefix}/etc/httpd
# Mailman user/group name
# CGI group name (should match apache Portfile)
patchfiles patch-Defaults.py.in \
configure.pre_args --exec-prefix=${execdir} \
--with-var-prefix=${datadir}
configure.args --with-cgi-ext=.cgi \
--with-cgi-gid=${cgigroup} \
--with-groupname=${mmgroup} \
--with-mail-gid=${mmgroup} \
--with-python=${prefix}/bin/python2.7 \
--with-username=${mmuser} \
adduser ${mmuser} gid=[existsgroup ${mmgroup}]
xinstall -d -m 02775 -o root -g ${mmgroup} ${destroot}${execdir}
xinstall -d -m 02775 -o root -g ${mmgroup} ${destroot}${sharedir}
xinstall -d -m 02775 -o ${mmuser} -g ${mmgroup} ${destroot}${datadir}
# Create dummy files to retain empty directory tree
xinstall -d -m 02775 ${destroot}${datadir}/lists/.turd
system "find ${destroot}${datadir} -type d -empty | xargs -n1 -I% touch %/.turd"
# Cleanup permissions & ownership
foreach dir [exec find ${destroot}${sharedir} -type d ! -perm 02775] {
ui_info "${dir}: setting permissions to 02775"
file attributes $dir -permissions 02775
xinstall -d -m 0755 ${destroot}${prefix}/etc/rc.d
system "ln -s ../../../[strsed ${sharedir} "g|^${prefix}/||"]/scripts/mailman \
${destroot}${prefix}/share/mailman/bin/mailman.init"
# Install Apache configuration file
xinstall -d -m 0755 ${destroot}${confdir}
xinstall -m 0644 ${filespath}/${name}.conf.in \