source: trunk/dports/mail/cyrus-imapd/Portfile

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

cyrus-imapd: switch to perl5.24 (#52081)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.9 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 151909 2016-08-23 21:59:44Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           perl5 1.0
6
7name                cyrus-imapd
8version             2.4.18
9revision            2
10perl5.branches      5.24
11categories          mail
12platforms           darwin
13license             BSD-old
14maintainers         nomaintainer
15
16description         The Cyrus IMAP Server
17long_description    Popular, scalable, open standars based IMAP & POP3 mail server \
18                    developed by The Carnegie Mellon University.
19
20homepage            http://cyrusimap.org/
21master_sites        ftp://ftp.cyrusimap.org/cyrus-imapd/
22
23checksums           rmd160  9a2a601a93abcaece16a77f0f77460a49e6e7c53 \
24                    sha256  166a0a1efbf01f71d9d8449569152b3cda4949cd689f299a5e77a38d7026012c
25
26depends_build       port:makedepend
27
28depends_lib         port:perl${perl5.major} \
29                    port:cyrus-sasl2 \
30                    port:db44 \
31                    path:lib/libssl.dylib:openssl
32
33patchfiles          patch-depot-Makefile.in.diff \
34                    patch-lib-charset.c.diff
35
36post-patch {
37    foreach dir {contrib contrib/cyrus-graphtools.1.0/cgi-bin contrib/cyrus-graphtools.1.0/script perl/imap/examples perl/sieve/scripts tools} {
38        reinplace "s|^#!.*perl|#!${perl5.bin}|" {*}[glob -d ${worksrcpath}/${dir} *.pl]
39    }
40}
41
42# wrong number of arguments at (eval 1) line 41, <DATA> line 256.
43configure.ccache    no
44
45configure.args      --mandir=${prefix}/share/man \
46                    --sysconfdir=${prefix}/etc/cyrus \
47                    --with-cyrus-prefix=${prefix} \
48                    --with-pidfile=${prefix}/var/run/cyrus-master.pid \
49                    --with-bdb-incdir=${prefix}/include/db44 \
50                    --with-bdb-libdir=${prefix}/lib/db44 \
51                    --with-perl=${perl5.bin} \
52                    --with-sasl=${prefix} \
53                    --with-openssl=${prefix} \
54                    --with-cyrus-user=cyrus \
55                    --with-cyrus-group=mail \
56                    --enable-cmulocal \
57                    --enable-netscapehack \
58                    --with-snmp=no \
59                    --disable-sieve \
60                    --disable-gssapi \
61                    --with-com_err
62
63startupitem.create  yes
64startupitem.name    cyrus
65startupitem.requires Disks Network "System Log"
66startupitem.start   "${prefix}/bin/master -d"
67startupitem.stop    "pidfile=${prefix}/var/run/cyrus-master.pid
68            if \[ -f \${pidfile} \]; then
69               kill -TERM \$(cat \${pidfile})
70            fi"
71
72post-destroot   {
73        add_users cyrus group=cyrus home=${prefix}/var/imap shell=/usr/bin/false passwd="\*"
74        xinstall -m 755 -v ${worksrcpath}/tools/mkimap ${destroot}${prefix}/bin
75        reinplace "s|/etc/imapd.conf|${prefix}/etc/cyrus/imapd.conf|" ${destroot}${prefix}/bin/mkimap
76        xinstall -m 755 -v ${worksrcpath}/tools/mknewsgroups ${destroot}${prefix}/bin
77        xinstall -m 755 -v ${worksrcpath}/tools/dohash ${destroot}${prefix}/bin
78        xinstall -m 755 -v ${worksrcpath}/tools/rehash ${destroot}${prefix}/bin
79        xinstall -m 755 -v ${worksrcpath}/tools/upgradesieve ${destroot}${prefix}/bin
80        xinstall -d -m 755 ${destroot}${prefix}/share/doc/
81        file copy ${worksrcpath}/doc ${destroot}${prefix}/share/doc/${name}
82        foreach d [glob -directory ${destroot}${prefix}/share/doc/${name} -type d *] { file delete -force ${destroot}${prefix}/share/doc/${name}/html ${destroot}${prefix}/share/doc/${name}/CVS $d/CVS }
83        xinstall -d -m 755 ${destroot}${prefix}/etc/cyrus/samples
84        foreach f [glob -directory ${worksrcpath}/master/conf -type f *.conf] {
85            xinstall -m 644 -v $f ${destroot}${prefix}/etc/cyrus/samples/[file tail $f].sample
86        }
87        xinstall -d -m 750 -o cyrus -g mail ${destroot}${prefix}/var/imap
88        xinstall -d -m 750 -o cyrus -g mail ${destroot}${prefix}/var/spool/imap
89        destroot.keepdirs ${destroot}${prefix}/var/run ${destroot}${prefix}/var/imap \
90        ${destroot}${prefix}/var/spool/imap ${destroot}${prefix}/var/log
91        delete {*}[glob ${destroot}${prefix}/lib/perl5/*/*/perllocal.pod]
92}
93
94platform powerpc {
95        configure.args-append --build=powerpc
96}
97
98variant murder description {Enable IMAP Murder support} {
99        configure.args-append --enable-murder
100}
101
102platform i386 {
103        configure.args-append --build=i386
104}
105
106variant snmp description {Use Net SNMP (currently broken)} {
107        depends_lib-append      port:net-snmp
108        configure.args-delete   --with-snmp=no
109        configure.args-append   --with-snmp=yes
110}
111
112livecheck.type      regex
113livecheck.url       ${homepage}
114livecheck.regex     "/${name}/${name}-(\\d+(?:\\.\\d+)*)\\${extract.suffix}"
115
116##
117# Miscellaneous notes:
118# -) Port is itself bare bones, suport for many other things could be added (maybe as variants), so suggest away!
119##
Note: See TracBrowser for help on using the repository browser.