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

Last change on this file since 98748 was 98748, checked in by pixilla@…, 7 years ago

mail/amavisd-new:

  • Replace adduser and addgroup with add_users.
  • Put perl version into variable.
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.7 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 98748 2012-10-14 17:33:01Z pixilla@macports.org $
3
4PortSystem          1.0
5
6name                amavisd-new
7version             2.8.0
8revision            1
9categories          mail
10license             GPL-2
11maintainers         pixilla openmaintainer
12platforms           darwin
13supported_archs     noarch
14
15description         amavisd-new is a high-performance interface between mailer (MTA) and content \
16                    checkers: virus scanners, and/or SpamAssassin.
17long_description    ${description} It is written in Perl for maintainability, without paying a \
18                    significant price for speed. It talks to MTA via (E)SMTP or LMTP, or by using \
19                    helper programs. Best with Postfix, fine with dual-sendmail setup and Exim v4, \
20                    works with sendmail/milter, or with any MTA as a SMTP relay. For Courier and \
21                    qmail MTA integration there is a patch in the distributed package.
22homepage            http://www.ijs.si/software/amavisd/
23master_sites        ${homepage}
24
25checksums           rmd160  db21416177c4c47ae7af12abfb6aa48622fea77d \
26                    sha256  342b805f58db667b099a85863328b3fdfe9c575a22ace119d541e5f12bee63ac
27
28set perl_version    5.12
29set daemon_user     _amavisd
30set daemon_group    _amavisd
31set amavisd_home    ${prefix}/var/amavis
32add_users ${daemon_user} group=${daemon_group} realname=AMaViS\ Daemon home=${amavisd_home}
33
34depends_run         port:p${perl_version}-archive-zip \
35                    port:p${perl_version}-berkeleydb \
36                    port:p${perl_version}-convert-tnef \
37                    port:p${perl_version}-convert-uulib \
38                    port:p${perl_version}-digest-md5 \
39                    port:p${perl_version}-io-compress \
40                    port:p${perl_version}-io-stringy \
41                    port:p${perl_version}-mail-dkim \
42                    port:p${perl_version}-mailtools \
43                    port:p${perl_version}-mime-tools \
44                    port:p${perl_version}-mime-base64 \
45                    port:p${perl_version}-net-server \
46                    port:p${perl_version}-time-hires \
47                    port:p${perl_version}-unix-syslog \
48                    port:p${perl_version}-mail-spamassassin \
49                    port:p${perl_version}-dbd-mysql \
50                    port:p${perl_version}-mail-clamav \
51                    port:clamav \
52                    port:clamav-server
53
54post-patch {
55    reinplace "s|#!/usr/bin/perl|#!${prefix}/bin/perl${perl_version}|" \
56              ${worksrcpath}/amavisd
57    file copy ${worksrcpath}/amavisd.conf ${worksrcpath}/amavisd.conf.example
58    reinplace "s|\$daemon_user\  =\ 'vscan'|\$daemon_user\  =\ '${daemon_user}'|" \
59              ${worksrcpath}/amavisd.conf.example
60    reinplace "s|\$daemon_group\ =\ 'vscan'|\$daemon_group\  =\ '${daemon_group}'|" \
61              ${worksrcpath}/amavisd.conf.example
62    reinplace "s|#\ \$MYHOME\ =\ '/var/amavis'|\$MYHOME\ =\ '${amavisd_home}'|" \
63              ${worksrcpath}/amavisd.conf.example
64    reinplace "s|\$QUARANTINEDIR\ =\ '/var/virusmails'|\$QUARANTINEDIR\ =\ '${amavisd_home}/quarantine'|" \
65              ${worksrcpath}/amavisd.conf.example
66}
67
68use_configure       no
69
70build               {}
71
72destroot {
73    xinstall -m 750 -o ${daemon_user} -g ${daemon_group} \
74        ${worksrcpath}/amavisd \
75        ${destroot}${prefix}/sbin/amavisd
76    xinstall -m 640 -o root -g ${daemon_group} \
77        ${worksrcpath}/amavisd.conf.example \
78        ${destroot}${prefix}/etc/amavisd.conf.example
79    xinstall -m 750 -o ${daemon_user} -g ${daemon_group} -d \
80        ${destroot}${amavisd_home} \
81        ${destroot}${amavisd_home}/tmp \
82        ${destroot}${amavisd_home}/var \
83        ${destroot}${amavisd_home}/db \
84        ${destroot}${amavisd_home}/home \
85        ${destroot}${amavisd_home}/quarantine
86    xinstall -m 640 -o ${daemon_user} -g ${daemon_group} \
87        /dev/null \
88        ${destroot}${amavisd_home}/tmp/.turd_${name}
89    xinstall -m 640 -o ${daemon_user} -g ${daemon_group} \
90        /dev/null \
91        ${destroot}${amavisd_home}/var/.turd_${name}
92    xinstall -m 640 -o ${daemon_user} -g ${daemon_group} \
93        /dev/null \
94        ${destroot}${amavisd_home}/db/.turd_${name}
95    xinstall -m 640 -o ${daemon_user} -g ${daemon_group} \
96        /dev/null \
97        ${destroot}${amavisd_home}/home/.turd_${name}
98    xinstall -m 640 -o ${daemon_user} -g ${daemon_group} \
99        /dev/null \
100        ${destroot}${amavisd_home}/quarantine/.turd_${name}
101    copy ${worksrcpath} ${destroot}${prefix}/share/${name}
102}
103
104livecheck.url       ${master_sites}
105livecheck.type      regex
106livecheck.regex     "${name}-(\\d+\\.\\d+(\[0-9rc.\]+)?)${extract.suffix}"
Note: See TracBrowser for help on using the repository browser.