1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4 |
---|
2 | # $Id$ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name dovecot2 |
---|
7 | set base_name dovecot |
---|
8 | conflicts ${base_name} |
---|
9 | version 2.0.4 |
---|
10 | set branch [join [lrange [split ${version} .] 0 1] .] |
---|
11 | categories mail |
---|
12 | maintainers pixilla.com:brad |
---|
13 | platforms darwin |
---|
14 | |
---|
15 | description Secure, fast imap and pop3 server |
---|
16 | long_description Dovecot is an IMAP and POP3 server for Linux/UNIX-like \ |
---|
17 | systems, written with security primarily in mind. Although \ |
---|
18 | it's written in C, it uses several coding techniques to \ |
---|
19 | avoid most of the common pitfalls. |
---|
20 | |
---|
21 | homepage http://dovecot.org/ |
---|
22 | master_sites ${homepage}releases/${branch} |
---|
23 | |
---|
24 | distname ${base_name}-${version} |
---|
25 | |
---|
26 | checksums sha1 18c471e991d49424c9dd7d40f3899ea602f57bbc \ |
---|
27 | rmd160 a3360158bb1242b009397e1c1180ccf9585eb547 |
---|
28 | |
---|
29 | depends_build port:pkgconfig |
---|
30 | depends_lib port:libiconv \ |
---|
31 | port:zlib \ |
---|
32 | port:openssl |
---|
33 | |
---|
34 | set default_internal_user \ |
---|
35 | _dovecot |
---|
36 | set default_login_user \ |
---|
37 | _dovenull |
---|
38 | |
---|
39 | patchfiles patch-doc-example-config-conf.d-10-master.conf.diff |
---|
40 | |
---|
41 | post-patch { |
---|
42 | reinplace "s|@@default_internal_user@@|${default_internal_user}|g" \ |
---|
43 | ${worksrcpath}/doc/example-config/conf.d/10-master.conf |
---|
44 | reinplace "s|@@default_login_user@@|${default_login_user}|g" \ |
---|
45 | ${worksrcpath}/doc/example-config/conf.d/10-master.conf |
---|
46 | } |
---|
47 | |
---|
48 | configure.args --sysconfdir=${prefix}/etc \ |
---|
49 | --localstatedir=${prefix}/var \ |
---|
50 | --with-ioloop=kqueue \ |
---|
51 | --with-ssl=openssl \ |
---|
52 | --with-ssldir=${prefix}/etc/ssl |
---|
53 | |
---|
54 | configure.cppflags -I${prefix}/include/openssl |
---|
55 | |
---|
56 | pre-install { |
---|
57 | # Create the internal user and group if needed |
---|
58 | if { ![existsgroup ${default_internal_user}]} { |
---|
59 | addgroup ${default_internal_user} |
---|
60 | } |
---|
61 | if { ![existsuser ${default_internal_user}]} { |
---|
62 | set gid [existsgroup ${default_internal_user}] |
---|
63 | adduser ${default_internal_user} gid=${gid} realname=Dovecot |
---|
64 | } |
---|
65 | # Create the login user and group if needed |
---|
66 | if { ![existsgroup ${default_login_user}]} { |
---|
67 | addgroup ${default_login_user} |
---|
68 | } |
---|
69 | if { ![existsuser ${default_login_user}]} { |
---|
70 | set gid [existsgroup ${default_login_user}] |
---|
71 | adduser ${default_login_user} gid=${gid} realname=Dovecot |
---|
72 | } |
---|
73 | } |
---|
74 | |
---|
75 | variant postgresql82 conflicts postgresql83 postgresql84 description {Enable PostgreSQL 8.2 support} { |
---|
76 | depends_lib-append port:postgresql82 |
---|
77 | configure.env-append PG_CONFIG=${prefix}/lib/postgresql82/bin/pg_config |
---|
78 | configure.args-append --with-pgsql |
---|
79 | } |
---|
80 | |
---|
81 | variant postgresql83 conflicts postgresql82 postgresql84 description {Enable PostgreSQL 8.3 support} { |
---|
82 | depends_lib-append port:postgresql83 |
---|
83 | configure.env-append PG_CONFIG=${prefix}/lib/postgresql83/bin/pg_config |
---|
84 | configure.args-append --with-pgsql |
---|
85 | } |
---|
86 | |
---|
87 | variant postgresql84 conflicts postgresql82 postgresql83 description {Enable PostgreSQL 8.4 support} { |
---|
88 | depends_lib-append port:postgresql84 |
---|
89 | configure.env-append PG_CONFIG=${prefix}/lib/postgresql84/bin/pg_config |
---|
90 | configure.args-append --with-pgsql |
---|
91 | } |
---|
92 | |
---|
93 | variant mysql5 description {Enable MySQL support} { |
---|
94 | depends_lib-append path:bin/mysql_config5:mysql5 |
---|
95 | configure.env-append MYSQL_CONFIG=${prefix}/bin/mysql_config5 |
---|
96 | configure.args-append --with-mysql |
---|
97 | } |
---|
98 | |
---|
99 | variant ldap description {Enable LDAP support} { |
---|
100 | configure.args-append --with-ldap |
---|
101 | depends_lib-append port:openldap |
---|
102 | } |
---|
103 | |
---|
104 | startupitem.create yes |
---|
105 | startupitem.executable ${prefix}/sbin/${base_name} |
---|
106 | startupitem.pidfile auto ${prefix}/var/run/${base_name}/master.pid |
---|
107 | |
---|
108 | livecheck.url ${master_sites} |
---|
109 | livecheck.type regex |
---|
110 | livecheck.regex "${base_name}-(\\d+\\.\\d+(\[0-9rc.\]+)?).tar.gz" |
---|