[134725] trunk/dports/mail/mailman/Portfile
larryv at macports.org
larryv at macports.org
Sun Apr 5 10:28:41 PDT 2015
Revision: 134725
https://trac.macports.org/changeset/134725
Author: larryv at macports.org
Date: 2015-04-05 10:28:41 -0700 (Sun, 05 Apr 2015)
Log Message:
-----------
mailman: Rearrange and reformat (#45650)
Modified Paths:
--------------
trunk/dports/mail/mailman/Portfile
Modified: trunk/dports/mail/mailman/Portfile
===================================================================
--- trunk/dports/mail/mailman/Portfile 2015-04-05 14:23:17 UTC (rev 134724)
+++ trunk/dports/mail/mailman/Portfile 2015-04-05 17:28:41 UTC (rev 134725)
@@ -1,127 +1,124 @@
# -*- 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
# $Id$
-PortSystem 1.0
+PortSystem 1.0
-name mailman
-version 2.1.13
-categories mail
-license GPL-2
-maintainers nomaintainer
-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.
+name mailman
+version 2.1.13
+categories mail
+platforms darwin
+license GPL-2
+maintainers nomaintainer
-homepage http://www.list.org/
-master_sites sourceforge
-extract.suffix .tgz
+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/
-checksums md5 3235323ccb3e0135c10b7c66a440390b \
- sha1 923dd78a17cbab576354b53a80443fe05f134398 \
- rmd160 3a62b04ea0f48c3ecbe815eb927d282f765e416c
+depends_lib port:python26
-platforms darwin
+master_sites sourceforge
+extract.suffix .tgz
+checksums md5 3235323ccb3e0135c10b7c66a440390b \
+ sha1 923dd78a17cbab576354b53a80443fe05f134398 \
+ rmd160 3a62b04ea0f48c3ecbe815eb927d282f765e416c
-depends_lib port:python26
-
# Create a startupitem
-startupitem.create yes
-startupitem.start "${prefix}/share/mailman/bin/mailman.init start"
-startupitem.stop "${prefix}/share/mailman/bin/mailman.init stop"
+startupitem.create yes
+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
+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
-set mmuser mailman
-set mmgroup mailman
+set mmuser mailman
+set mmgroup mailman
# CGI group name (should match apache Portfile)
-set cgigroup www
+set cgigroup www
-patchfiles patch-Defaults.py.in \
- patch-mm_cfg.py.dist.in
+patchfiles patch-Defaults.py.in \
+ patch-mm_cfg.py.dist.in
-configure.pre_args --exec-prefix=${execdir} \
- --prefix=${sharedir} \
- --with-var-prefix=${datadir}
+configure.pre_args --exec-prefix=${execdir} \
+ --prefix=${sharedir} \
+ --with-var-prefix=${datadir}
-configure.args --with-username=${mmuser} \
- --with-groupname=${mmgroup} \
- --with-mail-gid=${mmgroup} \
- --with-cgi-gid=${cgigroup} \
- --with-cgi-ext=.cgi \
- --without-permcheck \
- --with-python=${prefix}/bin/python2.6
+configure.args --with-cgi-ext=.cgi \
+ --with-cgi-gid=${cgigroup} \
+ --with-groupname=${mmgroup} \
+ --with-mail-gid=${mmgroup} \
+ --with-python=${prefix}/bin/python2.6 \
+ --with-username=${mmuser} \
+ --without-permcheck
pre-destroot {
- addgroup ${mmgroup}
- 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}
+ addgroup ${mmgroup}
+ 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}
}
post-destroot {
- # 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"
+ # 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
- }
+ # 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
+ }
- # Install startup script
- 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 startup script
+ 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 \
- ${destroot}${confdir}/${name}.conf.dist
- reinplace "s|@EXECDIR@|${execdir}|" ${destroot}${confdir}/${name}.conf.dist
- reinplace "s|@DATADIR@|${datadir}|" ${destroot}${confdir}/${name}.conf.dist
- reinplace "s|@SHAREDIR@|${sharedir}|" ${destroot}${confdir}/${name}.conf.dist
- reinplace "s|@CONFDIR@|${confdir}|" \
- ${destroot}${sharedir}/Mailman/mm_cfg.py.dist
+ # Install Apache configuration file
+ xinstall -d -m 0755 ${destroot}${confdir}
+ xinstall -m 0644 ${filespath}/${name}.conf.in \
+ ${destroot}${confdir}/${name}.conf.dist
+ reinplace "s|@EXECDIR@|${execdir}|" ${destroot}${confdir}/${name}.conf.dist
+ reinplace "s|@DATADIR@|${datadir}|" ${destroot}${confdir}/${name}.conf.dist
+ reinplace "s|@SHAREDIR@|${sharedir}|" ${destroot}${confdir}/${name}.conf.dist
+ reinplace "s|@CONFDIR@|${confdir}|" \
+ ${destroot}${sharedir}/Mailman/mm_cfg.py.dist
- # Install documentation files
- xinstall -d -m 0755 ${destroot}${docdir}
- foreach file [glob ${worksrcpath}/\[A-IN-Z\]*] {
- xinstall -m 0644 ${file} ${destroot}${docdir}
- }
+ # Install documentation files
+ xinstall -d -m 0755 ${destroot}${docdir}
+ foreach file [glob ${worksrcpath}/\[A-IN-Z\]*] {
+ xinstall -m 0644 ${file} ${destroot}${docdir}
+ }
- # Check installation under destroot
- system "cd ${destroot}${sharedir} && \
- DESTDIR=${destroot} PYTHONPATH=.:./pythonlib ./bin/check_perms"
+ # Check installation under destroot
+ system "cd ${destroot}${sharedir} && \
+ DESTDIR=${destroot} PYTHONPATH=.:./pythonlib ./bin/check_perms"
- # Don't register config files to the port so changes are preserved
- # across upgrades.
- file delete -force ${destroot}${sharedir}/Mailman/mm_cfg.py
+ # Don't register config files to the port so changes are preserved
+ # across upgrades.
+ file delete -force ${destroot}${sharedir}/Mailman/mm_cfg.py
}
post-activate {
- # Check for an existing mm_cfg.py and copy the "dist" version
- # into place if there isn't one.
- if {![file exists ${sharedir}/Mailman/mm_cfg.py]} {
- copy ${sharedir}/Mailman/mm_cfg.py.dist \
- ${sharedir}/Mailman/mm_cfg.py
- }
- if {![file exists ${confdir}/${name}.conf]} {
- copy ${confdir}/${name}.conf.dist \
- ${confdir}/${name}.conf
- }
+ # Check for an existing mm_cfg.py and copy the "dist" version
+ # into place if there isn't one.
+ if {![file exists ${sharedir}/Mailman/mm_cfg.py]} {
+ copy ${sharedir}/Mailman/mm_cfg.py.dist ${sharedir}/Mailman/mm_cfg.py
+ }
+ if {![file exists ${confdir}/${name}.conf]} {
+ copy ${confdir}/${name}.conf.dist ${confdir}/${name}.conf
+ }
}
# Notify the user what needs to be done after installation
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150405/43c5f078/attachment.html>
More information about the macports-changes
mailing list