# $Id: Portfile,v 1.17 2006/05/12 15:31:12 jberry Exp $ PortSystem 1.0 name dovecot version 1.0.beta8 categories mail maintainers yeled@opendarwin.org,jberry@opendarwin.org platforms darwin description Secure, fast imap and pop3 server -- currently in alpha approaching final long_description Dovecot is an IMAP and POP3 server for Linux/UNIX-like \ systems, written with security primarily in mind. Although \ it's written in C, it uses several coding techniques to \ avoid most of the common pitfalls. homepage http://dovecot.org/ master_sites ${homepage}releases/ distname dovecot-${version} checksums rmd160 101a7011467691ba5f4a6f48e21d6d1dc5626c16 depends_lib port:openssl configure.args --sysconfdir=${prefix}/etc/dovecot \ --localstatedir=${prefix}/var \ --with-ssl=openssl \ --with-ssl-dir=${prefix}/etc/ssl configure.env CPPFLAGS="-I${prefix}/include/openssl -I${prefix}/include/pgsql8" LDFLAGS="-L${prefix}/lib/pgsql8 -L${prefix}/lib" post-configure { # madvise fails on darwin 7 and earlier, but is fixed on darwin 8 if { ${os.platform} == "darwin" && [rpm-vercomp ${os.version} 8.0] < 0 } { reinplace "s|#define HAVE_MADVISE 1|/* #undef HAVE_MADVISE */|" ${worksrcpath}/config.h } } post-destroot { # Create the dovecot user and group addgroup dovecot set gid [existsgroup dovecot] adduser dovecot gid=${gid} realname=Dovecot } platform darwin 7 { # Avoid broken poll configure.args-append --with-ioloop=select } platform darwin 8 { # Avoid broken poll configure.args-append --with-ioloop=select } variant postgres { depends_lib-append port:postgresql8 configure.args-append --with-pgsql } variant rawlog { configure.args-append --with-rawlog } variant ldap { configure.args-append --with-ldap } startupitem.create yes startupitem.name Dovecot startupitem.start ${prefix}/sbin/dovecot startupitem.stop " pidfile=${prefix}/var/run/dovecot/master.pid \[ -r \${pidfile} \] && kill \$(cat \${pidfile}) "