Ticket #45650: Portfile-mailman-whitespace.diff

File Portfile-mailman-whitespace.diff, 8.8 KB (added by Schamschula (Marius Schamschula), 10 years ago)
  • Portfile

    old new  
    11# -*- 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
    22# $Id$
    33
    4 PortSystem              1.0
     4PortSystem          1.0
    55
    6 name                    mailman
    7 version                 2.1.13
    8 categories              mail
    9 license                 GPL-2
    10 maintainers             nomaintainer
    11 description             Mailman, the GNU Mailing List Manager
    12 long_description        Mailman is free software for managing electronic \
    13                         mail discussion and e-newsletter lists. Mailman is \
    14                         integrated with the web, making it easy for users to \
    15                         manage their accounts and for list owners to \
    16                         administer their lists. Mailman supports built-in \
    17                         archiving, automatic bounce processing, content \
    18                         filtering, digest delivery, spam filters, and more.
    19 
    20 homepage                http://www.list.org/
    21 master_sites            sourceforge
    22 extract.suffix          .tgz
    23 
    24 checksums               md5     3235323ccb3e0135c10b7c66a440390b \
    25                         sha1    923dd78a17cbab576354b53a80443fe05f134398 \
    26                         rmd160  3a62b04ea0f48c3ecbe815eb927d282f765e416c
     6name                mailman
     7version             2.1.13
     8categories          mail
     9license             GPL-2
     10maintainers         nomaintainer
     11description         Mailman, the GNU Mailing List Manager
     12long_description    Mailman is free software for managing electronic \
     13                    mail discussion and e-newsletter lists. Mailman is \
     14                    integrated with the web, making it easy for users to \
     15                    manage their accounts and for list owners to \
     16                    administer their lists. Mailman supports built-in \
     17                    archiving, automatic bounce processing, content \
     18                    filtering, digest delivery, spam filters, and more.
     19
     20homepage            http://www.list.org/
     21master_sites        sourceforge
     22extract.suffix      .tgz
     23
     24checksums           md5     3235323ccb3e0135c10b7c66a440390b \
     25                    sha1    923dd78a17cbab576354b53a80443fe05f134398 \
     26                    rmd160  3a62b04ea0f48c3ecbe815eb927d282f765e416c
    2727
    28 platforms               darwin
     28platforms           darwin
    2929
    30 depends_lib             port:python26
     30depends_lib         port:python26
    3131
    3232# Create a startupitem
    33 startupitem.create      yes
    34 startupitem.start       "${prefix}/share/mailman/bin/mailman.init start"
    35 startupitem.stop        "${prefix}/share/mailman/bin/mailman.init stop"
     33startupitem.create  yes
     34startupitem.start   "${prefix}/share/mailman/bin/mailman.init start"
     35startupitem.stop    "${prefix}/share/mailman/bin/mailman.init stop"
    3636
    3737# Mailman installation directories
    38 set execdir             ${prefix}/libexec/${name}
    39 set sharedir            ${prefix}/share/${name}
    40 set datadir             ${prefix}/var/${name}
    41 set docdir              ${prefix}/share/doc/${name}
    42 set confdir             ${prefix}/etc/httpd
     38set execdir         ${prefix}/libexec/${name}
     39set sharedir        ${prefix}/share/${name}
     40set datadir         ${prefix}/var/${name}
     41set docdir          ${prefix}/share/doc/${name}
     42set confdir         ${prefix}/etc/httpd
    4343
    4444# Mailman user/group name
    45 set mmuser              mailman
    46 set mmgroup             mailman
     45set mmuser          mailman
     46set mmgroup         mailman
    4747
    4848# CGI group name (should match apache Portfile)
    49 set cgigroup            www
     49set cgigroup        www
    5050
    51 patchfiles              patch-Defaults.py.in \
    52                         patch-mm_cfg.py.dist.in
     51patchfiles          patch-Defaults.py.in \
     52                    patch-mm_cfg.py.dist.in
    5353
    54 configure.pre_args      --exec-prefix=${execdir} \
    55                         --prefix=${sharedir} \
    56                         --with-var-prefix=${datadir}
    57 
    58 configure.args          --with-username=${mmuser} \
    59                         --with-groupname=${mmgroup} \
    60                         --with-mail-gid=${mmgroup} \
    61                         --with-cgi-gid=${cgigroup} \
    62                         --with-cgi-ext=.cgi \
    63                         --without-permcheck \
    64                         --with-python=${prefix}/bin/python2.6
     54configure.pre_args  --exec-prefix=${execdir} \
     55                    --prefix=${sharedir} \
     56                    --with-var-prefix=${datadir}
     57
     58configure.args      --with-username=${mmuser} \
     59                    --with-groupname=${mmgroup} \
     60                    --with-mail-gid=${mmgroup} \
     61                    --with-cgi-gid=${cgigroup} \
     62                    --with-cgi-ext=.cgi \
     63                    --without-permcheck \
     64                    --with-python=${prefix}/bin/python2.6
    6565
    6666pre-destroot {
    67         addgroup        ${mmgroup}
    68         adduser         ${mmuser} gid=[existsgroup ${mmgroup}]
    69         xinstall -d -m 02775 -o root -g ${mmgroup} ${destroot}${execdir}
    70         xinstall -d -m 02775 -o root -g ${mmgroup} ${destroot}${sharedir}
    71         xinstall -d -m 02775 -o ${mmuser} -g ${mmgroup} ${destroot}${datadir}
     67    addgroup    ${mmgroup}
     68    adduser     ${mmuser} gid=[existsgroup ${mmgroup}]
     69    xinstall -d -m 02775 -o root -g ${mmgroup} ${destroot}${execdir}
     70    xinstall -d -m 02775 -o root -g ${mmgroup} ${destroot}${sharedir}
     71    xinstall -d -m 02775 -o ${mmuser} -g ${mmgroup} ${destroot}${datadir}
    7272}
    7373post-destroot {
    74         # Create dummy files to retain empty directory tree
    75         xinstall -d -m 02775 ${destroot}${datadir}/lists/.turd
    76         system "find ${destroot}${datadir} -type d -empty | xargs -n1 -I% touch %/.turd"
    77 
    78         # Cleanup permissions & ownership
    79         foreach dir [exec find ${destroot}${sharedir} -type d ! -perm 02775] {
    80                 ui_info "${dir}: setting permissions to 02775"
    81                 file attributes $dir -permissions 02775
    82         }
    83 
    84         # Install startup script
    85         xinstall -d -m 0755 ${destroot}${prefix}/etc/rc.d
    86         system "ln -s ../../../[strsed ${sharedir} "g|^${prefix}/||"]/scripts/mailman \
    87                 ${destroot}${prefix}/share/mailman/bin/mailman.init"
    88 
    89         # Install Apache configuration file
    90         xinstall -d -m 0755 ${destroot}${confdir}
    91         xinstall -m 0644 ${filespath}/${name}.conf.in \
    92                 ${destroot}${confdir}/${name}.conf.dist
    93         reinplace "s|@EXECDIR@|${execdir}|" ${destroot}${confdir}/${name}.conf.dist
    94         reinplace "s|@DATADIR@|${datadir}|" ${destroot}${confdir}/${name}.conf.dist
    95         reinplace "s|@SHAREDIR@|${sharedir}|" ${destroot}${confdir}/${name}.conf.dist
    96         reinplace "s|@CONFDIR@|${confdir}|" \
    97                 ${destroot}${sharedir}/Mailman/mm_cfg.py.dist
    98 
    99         # Install documentation files
    100         xinstall -d -m 0755 ${destroot}${docdir}
    101         foreach file [glob ${worksrcpath}/\[A-IN-Z\]*] {
    102                 xinstall -m 0644 ${file} ${destroot}${docdir}
    103         }
    104 
    105         # Check installation under destroot
    106         system "cd ${destroot}${sharedir} && \
    107                 DESTDIR=${destroot} PYTHONPATH=.:./pythonlib ./bin/check_perms"
    108 
    109         # Don't register config files to the port so changes are preserved
    110         # across upgrades.
    111         file delete -force ${destroot}${sharedir}/Mailman/mm_cfg.py
     74    # Create dummy files to retain empty directory tree
     75    xinstall -d -m 02775 ${destroot}${datadir}/lists/.turd
     76    system "find ${destroot}${datadir} -type d -empty | xargs -n1 -I% touch %/.turd"
     77
     78    # Cleanup permissions & ownership
     79    foreach dir [exec find ${destroot}${sharedir} -type d ! -perm 02775] {
     80        ui_info "${dir}: setting permissions to 02775"
     81        file attributes $dir -permissions 02775
     82    }
     83
     84    # Install startup script
     85    xinstall -d -m 0755 ${destroot}${prefix}/etc/rc.d
     86    system "ln -s ../../../[strsed ${sharedir} "g|^${prefix}/||"]/scripts/mailman \
     87        ${destroot}${prefix}/share/mailman/bin/mailman.init"
     88
     89    # Install Apache configuration file
     90    xinstall -d -m 0755 ${destroot}${confdir}
     91    xinstall -m 0644 ${filespath}/${name}.conf.in \
     92        ${destroot}${confdir}/${name}.conf.dist
     93    reinplace "s|@EXECDIR@|${execdir}|" ${destroot}${confdir}/${name}.conf.dist
     94    reinplace "s|@DATADIR@|${datadir}|" ${destroot}${confdir}/${name}.conf.dist
     95    reinplace "s|@SHAREDIR@|${sharedir}|" ${destroot}${confdir}/${name}.conf.dist
     96    reinplace "s|@CONFDIR@|${confdir}|" \
     97        ${destroot}${sharedir}/Mailman/mm_cfg.py.dist
     98
     99    # Install documentation files
     100    xinstall -d -m 0755 ${destroot}${docdir}
     101    foreach file [glob ${worksrcpath}/\[A-IN-Z\]*] {
     102        xinstall -m 0644 ${file} ${destroot}${docdir}
     103    }
     104
     105    # Check installation under destroot
     106    system "cd ${destroot}${sharedir} && \
     107        DESTDIR=${destroot} PYTHONPATH=.:./pythonlib ./bin/check_perms"
     108
     109    # Don't register config files to the port so changes are preserved
     110    # across upgrades.
     111    file delete -force ${destroot}${sharedir}/Mailman/mm_cfg.py
    112112}
    113113
    114114post-activate {
    115         # Check for an existing mm_cfg.py and copy the "dist" version
    116         # into place if there isn't one.
    117         if {![file exists ${sharedir}/Mailman/mm_cfg.py]} {
    118                 copy ${sharedir}/Mailman/mm_cfg.py.dist \
    119                         ${sharedir}/Mailman/mm_cfg.py
    120         }
    121         if {![file exists ${confdir}/${name}.conf]} {
    122                 copy ${confdir}/${name}.conf.dist \
    123                         ${confdir}/${name}.conf
    124         }
     115    # Check for an existing mm_cfg.py and copy the "dist" version
     116    # into place if there isn't one.
     117    if {![file exists ${sharedir}/Mailman/mm_cfg.py]} {
     118        copy ${sharedir}/Mailman/mm_cfg.py.dist \
     119            ${sharedir}/Mailman/mm_cfg.py
     120    }
     121    if {![file exists ${confdir}/${name}.conf]} {
     122        copy ${confdir}/${name}.conf.dist \
     123            ${confdir}/${name}.conf
     124    }
    125125}
    126126
    127127# Notify the user what needs to be done after installation