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

Last change on this file since 139229 was 139229, checked in by jeremyhu@…, 4 years ago

misc: Change port:openssl dependency to path:lib/libssl.dylib:openssl

This should allow usage of libressl as a replacement for openssl in relevant
ports. Not all ports have been tested, but libressl aims for API
compatibility with OpenSSL, so it is expected to work.

  • 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 139229 2015-08-08 03:10:35Z jeremyhu@macports.org $
3
4PortSystem          1.0
5
6name                cyrus-imapd
7version             2.4.18
8set perl_version    5.22
9categories          mail
10platforms           darwin
11license             BSD-old
12maintainers         nomaintainer
13
14description         The Cyrus IMAP Server
15long_description    Popular, scalable, open standars based IMAP & POP3 mail server \
16                    developed by The Carnegie Mellon University.
17
18homepage            http://cyrusimap.org/
19master_sites        ftp://ftp.cyrusimap.org/cyrus-imapd/
20
21checksums           rmd160  9a2a601a93abcaece16a77f0f77460a49e6e7c53 \
22                    sha256  166a0a1efbf01f71d9d8449569152b3cda4949cd689f299a5e77a38d7026012c
23
24depends_build       port:makedepend
25
26depends_lib         port:perl${perl_version} \
27                    port:cyrus-sasl2 \
28                    port:db44 \
29                    path:lib/libssl.dylib:openssl
30
31patchfiles          patch-depot-Makefile.in.diff \
32                    patch-lib-charset.c.diff
33
34post-patch {
35    foreach dir {contrib contrib/cyrus-graphtools.1.0/cgi-bin contrib/cyrus-graphtools.1.0/script perl/imap/examples perl/sieve/scripts tools} {
36        eval reinplace "s|^#!.*perl|#!${prefix}/bin/perl${perl_version}|" [glob -d ${worksrcpath}/${dir} *.pl]
37    }
38}
39
40# wrong number of arguments at (eval 1) line 41, <DATA> line 256.
41configure.ccache    no
42
43configure.perl      ${prefix}/bin/perl${perl_version}
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=${prefix}/bin/perl${perl_version} \
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        eval 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.