# $Id: Portfile,v 1.26 2004/11/07 01:03:18 jkh Exp $ PortSystem 1.0 name exim version 4.42 revision 1 categories mail description complete replacement for sendmail long_description Exim is a mail transfer agent (MTA) developed \ at the University of Cambridge for use on Unix \ systems connected to the Internet. It is freely \ available under the terms of the GNU General \ Public Licence. In overall style it is similar \ to Smail 3, but its facilities are more extensive. homepage http://www.exim.org/ platforms darwin maintainers fkr@opendarwin.org cms@opendarwin.org master_sites ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/ \ ftp://ftp.exim.org/pub/exim/exim4/ checksums md5 b1b7b66f9713a777e92fd6650e6ba954 depends_build bin:perl:perl5.8 depends_run path:/Library/StartupItems/DarwinPortsStartup:DarwinPortsStartup set exim_user exim patch.pre_args -p1 configure { cd ${worksrcpath} system "cp src/EDITME Local/Makefile" reinplace "s|/usr/exim/bin|${prefix}/sbin|g" Local/Makefile reinplace "s|/usr/exim/configure|${prefix}/etc/exim/exim.conf|g" Local/Makefile reinplace "s|EXIM_USER=|EXIM_USER=${exim_user}|g" Local/Makefile reinplace "s|/var/spool/exim|${prefix}/var/spool/exim|g" Local/Makefile reinplace "s|EXIM_MONITOR=eximon.bin|#EXIM_MONITOR=eximon.bin|g" Local/Makefile reinplace "s|/etc/aliases|${destroot}${prefix}/etc/aliases|g" scripts/exim_install adduser ${exim_user} gid=[existsgroup mail] } destroot.destdir ROOT=${destroot} post-destroot { system "mv ${destroot}${prefix}/etc/exim/exim.conf ${destroot}${prefix}/etc/exim/exim.conf.sample" xinstall -o root -m 755 -d ${destroot}${prefix}/share/exim cd ${worksrcpath} system "cp -R doc/ ${destroot}${prefix}/share/exim" xinstall -o ${exim_user} -g mail -m 750 -d ${destroot}${prefix}/var/spool/exim xinstall -o root -m 755 -d ${destroot}${prefix}/etc/rc.d xinstall -o root -m 755 -c \ ${portpath}/files/exim.sh ${destroot}${prefix}/etc/rc.d destroot.keepdirs ${destroot}${prefix}/var/spool/exim reinplace "s|__PREFIX|${prefix}|g" ${destroot}${prefix}/etc/rc.d/exim.sh } platform darwin 6 { if {[variant_isset mysql] || [variant_isset mysql4]} { patchfiles-append patch-EDITME reinplace "s|LOOKUP_LIBS=-lresolv|LOOKUP_LIBS=-L${prefix}/lib/mysql -L${prefix}/lib -L/usr/lib -lmysqlclient|g" ${filespath}/patch-EDITME } } platform darwin 7 { patchfiles-append patch-EDITME if {[variant_isset mysql] || [variant_isset mysql4]} { reinplace "s|LOOKUP_LIBS=-lresolv|LOOKUP_LIBS=-L${prefix}/lib/mysql -L${prefix}/lib -L/usr/lib -lresolv -lmysqlclient|g" ${filespath}/patch-EDITME } } variant smtp-auth { } variant tls { } variant exiscan { patch_sites http://duncanthrax.net/exiscan-acl/ patchfiles-append exiscan-acl-4.42-27.patch checksums-append exiscan-acl-4.42-27.patch md5 3dc7322b6852eb05f7acc3a1108810d6 } variant mysql { depends_lib-append lib:libmysqlclient:mysql } variant mysql4 { depends_lib-append lib:libmysqlclient:mysql4 } variant maildir { } variant ldap { } post-configure { if {[variant_isset mysql] || [variant_isset mysql4]} { reinplace "s|# LOOKUP_MYSQL=yes|LOOKUP_MYSQL=yes|g" Local/Makefile reinplace "s|# LOOKUP_INCLUDE=.*|LOOKUP_INCLUDE=-I ${prefix}/include/mysql -I ${prefix}/include -I /usr/include|g" Local/Makefile } if {[variant_isset maildir ]} { reinplace "s|# SUPPORT_MAILDIR=yes|SUPPORT_MAILDIR=yes|g" Local/Makefile } if {[variant_isset smtp-auth ]} { reinplace "s|# AUTH_CRAM_MD5=yes|AUTH_CRAM_MD5=yes|g" Local/Makefile reinplace "s|# AUTH_PLAINTEXT=yes|AUTH_PLAINTEXT=yes|g" Local/Makefile reinplace "s|# AUTH_SPA=yes|AUTH_SPA=yes|g" Local/Makefile } if {[variant_isset tls ]} { reinplace "s|# SUPPORT_TLS=yes|SUPPORT_TLS=yes|g" Local/Makefile reinplace "s|# TLS_LIBS=-lssl -lcrypto|TLS_LIBS=-lssl -lcrypto|g" Local/Makefile } if {[variant_isset ldap]} { reinplace "s|# LDAP_LIB_TYPE=OPENLDAP2|LDAP_LIB_TYPE=OPENLDAP2|g" Local/Makefile reinplace "s|# LOOKUP_LIBS=-L/usr/local/lib -lldap -llber -lmysqlclient -lpq -lgds|LOOKUP_LIBS=-lldap|g" Local/Makefile } }