Ticket #22993: Portfile.2

File Portfile.2, 2.9 KB (added by pixilla (Bradley Giesbrecht), 15 years ago)

dovecot v1.2.9 Portfile

Line 
1# $Id: Portfile 39958 2008-09-14 03:40:17Z jberry@macports.org $
2
3PortSystem          1.0
4
5name                dovecot
6epoch               20060722
7version             1.2.9
8
9set major_version   1.2
10
11categories          mail
12maintainers         jberry
13platforms           darwin
14
15description         Secure, fast imap and pop3 server -- currently in alpha approaching final
16long_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
21homepage            http://dovecot.org/
22
23master_sites        ${homepage}releases/${major_version}
24distname            dovecot-${version}
25checksums           md5     036ff97fb248dae3bd4b796a0644634f \
26                    sha1    7c1013a1bc856a4366f76ac1f40e856185695e20 \
27                    rmd160  fa17bafabdd6fab69c22d617deff368a4bc165d1
28
29depends_lib         port:libiconv \
30                    port:pkgconfig \
31                    port:zlib \
32                    port:openssl
33
34configure.args      --sysconfdir=${prefix}/etc/dovecot \
35                    --localstatedir=${prefix}/var \
36                    --with-ssl=openssl --with-ssldir=${prefix}/etc/ssl \
37                    --enable-header-install
38
39configure.cppflags  "-I${prefix}/include/openssl"
40
41post-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
48post-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
55platform darwin 7 {
56    # Avoid broken poll
57    configure.args-append --with-ioloop=select
58
59}
60
61platform darwin 8 {
62    configure.args-append --with-ioloop=kqueue
63}
64
65platform darwin 9 {
66    configure.args-append --with-ioloop=kqueue
67}
68
69variant 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
76variant rawlog {
77    configure.args-append --with-rawlog
78}
79
80variant ldap {
81    configure.args-append --with-ldap
82    depends_lib-append port:openldap
83}
84
85variant 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 
92startupitem.create  yes
93startupitem.executable ${prefix}/sbin/dovecot
94startupitem.pidfile auto ${prefix}/var/run/dovecot/master.pid
95
96livecheck.type      regex
97livecheck.url       http://www.dovecot.org/releases/${major_version}/
98livecheck.regex     "${name}-(\\d+\\.\\d+(\\.\\d+)?).tar.gz"
99