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

Last change on this file since 144564 was 144564, checked in by mojca@…, 3 years ago

remove perl5_16..5_20 variants from perl dependents (#50245)

  • 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 144564 2016-01-12 21:17:36Z mojca@macports.org $
3
4PortSystem          1.0
5PortGroup           perl5 1.0
6
7name                amavisd-new
8version             2.10.1
9revision            3
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.22
34perl5.create_variants   ${perl5.branches}
35
36set daemon_user     _amavisd
37set daemon_group    _amavisd
38set amavisd_home    ${prefix}/var/amavis
39add_users ${daemon_user} group=${daemon_group} realname=AMaViS\ Daemon home=${amavisd_home}
40
41depends_run         port:p${perl5.major}-archive-zip \
42                    port:p${perl5.major}-berkeleydb \
43                    port:p${perl5.major}-convert-tnef \
44                    port:p${perl5.major}-convert-uulib \
45                    port:p${perl5.major}-digest-md5 \
46                    port:p${perl5.major}-io-compress \
47                    port:p${perl5.major}-io-stringy \
48                    port:p${perl5.major}-mail-dkim \
49                    port:p${perl5.major}-mailtools \
50                    port:p${perl5.major}-mime-tools \
51                    port:p${perl5.major}-mime-base64 \
52                    port:p${perl5.major}-net-server \
53                    port:p${perl5.major}-time-hires \
54                    port:p${perl5.major}-unix-syslog \
55                    port:p${perl5.major}-mail-spamassassin \
56                    port:p${perl5.major}-dbd-mysql \
57                    port:p${perl5.major}-mail-clamav \
58                    port:clamav \
59                    port:clamav-server
60
61patchfiles          patch-etc-path.diff
62
63post-patch {
64    reinplace "s|@@PREFIX@@|${prefix}|" \
65              ${worksrcpath}/amavisd
66    reinplace "s|#!/usr/bin/perl|#!${perl5.bin}|" \
67              ${worksrcpath}/amavisd \
68              ${worksrcpath}/amavis-mc \
69              ${worksrcpath}/amavis-services \
70              ${worksrcpath}/amavisd-agent \
71              ${worksrcpath}/amavisd-nanny \
72              ${worksrcpath}/amavisd-release \
73              ${worksrcpath}/amavisd-signer \
74              ${worksrcpath}/amavisd-snmp-subagent \
75              ${worksrcpath}/amavisd-snmp-subagent-zmq \
76              ${worksrcpath}/amavisd-status \
77              ${worksrcpath}/amavisd-submit
78    file copy ${worksrcpath}/amavisd.conf ${worksrcpath}/amavisd.conf.example
79    reinplace "s|\$daemon_user\  =\ 'vscan'|\$daemon_user\  =\ '${daemon_user}'|" \
80              ${worksrcpath}/amavisd.conf.example
81    reinplace "s|\$daemon_group\ =\ 'vscan'|\$daemon_group\  =\ '${daemon_group}'|" \
82              ${worksrcpath}/amavisd.conf.example
83    reinplace "s|#\ \$MYHOME\ =\ '/var/amavis'|\$MYHOME\ =\ '${amavisd_home}'|" \
84              ${worksrcpath}/amavisd.conf.example
85    reinplace "s|\$QUARANTINEDIR\ =\ '/var/virusmails'|\$QUARANTINEDIR\ =\ '${amavisd_home}/quarantine'|" \
86              ${worksrcpath}/amavisd.conf.example
87}
88
89use_configure       no
90
91build               {}
92
93destroot {
94    xinstall -m 750 -o ${daemon_user} -g ${daemon_group} \
95        ${worksrcpath}/amavisd \
96        ${destroot}${prefix}/sbin/amavisd
97    xinstall -m 750 -o ${daemon_user} -g ${daemon_group} -d \
98        ${destroot}${amavisd_home} \
99        ${destroot}${amavisd_home}/tmp \
100        ${destroot}${amavisd_home}/var \
101        ${destroot}${amavisd_home}/db \
102        ${destroot}${amavisd_home}/home \
103        ${destroot}${amavisd_home}/quarantine
104    xinstall -m 640 -o ${daemon_user} -g ${daemon_group} \
105        /dev/null \
106        ${destroot}${amavisd_home}/tmp/.turd_${name}
107    xinstall -m 640 -o ${daemon_user} -g ${daemon_group} \
108        /dev/null \
109        ${destroot}${amavisd_home}/var/.turd_${name}
110    xinstall -m 640 -o ${daemon_user} -g ${daemon_group} \
111        /dev/null \
112        ${destroot}${amavisd_home}/db/.turd_${name}
113    xinstall -m 640 -o ${daemon_user} -g ${daemon_group} \
114        /dev/null \
115        ${destroot}${amavisd_home}/home/.turd_${name}
116    xinstall -m 640 -o ${daemon_user} -g ${daemon_group} \
117        /dev/null \
118        ${destroot}${amavisd_home}/quarantine/.turd_${name}
119    copy ${worksrcpath} ${destroot}${prefix}/share/${name}
120}
121
122post-activate {
123    if {![file exists ${prefix}/etc/amavisd/amavisd.conf]} {
124        file mkdir ${prefix}/etc/amavisd
125        copy ${prefix}/share/amavisd-new/amavisd.conf.example \
126            ${prefix}/etc/amavisd/amavisd.conf
127    }
128}
129
130livecheck.url       ${master_sites}
131livecheck.type      regex
132livecheck.regex     "${name}-(\\d+\\.\\d+(\[0-9rc.\]+)?)${extract.suffix}"
Note: See TracBrowser for help on using the repository browser.