/
Portfile
146 lines (124 loc) · 5.81 KB
/
Portfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# -*- 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
PortSystem 1.0
PortGroup perl5 1.0
perl5.branches 5.28 5.30 5.32 5.34
perl5.setup Mail-SpamAssassin 4.0.1
revision 0
categories-append mail
license Apache-2
platforms {darwin any}
supported_archs noarch
maintainers nomaintainer
description mail filter to identify spam
long_description SpamAssassin(tm) is a mail filter to identify spam. \
Using its rule base, it uses a wide range of \
heuristic tests on mail headers and body text to \
identify spam, also known as unsolicited commercial \
email.
homepage https://spamassassin.apache.org/
checksums rmd160 6d07fc4e5563f2dc7116eb545eb8541478f937da\
sha256 5c6bb222e18405f1a276816d04e1ffc5cc90785e1265714b4506c2b541d6d5e5\
size 6789832
if {${perl5.major} != ""} {
depends_build-append \
port:p${perl5.major}-devel-cycle \
port:p${perl5.major}-perl-critic \
port:p${perl5.major}-perl-critic-policy-perlsecret \
port:p${perl5.major}-test-perl-critic \
port:p${perl5.major}-test-simple \
port:p${perl5.major}-text-diff
depends_lib-append \
port:curl \
path:bin/gpg:gnupg2 \
port:re2c \
port:p${perl5.major}-archive-tar \
port:p${perl5.major}-berkeleydb \
port:p${perl5.major}-dbi \
port:p${perl5.major}-dbd-sqlite \
port:p${perl5.major}-encode-detect \
port:p${perl5.major}-email-address-xs \
port:p${perl5.major}-file-temp \
port:p${perl5.major}-geo-ip \
port:p${perl5.major}-html-parser \
port:p${perl5.major}-io-compress \
port:p${perl5.major}-io-socket-ip \
port:p${perl5.major}-io-string \
port:p${perl5.major}-libwww-perl \
port:p${perl5.major}-lwp-protocol-https \
port:p${perl5.major}-mail-dkim \
port:p${perl5.major}-mail-spf \
port:p${perl5.major}-mime-base64 \
port:p${perl5.major}-net \
port:p${perl5.major}-netaddr-ip \
port:p${perl5.major}-net-cidr-lite \
port:p${perl5.major}-net-dns \
port:p${perl5.major}-net-libidn \
port:p${perl5.major}-net-libidn2 \
port:p${perl5.major}-net-patricia \
port:p${perl5.major}-time-hires \
port:p${perl5.major}-time-local
startupitem.create yes
startupitem.name spamd
if {[variant_isset vpopmail]} {
startupitem.executable ${perl5.bindir}/spamd -l -v -u vpopmail
} else {
startupitem.executable ${perl5.bindir}/spamd -l
}
patchfiles patch-Makefile.PL.diff
post-patch {
reinplace "s|return ''|return 'PRIV'|" ${worksrcpath}/Makefile.PL
reinplace "s|__MP_RE2C_BIN__|${prefix}/bin/re2c|" ${worksrcpath}/Makefile.PL
}
configure.args-append \
CONTACT_ADDRESS=root@localhost \
PREFIX=${prefix} \
SYSCONFDIR=${prefix}/etc \
DATADIR=${prefix}/share/spamassassin \
LOCALSTATEDIR=${prefix}/var/spamassassin \
CONFDIR=${prefix}/etc/mail/spamassassin
destroot.target-append conf__install data__install
# All configuration files for spamassassin.
set conf_files {init.pre local.cf v310.pre v312.pre v320.pre v330.pre v340.pre v341.pre v342.pre}
post-destroot {
set etc ${destroot}${prefix}/etc/mail/spamassassin
foreach file ${conf_files} {
file rename ${etc}/${file} ${etc}/${file}.sample
}
set docdir ${prefix}/share/doc/spamassassin
xinstall -d ${destroot}${docdir}
xinstall -m 0644 -W ${worksrcpath} \
README CREDITS INSTALL LICENSE NOTICE \
PACKAGING TRADEMARK UPGRADE USAGE Changes \
${destroot}${docdir}
xinstall -d ${destroot}${docdir}/sql
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
set exdir ${prefix}/share/examples/spamassassin
xinstall -d ${destroot}${exdir}
xinstall -m 0644 -W ${worksrcpath} \
procmailrc.example sample-nonspam.txt sample-spam.txt \
${destroot}${exdir}
}
set conf_file_notes {}
foreach file ${conf_files} {
append conf_file_notes "cp ${file}.sample ${file}\n"
}
notes "If you're running spamassassin for the first time, you should copy the\
following configuration files and remove the .sample extension:\n\ncd\
${prefix}/etc/mail/spamassassin\n${conf_file_notes}"
variant razor description {Use Vipuls Razor module} {
depends_lib-append port:p${perl5.major}-razor2-client-agent
configure.args-append RUN_RAZOR_TESTS=yes
}
variant ssl description {Encrypt communication from spamc to spamd} {
depends_lib-append path:lib/libssl.dylib:openssl \
port:p${perl5.major}-io-socket-ssl
configure.args-append ENABLE_SSL=yes
}
variant vpopmail description {Use Spamassassin with vpopmail} {
depends_lib-append port:vpopmail
}
default_variants +ssl
}