source: trunk/dports/mail/dovecot2/Portfile @ 72030

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

mail/dovecot2: New port, closes #26111

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.0 KB
Line 
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: Portfile 72030 2010-09-30 21:10:28Z raimue@macports.org $
3
4PortSystem          1.0
5
6name                dovecot2
7set base_name       dovecot
8conflicts           ${base_name}
9version             2.0.4
10set branch          [join [lrange [split ${version} .] 0 1] .]
11categories          mail
12maintainers         pixilla.com:brad
13platforms           darwin
14
15description         Secure, fast imap and pop3 server
16long_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
21homepage            http://dovecot.org/
22master_sites        ${homepage}releases/${branch}
23
24distname            ${base_name}-${version}
25
26checksums           sha1    18c471e991d49424c9dd7d40f3899ea602f57bbc \
27                    rmd160  a3360158bb1242b009397e1c1180ccf9585eb547
28
29depends_build       port:pkgconfig
30depends_lib         port:libiconv \
31                    port:zlib \
32                    port:openssl
33
34set default_internal_user \
35    _dovecot
36set default_login_user \
37    _dovenull
38
39patchfiles          patch-doc-example-config-conf.d-10-master.conf.diff
40
41post-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
48configure.args      --sysconfdir=${prefix}/etc \
49                    --localstatedir=${prefix}/var \
50                    --with-ioloop=kqueue \
51                    --with-ssl=openssl \
52                    --with-ssldir=${prefix}/etc/ssl
53
54configure.cppflags  -I${prefix}/include/openssl
55
56pre-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
75variant 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
81variant 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
87variant 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
93variant 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
99variant ldap description {Enable LDAP support} {
100    configure.args-append       --with-ldap
101    depends_lib-append          port:openldap
102}
103
104startupitem.create      yes
105startupitem.executable  ${prefix}/sbin/${base_name}
106startupitem.pidfile     auto ${prefix}/var/run/${base_name}/master.pid
107
108livecheck.url   ${master_sites}
109livecheck.type  regex
110livecheck.regex "${base_name}-(\\d+\\.\\d+(\[0-9rc.\]+)?).tar.gz"
Note: See TracBrowser for help on using the repository browser.