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

Last change on this file since 84550 was 84550, checked in by snc@…, 8 years ago

modelines

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.4 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 84550 2011-09-27 21:05:11Z snc@macports.org $
3
4PortSystem          1.0
5
6name                dovecot2
7set base_name       dovecot
8conflicts           ${base_name}
9version             2.0.13
10set branch          [join [lrange [split ${version} .] 0 1] .]
11categories          mail
12maintainers         pixilla
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    31d556bd1659fb10e5edb45bab8951911151bbfb \
27                    rmd160  2c0edd03aba7935e6db18af1384a26bf0b5b432e
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 postgresql90 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 postgresql90 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 postgresql90 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 postgresql90 conflicts postgresql82 postgresql83 postgresql84 description {Enable PostgreSQL 9.0 support} {
94    depends_lib-append          port:postgresql90
95    configure.env-append        PG_CONFIG=${prefix}/lib/postgresql90/bin/pg_config
96    configure.args-append       --with-pgsql
97}
98
99variant mysql5 description {Enable MySQL support} {
100    depends_lib-append          path:bin/mysql_config5:mysql5
101    configure.env-append        MYSQL_CONFIG=${prefix}/bin/mysql_config5
102    configure.args-append       --with-mysql
103}
104
105variant ldap description {Enable LDAP support} {
106    configure.args-append       --with-ldap
107    depends_lib-append          port:openldap
108}
109
110variant no_startupitem description {Do not install a launchd plist} {}
111
112if {![variant_isset "no_startupitem"]} {
113    startupitem.create      yes
114    startupitem.executable  ${prefix}/sbin/${base_name}
115    startupitem.pidfile     auto ${prefix}/var/run/${base_name}/master.pid
116}
117
118livecheck.url   ${master_sites}
119livecheck.type  regex
120livecheck.regex "${base_name}-(\\d+\\.\\d+(\[0-9rc.\]+)?).tar.gz"
Note: See TracBrowser for help on using the repository browser.