# $Id: Portfile,v 1.7 2004/11/19 00:31:01 jkh Exp $ PortSystem 1.0 name courier-imap version 2.2.0 revision 1 categories mail maintainers bchesneau@mac.com description IMAP server long_description This package contains the standalone Courier IMAP server, \ which is used to provide IMAP access to local mailboxes. \ Courier-IMAP is provided here as a separate package that \ can be used with other mail servers as well. homepage http://prdownloads.sourceforge.net/courier/ platforms darwin master_sites sourceforge:courier use_bzip2 yes checksums md5 95e1f563a0c27330991820046d4d65d1 depends_lib lib:libssl.0.9:openssl depends_run path:/Library/StartupItems/DarwinPortsStartup:DarwinPortsStartup set authdaemondir ${prefix}/var/run/authdaemon.courier-imap patchfiles patch-rfc1035_res.h configure.args --bindir=${prefix}/bin --mandir=${prefix}/share/man \ --sysconfdir=${prefix}/etc/courier-imap \ --localstatedir=${prefix}/var/run \ --datadir=${prefix}/share/courier \ --with-piddir=${prefix}/var/run \ --with-authdaemonvar=${authdaemondir} \ --enable-unicode --disable-root-check platform darwin 6 { depends_lib-append lib:libdl:dlcompat configure.args-append --with-waitfunc=wait3 --with-authpam configure.env LDFLAGS="-L${prefix}/lib -L${prefix}/lib/mysql -L${prefix}/lib/pgsql" \ CPPFLAGS="-I${prefix}/include -I${prefix}/include/mysql -I${prefix}/include/pgsql -no-cpp-precomp" \ LANG=C } platform darwin 7 { configure.args-append --with-waitfunc=wait3 --with-authshadow --with-authpam configure.env LDFLAGS="-L${prefix}/lib -L${prefix}/lib/mysql -L${prefix}/lib/pgsql"\ CPPFLAGS="-I${prefix}/include -I${workpath}/paminclude -I${prefix}/include/mysql -I${prefix}/include/pgsql -no-cpp-precomp" \ CFLAGS="-I${prefix}/include -I${workpath}/paminclude -I${prefix}/include/mysql -I${prefix}/include/pgsql -no-cpp-precomp" \ LANG=C post-extract { system "rm '${worksrcpath}/INSTALL'" system "mkdir -p ${workpath}/paminclude" system "ln -s /usr/include/pam ${workpath}/paminclude/security" } } variant mysql { depends_lib-append lib:libmysqlclient:mysql } variant mysql4 { depends_lib-append lib:libmysqlclient:mysql4 } variant postgres { depends_lib-append lib:plpgsql:postgresql } variant ldap { configure.args-append --with-authldap } pre-configure { if { ![variant_isset mysql] && ![variant_isset mysql4] } { configure.args-append --without-authmysql } if { ![variant_isset ldap]} { configure.args-append --without-authldap } if { ![variant_isset postgres]} { configure.args-append --without-authpostgresql } } destroot.target install install-configure post-destroot { file mkdir ${destroot}${prefix}/var/run file mkdir ${destroot}${prefix}/etc/rc.d destroot.keepdirs ${destroot}${authdaemondir} system "install -o root -m 755 -c ${portpath}/files/*.sh ${destroot}${prefix}/etc/rc.d" reinplace "s|__PREFIX|${prefix}|g" ${destroot}${prefix}/etc/rc.d/imapd.sh reinplace "s|__PREFIX|${prefix}|g" ${destroot}${prefix}/etc/rc.d/imapd-ssl.sh reinplace "s|ulimit|#ulimit|g" ${destroot}${prefix}/libexec/imapd.rc reinplace "s|ulimit|#ulimit|g" ${destroot}${prefix}/libexec/imapd-ssl.rc }