1 | # $Id$ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | |
---|
5 | name dovecot-antispam-signature |
---|
6 | set name_plugin [join [lrange [split ${name} -] 0 1] -] |
---|
7 | set backend [join [lrange [split ${name} -] 2 2] -] |
---|
8 | array set backend_options { |
---|
9 | crm114 "crm114-exec" |
---|
10 | dspam "dspam-exec" |
---|
11 | mailtrain "mailtrain" |
---|
12 | signature "signature-log" |
---|
13 | spool2dir "spool2dir" |
---|
14 | } |
---|
15 | set backend_option $backend_options(${backend}) |
---|
16 | epoch 20100411 |
---|
17 | version 1.3 |
---|
18 | set branch [join [lrange [split ${version} .] 0 1] .] |
---|
19 | categories mail |
---|
20 | maintainers pixilla.com:brad |
---|
21 | platforms darwin |
---|
22 | |
---|
23 | description Anti-spam plugin for dovecot |
---|
24 | long_description ${description} configured for ${backend_option} backend |
---|
25 | |
---|
26 | homepage http://johannes.sipsolutions.net/Projects/dovecot-antispam |
---|
27 | |
---|
28 | distname dovecot-antispam-${version} |
---|
29 | |
---|
30 | master_sites http://johannes.sipsolutions.net/download/dovecot-antispam/ |
---|
31 | |
---|
32 | livecheck.type regex |
---|
33 | livecheck.url ${master_sites} |
---|
34 | livecheck.regex "${name}-(\\d+\\.\\d+(\\.\\d+)?)${extract.suffix}" |
---|
35 | |
---|
36 | use_bzip2 yes |
---|
37 | |
---|
38 | checksums md5 04a0bb49fcb19a6f78c21d982a99d34f \ |
---|
39 | sha1 e6203cb79907b16632dc6a117faa254c6b975df3 \ |
---|
40 | rmd160 1c570b7934577abee11b5659e69a00db9573016e |
---|
41 | |
---|
42 | depends_build port:dovecot |
---|
43 | |
---|
44 | patchfiles patch-config.diff |
---|
45 | |
---|
46 | set config_file ${worksrcpath}/.config |
---|
47 | set debug_facility "" |
---|
48 | set debug_verbose "" |
---|
49 | |
---|
50 | post-extract { |
---|
51 | xinstall ${worksrcpath}/defconfig ${config_file} |
---|
52 | } |
---|
53 | |
---|
54 | configure { |
---|
55 | reinplace "s|@@BACKEND@@|BACKEND=${backend_option}|g" \ |
---|
56 | ${config_file} |
---|
57 | reinplace "s|@@DOVECOT@@|DOVECOT=${prefix}/include/dovecot|g" \ |
---|
58 | ${config_file} |
---|
59 | reinplace "s|@@INSTALLDIR@@|# INSTALLDIR=${destroot}/lib/dovecot/imap|g" \ |
---|
60 | ${config_file} |
---|
61 | reinplace "s|@@DEBUG@@|${debug_facility}|g" \ |
---|
62 | ${config_file} |
---|
63 | reinplace "s|@@DEBUG_VERBOSE@@|${debug_verbose}|g" \ |
---|
64 | ${config_file} |
---|
65 | reinplace "s|@@PLUGINNAME@@|PLUGINNAME=antispam_${backend}|g" \ |
---|
66 | ${config_file} |
---|
67 | reinplace "s|@@EXTRA_CFLAGS@@|CFLAGS += -undefined dynamic_lookup|g" \ |
---|
68 | ${config_file} |
---|
69 | } |
---|
70 | |
---|
71 | destroot { |
---|
72 | xinstall -m 755 -d ${destroot}${prefix}/lib/dovecot/imap |
---|
73 | xinstall -m 755 ${worksrcpath}/lib90_antispam_${backend}_plugin.so ${destroot}${prefix}/lib/dovecot/imap |
---|
74 | xinstall -m 444 ${worksrcpath}/antispam.7 ${destroot}${prefix}/share/man/man7/antispam_${backend}.7 |
---|
75 | } |
---|
76 | |
---|
77 | variant debug_syslog conflicts {debug_stderr} description {Log to syslog} { |
---|
78 | set debug_facility "DEBUG=syslog" |
---|
79 | } |
---|
80 | |
---|
81 | variant debug_stderr conflicts {debug_syslog} description {Log to stderr} { |
---|
82 | set debug_facility "DEBUG=stderr" |
---|
83 | } |
---|
84 | |
---|
85 | variant debug_verbose description {Verbose debugging, lots of output!} { |
---|
86 | set debug_verbose "DEBUG_VERBOSE=1" |
---|
87 | } |
---|