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

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

amavisd-new: add license

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