source: trunk/dports/mail/amavisd-new/Portfile

Last change on this file was 154380, checked in by mojca@…, 13 months ago

amavisd-new: remove perl5.22 (#52081) and revbump

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.5 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 154380 2016-10-28 21:20:06Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           perl5 1.0
6
7name                amavisd-new
8version             2.10.1
9revision            5
10categories          mail
11license             GPL-2
12maintainers         pixilla openmaintainer
13platforms           darwin
14supported_archs     noarch
15
16description         amavisd-new is a high-performance interface between mailer (MTA) and content \
17                    checkers: virus scanners, and/or SpamAssassin.
18long_description    ${description} It is written in Perl for maintainability, without paying a \
19                    significant price for speed. It talks to MTA via (E)SMTP or LMTP, or by using \
20                    helper programs. Best with Postfix, fine with dual-sendmail setup and Exim v4, \
21                    works with sendmail/milter, or with any MTA as a SMTP relay. For Courier and \
22                    qmail MTA integration there is a patch in the distributed package.
23homepage            http://www.ijs.si/software/amavisd/
24master_sites        ${homepage}
25
26use_xz              yes
27
28checksums           rmd160  233eb8ebfd5bb15eba152553424ef0622602430b \
29                    sha256  1d3d3f372d0888018b950ee19704c298b5d02e2c287ca2d5f1a785a078b6038f
30
31perl5.require_variant   yes
32perl5.conflict_variants yes
33perl5.branches          5.24
34perl5.default_branch    5.24
35perl5.create_variants   ${perl5.branches}
36
37set daemon_user     _amavisd
38set daemon_group    _amavisd
39set amavisd_home    ${prefix}/var/amavis
40add_users ${daemon_user} group=${daemon_group} realname=AMaViS\ Daemon home=${amavisd_home}
41
42depends_run         port:p${perl5.major}-archive-zip \
43                    port:p${perl5.major}-berkeleydb \
44                    port:p${perl5.major}-convert-tnef \
45                    port:p${perl5.major}-convert-uulib \
46                    port:p${perl5.major}-digest-md5 \
47                    port:p${perl5.major}-io-compress \
48                    port:p${perl5.major}-io-stringy \
49                    port:p${perl5.major}-mail-dkim \
50                    port:p${perl5.major}-mailtools \
51                    port:p${perl5.major}-mime-tools \
52                    port:p${perl5.major}-mime-base64 \
53                    port:p${perl5.major}-net-server \
54                    port:p${perl5.major}-time-hires \
55                    port:p${perl5.major}-unix-syslog \
56                    port:p${perl5.major}-mail-spamassassin \
57                    port:p${perl5.major}-dbd-mysql \
58                    port:p${perl5.major}-mail-clamav \
59                    port:clamav \
60                    port:clamav-server
61
62patchfiles          patch-etc-path.diff
63
64post-patch {
65    reinplace "s|@@PREFIX@@|${prefix}|" \
66              ${worksrcpath}/amavisd
67    reinplace "s|#!/usr/bin/perl|#!${perl5.bin}|" \
68              ${worksrcpath}/amavisd \
69              ${worksrcpath}/amavis-mc \
70              ${worksrcpath}/amavis-services \
71              ${worksrcpath}/amavisd-agent \
72              ${worksrcpath}/amavisd-nanny \
73              ${worksrcpath}/amavisd-release \
74              ${worksrcpath}/amavisd-signer \
75              ${worksrcpath}/amavisd-snmp-subagent \
76              ${worksrcpath}/amavisd-snmp-subagent-zmq \
77              ${worksrcpath}/amavisd-status \
78              ${worksrcpath}/amavisd-submit
79    file copy ${worksrcpath}/amavisd.conf ${worksrcpath}/amavisd.conf.example
80    reinplace "s|\$daemon_user\  =\ 'vscan'|\$daemon_user\  =\ '${daemon_user}'|" \
81              ${worksrcpath}/amavisd.conf.example
82    reinplace "s|\$daemon_group\ =\ 'vscan'|\$daemon_group\  =\ '${daemon_group}'|" \
83              ${worksrcpath}/amavisd.conf.example
84    reinplace "s|#\ \$MYHOME\ =\ '/var/amavis'|\$MYHOME\ =\ '${amavisd_home}'|" \
85              ${worksrcpath}/amavisd.conf.example
86    reinplace "s|\$QUARANTINEDIR\ =\ '/var/virusmails'|\$QUARANTINEDIR\ =\ '${amavisd_home}/quarantine'|" \
87              ${worksrcpath}/amavisd.conf.example
88}
89
90use_configure       no
91
92build               {}
93
94destroot {
95    xinstall -m 750 -o ${daemon_user} -g ${daemon_group} \
96        ${worksrcpath}/amavisd \
97        ${destroot}${prefix}/sbin/amavisd
98    xinstall -m 750 -o ${daemon_user} -g ${daemon_group} -d \
99        ${destroot}${amavisd_home} \
100        ${destroot}${amavisd_home}/tmp \
101        ${destroot}${amavisd_home}/var \
102        ${destroot}${amavisd_home}/db \
103        ${destroot}${amavisd_home}/home \
104        ${destroot}${amavisd_home}/quarantine
105    xinstall -m 640 -o ${daemon_user} -g ${daemon_group} \
106        /dev/null \
107        ${destroot}${amavisd_home}/tmp/.turd_${name}
108    xinstall -m 640 -o ${daemon_user} -g ${daemon_group} \
109        /dev/null \
110        ${destroot}${amavisd_home}/var/.turd_${name}
111    xinstall -m 640 -o ${daemon_user} -g ${daemon_group} \
112        /dev/null \
113        ${destroot}${amavisd_home}/db/.turd_${name}
114    xinstall -m 640 -o ${daemon_user} -g ${daemon_group} \
115        /dev/null \
116        ${destroot}${amavisd_home}/home/.turd_${name}
117    xinstall -m 640 -o ${daemon_user} -g ${daemon_group} \
118        /dev/null \
119        ${destroot}${amavisd_home}/quarantine/.turd_${name}
120    copy ${worksrcpath} ${destroot}${prefix}/share/${name}
121}
122
123post-activate {
124    if {![file exists ${prefix}/etc/amavisd/amavisd.conf]} {
125        file mkdir ${prefix}/etc/amavisd
126        copy ${prefix}/share/amavisd-new/amavisd.conf.example \
127            ${prefix}/etc/amavisd/amavisd.conf
128    }
129}
130
131livecheck.url       ${master_sites}
132livecheck.type      regex
133livecheck.regex     "${name}-(\\d+\\.\\d+(\[0-9rc.\]+)?)${extract.suffix}"
Note: See TracBrowser for help on using the repository browser.