Ticket #18371: Portfile-p5-mail-spamassassin.diff

File Portfile-p5-mail-spamassassin.diff, 7.1 KB (added by compconsultant@…, 15 years ago)
  • Portfile

    old new  
    1 # $Id: Portfile 45607 2009-01-18 21:21:38Z simon@macports.org $
     1# $Id$
    22
    3 PortSystem          1.0
    4 PortGroup           perl5 1.0
     3PortSystem              1.0
     4PortGroup               perl5 1.0
    55
    6 perl5.setup         Mail-SpamAssassin 3.2.5
    7 revision            1
    8 categories-append   mail
    9 platforms           darwin
    10 maintainers         simon openmaintainer
    11 description         mail filter to identify spam
    12 long_description    SpamAssassin(tm) is a mail filter to identify spam. \
    13                     Using its rule base, it uses a wide range of \
    14                     heuristic tests on mail headers and body text to \
    15                     identify spam, also known as unsolicited commercial \
    16                     email.
    17 
    18 homepage            http://spamassassin.apache.org/
    19 
    20 checksums           md5 7fdc1651d0371c4a7f95ac9ae6f828a6 \
    21                     sha1 14b1f6eae0221a152176f7f597f55581445e800a \
    22                     rmd160 5a72a97d124e72ff4da1627982748377f1e34128
    23 
    24 depends_lib-append  port:p5-digest-sha1 \
    25                     port:p5-html-parser \
    26                     port:p5-mailtools \
    27                     port:p5-mail-audit \
    28                     port:p5-net-dns \
    29                     port:p5-net-ident \
    30                     port:p5-archive-tar \
    31                     port:p5-lwp-authen-wsse
    32 
    33 startupitem.create      yes
    34 startupitem.name        spamd
    35 startupitem.executable  "${prefix}/bin/spamd"
     6perl5.setup             Mail-SpamAssassin 3.2.5
     7revision                2
     8categories-append       mail
     9platforms               darwin
     10maintainers             simon openmaintainer
     11description             mail filter to identify spam
     12long_description        SpamAssassin(tm) is a mail filter to identify spam. \
     13                        Using its rule base, it uses a wide range of \
     14                        heuristic tests on mail headers and body text to \
     15                        identify spam, also known as unsolicited commercial \
     16                        email.
     17
     18homepage                http://spamassassin.apache.org/
     19
     20checksums               md5 7fdc1651d0371c4a7f95ac9ae6f828a6 \
     21                        sha1 14b1f6eae0221a152176f7f597f55581445e800a \
     22                        rmd160 5a72a97d124e72ff4da1627982748377f1e34128
     23
     24depends_lib-append      port:p5-digest-sha1 \
     25                        port:p5-html-parser \
     26                        port:p5-mailtools \
     27                        port:p5-mail-audit \
     28                        port:p5-net-dns \
     29                        port:p5-net-ident \
     30                        port:p5-archive-tar \
     31                        port:p5-io-compress-zlib \
     32                        port:p5-compress-zlib \
     33                        port:p5-ip-country \
     34                        port:p5-time-hires \
     35                        port:p5-mail-dkim \
     36                        port:p5-mail-spf \
     37                        port:p5-libwww-perl \
     38                        port:p5-mime-base64
     39
     40patchfiles              patch-Makefile.PL.diff
     41
     42startupitem.create      yes
     43startupitem.name        spamd
     44if {[variant_isset vpopmail]} {
     45        startupitem.executable  ${prefix}/bin/spamd -l -v -u vpopmail
     46        patchfiles-append       patch-spamd.raw.diff
     47} else {
     48        startupitem.executable  ${prefix}/bin/spamd -l
     49}
    3650
    37 patchfiles          patch-Makefile.PL.diff
     51set conf_files {init.pre local.cf v310.pre v312.pre v320.pre}
    3852
    3953post-patch {
    40     reinplace "s|return ''|return 'PRIV'|" ${worksrcpath}/Makefile.PL
     54        reinplace "s|return ''|return 'PRIV'|" ${worksrcpath}/Makefile.PL
    4155}
    4256
    43 configure.args-append   CONTACT_ADDRESS=root@localhost \
    44                         PREFIX=${prefix} \
    45                         SYSCONFDIR=${prefix}/etc \
    46                         DATADIR=${prefix}/share/spamassassin \
    47                         LOCALSTATEDIR=${prefix}/var/spamassassin \
    48                         CONFDIR=${prefix}/etc/mail/spamassassin
    49 
    50 destroot.target-append      conf__install data__install
     57configure.args-append   CONTACT_ADDRESS=root@localhost \
     58                        PREFIX=${prefix} \
     59                        SYSCONFDIR=${prefix}/etc \
     60                        DATADIR=${prefix}/share/spamassassin \
     61                        LOCALSTATEDIR=${prefix}/var/spamassassin \
     62                        CONFDIR=${prefix}/etc/mail/spamassassin
    5163
    52 # All configuration files for spamassassin.
    53 set conf_files      {init.pre local.cf v310.pre v312.pre v320.pre}
     64destroot.target-append  conf__install data__install
    5465
    5566post-destroot {
    56     set etc ${destroot}${prefix}/etc/mail/spamassassin
    57     foreach file ${conf_files} {
    58         file rename ${etc}/${file} ${etc}/${file}.sample
    59     }
     67        set etc ${destroot}${prefix}/etc/mail/spamassassin
     68        foreach file ${conf_files} {
     69                file rename ${etc}/${file} ${etc}/${file}.sample
     70        }
     71
     72        set docdir ${prefix}/share/doc/spamassassin
     73        xinstall -d ${destroot}${docdir}
     74        xinstall -m 0644 -W ${worksrcpath} README CREDITS INSTALL LICENSE NOTICE PACKAGING TRADEMARK UPGRADE USAGE changes ${destroot}${docdir}
     75        xinstall -d ${destroot}${docdir}/sql
     76        xinstall -m 0644 -W ${worksrcpath}/sql README README.AWL README.bayes awl_mysql.sql awl_pg.sql bayes_mysql.sql bayes_pg.sql userpref_mysql.sql userpref_pg.sql ${destroot}${docdir}/sql
     77        set exdir ${prefix}/share/examples/spamassassin
     78        xinstall -d ${destroot}${exdir}
     79        xinstall -m 0644 -W ${worksrcpath} procmailrc.example sample-nonspam.txt sample-spam.txt ${destroot}${exdir}
     80        set sample_fies {procmailrc.example sample-nonspam.txt sample-spam.txt}
    6081}
    6182
    6283post-install {
    63     ui_msg "****************************************************************"
    64     ui_msg "*                                                              *"
    65     ui_msg "* If you run spamassassin for the first time, then you must    *"
    66     ui_msg "* rename the following configuration files by removing the     *"
    67     ui_msg "* .sample extension:                                           *"
    68     ui_msg "*                                                              *"
    69     ui_msg "* cd ${prefix}/etc/mail/spamassassin                          *"
    70     foreach file ${conf_files} {
    71         ui_msg "* mv ${file}.sample ${file}                                  *"
    72     }
    73     ui_msg "*                                                              *"
    74     ui_msg "****************************************************************"
     84        ui_msg "**************************************************************"
     85        ui_msg "*                                                            *"
     86        ui_msg "* If you are running spamassassin for the first time, you    *"
     87        ui_msg "* should copy the following configuration file and remove the*"
     88        ui_msg "* .sample extension:                                         *"
     89        ui_msg "*                                                            *"
     90        ui_msg "* cd ${prefix}/etc/mail/spamassassin                        *"
     91        foreach file ${conf_files} {
     92                ui_msg "* cp ${file}.sample ${file}                                *"
     93        }
     94        ui_msg "*                                                            *"
     95        ui_msg "**************************************************************"
     96}
     97
     98
     99variant razor description {Use Vipuls Razor module} {
     100        depends_lib-append      port:p5-razor-agents
     101        configure.args-append   RUN_RAZOR_TESTS=yes
    75102}
    76103
     104variant ssl description {Encrypt communication from spamc to spamd} {
     105        depends_lib-append      port:openssl \
     106                                port:p5-io-socket-ssl
     107        configure.args-append   ENABLE_SSL=yes
     108}
    77109
    78 variant razor {
    79     depends_lib-append      port:p5-razor-agents
    80     configure.args-append   RUN_RAZOR_TESTS=yes
    81 }
    82 
    83 variant ssl {
    84     depends_lib-append      port:openssl \
    85                             port:p5-io-socket-ssl
    86     configure.args-append   ENABLE_SSL=yes
     110variant vpopmail description {Use Spamassassin with vpopmail} {
     111        depends_lib-append      port:vpopmail
    87112}