1 | # $Id: Portfile 39958 2008-09-14 03:40:17Z jberry@macports.org $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | |
---|
5 | name dovecot |
---|
6 | epoch 20060722 |
---|
7 | version 1.2.9 |
---|
8 | |
---|
9 | set major_version 1.2 |
---|
10 | |
---|
11 | categories mail |
---|
12 | maintainers jberry |
---|
13 | platforms darwin |
---|
14 | |
---|
15 | description Secure, fast imap and pop3 server -- currently in alpha approaching final |
---|
16 | long_description Dovecot is an IMAP and POP3 server for Linux/UNIX-like \ |
---|
17 | systems, written with security primarily in mind. Although \ |
---|
18 | its written in C, it uses several coding techniques to \ |
---|
19 | avoid most of the common pitfalls. |
---|
20 | |
---|
21 | homepage http://dovecot.org/ |
---|
22 | |
---|
23 | master_sites ${homepage}releases/${major_version} |
---|
24 | distname dovecot-${version} |
---|
25 | checksums md5 036ff97fb248dae3bd4b796a0644634f \ |
---|
26 | sha1 7c1013a1bc856a4366f76ac1f40e856185695e20 \ |
---|
27 | rmd160 fa17bafabdd6fab69c22d617deff368a4bc165d1 |
---|
28 | |
---|
29 | depends_lib port:libiconv \ |
---|
30 | port:pkgconfig \ |
---|
31 | port:zlib \ |
---|
32 | port:openssl |
---|
33 | |
---|
34 | configure.args --sysconfdir=${prefix}/etc/dovecot \ |
---|
35 | --localstatedir=${prefix}/var \ |
---|
36 | --with-ssl=openssl --with-ssldir=${prefix}/etc/ssl \ |
---|
37 | --enable-header-install |
---|
38 | |
---|
39 | configure.cppflags "-I${prefix}/include/openssl" |
---|
40 | |
---|
41 | post-configure { |
---|
42 | # madvise fails on darwin 7 and earlier, but is fixed on darwin 8 |
---|
43 | if { ${os.platform} == "darwin" && [rpm-vercomp ${os.version} 8.0] < 0 } { |
---|
44 | reinplace "s|#define HAVE_MADVISE 1|/* #undef HAVE_MADVISE */|" ${worksrcpath}/config.h |
---|
45 | } |
---|
46 | } |
---|
47 | |
---|
48 | post-destroot { |
---|
49 | # Create the dovecot user and group |
---|
50 | addgroup dovecot |
---|
51 | set gid [existsgroup dovecot] |
---|
52 | adduser dovecot gid=${gid} realname=Dovecot |
---|
53 | } |
---|
54 | |
---|
55 | platform darwin 7 { |
---|
56 | # Avoid broken poll |
---|
57 | configure.args-append --with-ioloop=select |
---|
58 | |
---|
59 | } |
---|
60 | |
---|
61 | platform darwin 8 { |
---|
62 | configure.args-append --with-ioloop=kqueue |
---|
63 | } |
---|
64 | |
---|
65 | platform darwin 9 { |
---|
66 | configure.args-append --with-ioloop=kqueue |
---|
67 | } |
---|
68 | |
---|
69 | variant postgres { |
---|
70 | depends_lib-append port:postgresql80 |
---|
71 | configure.args-append --with-pgsql |
---|
72 | configure.ldflags-append "-L${prefix}/lib/pgsql8" |
---|
73 | configure.cppflags-append "-I${prefix}/include/pgsql8" |
---|
74 | } |
---|
75 | |
---|
76 | variant rawlog { |
---|
77 | configure.args-append --with-rawlog |
---|
78 | } |
---|
79 | |
---|
80 | variant ldap { |
---|
81 | configure.args-append --with-ldap |
---|
82 | depends_lib-append port:openldap |
---|
83 | } |
---|
84 | |
---|
85 | variant mysql5 { |
---|
86 | depends_lib-append path:${prefix}/bin/mysql_config5:mysql5 |
---|
87 | configure.args-append --with-mysql |
---|
88 | configure.cflags-append "-I${prefix}/include/mysql5/mysql" |
---|
89 | configure.ldflags-append "-L${prefix}/lib/mysql5/mysql" |
---|
90 | } |
---|
91 | |
---|
92 | startupitem.create yes |
---|
93 | startupitem.executable ${prefix}/sbin/dovecot |
---|
94 | startupitem.pidfile auto ${prefix}/var/run/dovecot/master.pid |
---|
95 | |
---|
96 | livecheck.type regex |
---|
97 | livecheck.url http://www.dovecot.org/releases/${major_version}/ |
---|
98 | livecheck.regex "${name}-(\\d+\\.\\d+(\\.\\d+)?).tar.gz" |
---|
99 | |
---|