Ticket #15463: Portfile.diff

File Portfile.diff, 5.6 KB (added by markd@…, 16 years ago)
  • Portfile

    old new  
    33PortSystem  1.0
    44
    55name            postfix
    6 version         2.4.6
     6version         2.5.2
    77categories      mail
    88maintainers     wms
    99description     Fast and robust mail transfer agent
     
    1414            Postfix act as delivery daemon for ezmlm-idx.
    1515homepage        http://www.postfix.org/
    1616platforms       darwin
    17 checksums       md5 303327f66c13ff9631734651ee184a88 \
    18                 sha1 226222707fd8d963d3173070cac96370c453ffa7
     17checksums       md5 b0965aea4d548d9bd231af7143aa6942 \
     18                sha1 6589c590b2e2a955bce5615bde1a86c37c572ce0
    1919master_sites    http://www.swissrave.ch/mirror/postfix-source/official/ \
    2020    ftp://ftp.its.cz/MIRRORS/ftp.porcupine.org/mirrors/postfix-release/official/ \
    2121    ftp://ftp.club-internet.fr/pub/mirrors/ftp.porcupine.org/postfix-release/official/
    2222
    23 patchfiles     patch-sys_defs.h patch-main.cf patch-mail_params.h patch-postfix-install
     23patchfiles     patch-sys_defs.h patch-mail_params.h patch-postfix-install
    2424
    2525post-patch {
    2626     eval reinplace "s|/etc/|${prefix}/etc/|g" \
     
    2929          [glob ${worksrcpath}/man/man8/*]
    3030
    3131     reinplace "s|__PREFIX|${prefix}|g" ${worksrcpath}/src/util/sys_defs.h
    32      reinplace "s|__PREFIX|${prefix}|g" ${worksrcpath}/conf/main.cf
    3332     reinplace "s|__PREFIX|${prefix}|g" ${worksrcpath}/src/global/mail_params.h
     33
     34     reinplace "s|#default_privs|default_privs|g" \
     35          ${worksrcpath}/conf/main.cf
     36     reinplace "s|/etc/postfix/network_table|${prefix}/etc/postfix/network_table|g" \
     37          ${worksrcpath}/conf/main.cf
     38     reinplace "s|/etc/postfix/relay_recipients|${prefix}/etc/postfix_relay_recipients|g" \
     39          ${worksrcpath}/conf/main.cf
     40     reinplace "s|/etc/postfix/header_checks|${prefix}/etc/postfix/header_checks|g" \
     41          ${worksrcpath}/conf/main.cf
     42     reinplace "s|/bin:/usr/bin|${prefix}/bin:/bin:/usr/bin|g" \
     43          ${worksrcpath}/conf/main.cf
    3444}
    3545
    3646set CCARGS  -DNO_PCRE
    3747set AUXLIBS "-L${prefix}/lib -R${prefix}/lib -L${prefix}/lib"
     48set pf_mail_owner "postfix"
     49set pf_setgid_group "postdrop"
     50
     51# Beginning with Mac OS X 10.5, the user 'postfix' changed to '_postfix'
     52platform darwin 9 {
     53    global pf_mail_owner
     54    global pf_setgid_group
     55    set pf_mail_owner "_postfix"
     56    set pf_setgid_group "_postdrop"
     57}
    3858
    3959configure {
    4060    system "make makefiles CCARGS=\"${CCARGS}\" AUXLIBS=\"${AUXLIBS}\""
     
    4767startupitem.stop        "${prefix}/sbin/${name} stop"
    4868
    4969destroot {
    50     adduser postfix realname=Postfix\ Server
    51     addgroup postdrop
    52     file mkdir ${destroot}${prefix}/etc/postfix
    53     file mkdir ${destroot}${prefix}/share/postfix
    54     xinstall -d -o postfix -g postdrop -m \
    55         710 ${destroot}${prefix}/var/spool/postfix/public
    56     xinstall -d -o postfix -g postdrop -m 730 \
    57         ${destroot}${prefix}/var/spool/postfix/maildrop
     70#    adduser postfix realname=Postfix\ Server
     71#    addgroup postdrop
     72#    file mkdir ${destroot}${prefix}/etc/postfix
     73#    file mkdir ${destroot}${prefix}/share/postfix
     74#    xinstall -d -o postfix -g postdrop -m \
     75#        710 ${destroot}${prefix}/var/spool/postfix/public
     76#    xinstall -d -o postfix -g postdrop -m 730 \
     77#        ${destroot}${prefix}/var/spool/postfix/maildrop
    5878    destroot.keepdirs ${destroot}${prefix}/var/spool/postfix/public \
    59         ${destroot}${prefix}/var/spool/postfix/maildrop
     79        ${destroot}${prefix}/var/spool/postfix/maildrop \
     80        ${destroot}${prefix}/var/lib/postfix
    6081    system "cd ${worksrcpath} && /bin/sh postfix-install -non-interactive \
    6182        install_root=${destroot} \
    6283        config_directory=${prefix}/etc/postfix \
    63         daemon_directory=${prefix}/libexec/postfix \
    64         command_directory=${prefix}/sbin \
    65         manpage_directory=${prefix}/share/man \
    6684        queue_directory=${prefix}/var/spool/postfix \
     85        command_directory=${prefix}/sbin \
     86        daemon_directory=${prefix}/libexec/postfix \
     87        data_directory=${prefix}/var/lib/postfix \
    6788        sendmail_path=${prefix}/sbin/sendmail \
    6889        newaliases_path=${prefix}/bin/newaliases \
    6990        mailq_path=${prefix}/bin/mailq \
     91        etc_directory=${prefix}/etc/postfix \
     92        share_directory=${prefix}/share/postfix \
     93        manpage_directory=${prefix}/share/man \
    7094        sample_directory=${prefix}/share/postfix/sample \
    71         readme_directory=${prefix}/share/postfix/readme"
    72 }
     95        readme_directory=${prefix}/share/postfix/readme \
     96        mail_owner=${pf_mail_owner} \
     97        setgid_group=${pf_setgid_group}"
     98
    7399# This makes sure we don't overwrite user /etc files. This now breaks postfix
    74100# "just working" on fresh installs.
    75101# YOU MUST MOVE THE SAMPLE FILES TO THE CORRECT NAMESPACE.
    76 # XXX unsure if this stilll an issue 07/07/05 yeled@
    77 post-destroot {
    78     file rename ${destroot}${prefix}/etc/postfix/main.cf \
    79         ${destroot}${prefix}/etc/postfix/main.cf.sample
    80     file rename ${destroot}${prefix}/etc/postfix/master.cf \
    81         ${destroot}${prefix}/etc/postfix/master.cf.sample
    82     file rename ${destroot}${prefix}/etc/postfix/aliases \
    83         ${destroot}${prefix}/etc/postfix/aliases.sample
     102# XXX unsure if this still an issue 07/07/05 yeled@
     103
     104        file rename ${destroot}${prefix}/etc/postfix/main.cf \
     105            ${destroot}${prefix}/etc/postfix/main.cf.sample
     106        file rename ${destroot}${prefix}/etc/postfix/master.cf \
     107            ${destroot}${prefix}/etc/postfix/master.cf.sample
     108        file rename ${destroot}${prefix}/etc/postfix/aliases \
     109            ${destroot}${prefix}/etc/postfix/aliases.sample
    84110}
    85111
    86112post-install {