source: trunk/dports/perl/p5-mail-spamassassin/Portfile

Last change on this file was 154393, checked in by mojca@…, 14 months ago

p5-*: remove subports for perl5.22 (#52081)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.8 KB
Line 
1# -*- 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
2# $Id: Portfile 154393 2016-10-28 22:10:07Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           perl5 1.0
6
7perl5.branches      5.24
8perl5.setup         Mail-SpamAssassin 3.4.1
9revision            2
10categories-append   mail
11license             Apache-2
12platforms           darwin
13maintainers         nomaintainer
14description         mail filter to identify spam
15long_description    SpamAssassin(tm) is a mail filter to identify spam. \
16                    Using its rule base, it uses a wide range of \
17                    heuristic tests on mail headers and body text to \
18                    identify spam, also known as unsolicited commercial \
19                    email.
20
21homepage            http://spamassassin.apache.org/
22
23checksums           rmd160  4b7d6a6def068eb015e8d4699db410ade76b28f3 \
24                    sha256  9b7a95a594cdca4f265707364478b57813b82a0ec7e520d9bc818bfbcafdd726
25
26if {${perl5.major} != ""} {
27# use Time::HiRes 1.9739+ for Sierra compatibility
28    depends_lib-append \
29                    port:curl \
30                    port:gnupg \
31                    port:p${perl5.major}-archive-tar \
32                    port:p${perl5.major}-dbi \
33                    port:p${perl5.major}-digest-sha1 \
34                    port:p${perl5.major}-encode-detect \
35                    port:p${perl5.major}-html-parser \
36                    port:p${perl5.major}-libwww-perl \
37                    port:p${perl5.major}-mailtools \
38                    port:p${perl5.major}-mail-audit \
39                    port:p${perl5.major}-mail-dkim \
40                    port:p${perl5.major}-mail-spf \
41                    port:p${perl5.major}-net-cidr-lite \
42                    port:p${perl5.major}-net-dns \
43                    port:p${perl5.major}-net-patricia \
44                    port:p${perl5.major}-geo-ip \
45                    port:p${perl5.major}-io-compress \
46                    port:p${perl5.major}-io-socket-inet6 \
47                    port:p${perl5.major}-io-zlib \
48                    port:p${perl5.major}-time-hires
49
50    startupitem.create      yes
51    startupitem.name        spamd
52
53    if {[variant_isset vpopmail]} {
54        startupitem.executable  ${perl5.bindir}/spamd -l -v -u vpopmail
55    } else {
56        startupitem.executable  ${perl5.bindir}/spamd -l
57    }
58
59    patchfiles      patch-lib-Mail-SpamAssassin-DnsResolver.pm.diff
60
61    post-patch {
62        reinplace "s|return ''|return 'PRIV'|" ${worksrcpath}/Makefile.PL
63    }
64
65    configure.args-append \
66                    CONTACT_ADDRESS=root@localhost \
67                    PREFIX=${prefix} \
68                    SYSCONFDIR=${prefix}/etc \
69                    DATADIR=${prefix}/share/spamassassin \
70                    LOCALSTATEDIR=${prefix}/var/spamassassin \
71                    CONFDIR=${prefix}/etc/mail/spamassassin
72
73    destroot.target-append conf__install data__install
74
75# All configuration files for spamassassin.
76    set conf_files  {init.pre local.cf v310.pre v312.pre v320.pre v330.pre v340.pre}
77
78    post-destroot {
79        set etc ${destroot}${prefix}/etc/mail/spamassassin
80        foreach file ${conf_files} {
81            file rename ${etc}/${file} ${etc}/${file}.sample
82        }
83
84        set docdir ${prefix}/share/doc/spamassassin
85        xinstall -d ${destroot}${docdir}
86        xinstall -m 0644 -W ${worksrcpath} \
87            README CREDITS INSTALL LICENSE NOTICE \
88            PACKAGING TRADEMARK UPGRADE USAGE Changes \
89            ${destroot}${docdir}
90        xinstall -d ${destroot}${docdir}/sql
91        xinstall -m 0644 -W ${worksrcpath}/sql \
92            README README.awl README.bayes awl_mysql.sql awl_pg.sql \
93            bayes_mysql.sql bayes_pg.sql userpref_mysql.sql userpref_pg.sql \
94            ${destroot}${docdir}/sql
95
96        set exdir ${prefix}/share/examples/spamassassin
97        xinstall -d ${destroot}${exdir}
98        xinstall -m 0644 -W ${worksrcpath} \
99            procmailrc.example sample-nonspam.txt sample-spam.txt \
100            ${destroot}${exdir}
101    }
102
103    set conf_file_notes {}
104    foreach file ${conf_files} {
105        append conf_file_notes "cp ${file}.sample ${file}\n"
106    }
107   
108    notes "If you're running spamassassin for the first time, you should copy the\
109following configuration files and remove the .sample extension:\n\ncd\
110${prefix}/etc/mail/spamassassin\n${conf_file_notes}"
111
112    variant razor description {Use Vipuls Razor module} {
113        depends_lib-append      port:p${perl5.major}-razor-agents
114        configure.args-append   RUN_RAZOR_TESTS=yes
115    }
116
117    variant ssl description {Encrypt communication from spamc to spamd} {
118        depends_lib-append  path:lib/libssl.dylib:openssl \
119                            port:p${perl5.major}-io-socket-ssl
120        configure.args-append ENABLE_SSL=yes
121    }
122
123    variant vpopmail description {Use Spamassassin with vpopmail} {
124        depends_lib-append      port:vpopmail
125    }
126}
Note: See TracBrowser for help on using the repository browser.