# -*- 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 # $Id$ PortSystem 1.0 name exim version 4.82.1 revision 2 checksums rmd160 2caa80ed8b5fef07fd0449dc5ac7958681466a2d \ sha256 51798cead70b9ca03df88afb63f7a0cabedee8ef82c02bd18d67591c08b14500 categories mail license GPL-2 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. In overall style it is \ similar to Smail 3, but its facilities are more \ extensive. homepage http://www.exim.org/ platforms darwin maintainers nomaintainer master_sites ftp://ftp.exim.org/pub/exim/exim4/ \ ftp://ftp.exim.org/pub/exim/exim4/old/ \ ftp://ftp.easynet.be/exim/exim/exim4/ \ ftp://ftp.easynet.be/exim/exim/exim4/old/ use_bzip2 yes depends_build path:bin/perl:perl5 \ port:pcre depends_lib port:db44 \ path:lib/libssl.dylib:openssl \ port:sqlite3 startupitem.create yes startupitem.start "${prefix}/share/exim/exim.sh start" startupitem.stop "${prefix}/share/exim/exim.sh stop" set exim_user exim use_parallel_build no universal_variant no configure { copy ${worksrcpath}/src/EDITME ${worksrcpath}/Local/Makefile reinplace "s|/usr/exim/bin|${prefix}/sbin|g" ${worksrcpath}/Local/Makefile reinplace "s|/usr/exim/configure|${prefix}/etc/exim/exim.conf|g" ${worksrcpath}/Local/Makefile reinplace "s|EXIM_USER=|EXIM_USER=${exim_user}|g" ${worksrcpath}/Local/Makefile reinplace "s|/var/spool/exim|${prefix}/var/spool/exim|g" ${worksrcpath}/Local/Makefile reinplace "s|EXIM_MONITOR=eximon.bin|#EXIM_MONITOR=eximon.bin|g" ${worksrcpath}/Local/Makefile reinplace "s|# WITH_CONTENT_SCAN=yes|WITH_CONTENT_SCAN=yes|g" ${worksrcpath}/Local/Makefile reinplace "s|# LOOKUP_PASSWD=yes|LOOKUP_PASSWD=yes|g" ${worksrcpath}/Local/Makefile reinplace "s|# LOOKUP_CDB=yes|LOOKUP_CDB=yes|g" ${worksrcpath}/Local/Makefile reinplace "s|# LOOKUP_DSEARCH=yes|LOOKUP_DSEARCH=yes|g" ${worksrcpath}/Local/Makefile reinplace "s|# SUPPORT_MAILDIR=yes|SUPPORT_MAILDIR=yes|g" ${worksrcpath}/Local/Makefile reinplace "s|# TLS_LIBS=-L/usr/local/openssl/lib|TLS_LIBS=-L${prefix}/lib|g" ${worksrcpath}/Local/Makefile reinplace "s|# TLS_INCLUDE=-I/usr/local/openssl/include|TLS_INCLUDE=-I${prefix}/include/openssl|g" ${worksrcpath}/Local/Makefile reinplace "s|# INCLUDE=.*|INCLUDE=-I${prefix}/include|g" ${worksrcpath}/Local/Makefile reinplace "s|PCRE_LIBS=-lpcre|PCRE_LIBS=-L${prefix}/lib -lpcre|g" ${worksrcpath}/Local/Makefile # Setting TMPDIR="/tmp" (which is the default), breaks the build because clang tries to use it as temporary dir including the quotes. reinplace "s|^TMPDIR=|# TMPDIR=|g" ${worksrcpath}/Local/Makefile reinplace "s|CC=cc|CC=${configure.cc}|g" ${worksrcpath}/OS/Makefile-Darwin reinplace "s|X11=/usr/X11R6|X11=${prefix}|g" ${worksrcpath}/OS/Makefile-Darwin reinplace "s|# Exim: OS-specific make file for Darwin (Mac OS X).|INCLUDE=-I${prefix}/include/db44|g" ${worksrcpath}/OS/Makefile-Darwin reinplace "s|DBMLIB =|DBMLIB=${prefix}/lib/db44/libdb-4.dylib|g" ${worksrcpath}/OS/Makefile-Darwin reinplace "s|/etc/aliases|${destroot}${prefix}/etc/aliases|g" ${worksrcpath}/scripts/exim_install adduser ${exim_user} gid=[existsgroup mail] } build.args FULLECHO= destroot.destdir ROOT=${destroot} destroot.keepdirs ${destroot}${prefix}/var/spool/exim post-destroot { move ${destroot}${prefix}/etc/exim/exim.conf ${destroot}${prefix}/etc/exim/exim.conf.sample xinstall -o root -m 755 -d ${destroot}${prefix}/share/doc copy ${worksrcpath}/doc ${destroot}${prefix}/share/doc/exim xinstall -o ${exim_user} -g mail -m 750 -d ${destroot}${prefix}/var/spool/exim xinstall -o root -m 755 -d ${destroot}${prefix}/share/exim xinstall -o root -m 755 -c ${filespath}/exim.sh ${destroot}${prefix}/share/exim reinplace "s|__PREFIX|${prefix}|g" ${destroot}${prefix}/share/exim/exim.sh } variant mysql4 conflicts mysql5 description {build exim with support for mysql4 lookups} { depends_lib-append port:mysql4 } variant mysql5 conflicts mysql4 description {build exim with support for mysql5 lookups} { depends_lib-append path:bin/mysql_config5:mysql5 } variant ldap conflicts macports_ldap description {build exim with support for ldap lookups using the shipped ldap} { # do nothing .. until post-configure } variant macports_ldap conflicts ldap description {install exim with support for ldap lookups using macports ldap} { depends_lib-append port:openldap } post-configure { reinplace "s|# AUTH_CRAM_MD5=yes|AUTH_CRAM_MD5=yes|g" ${worksrcpath}/Local/Makefile reinplace "s|# AUTH_PLAINTEXT=yes|AUTH_PLAINTEXT=yes|g" ${worksrcpath}/Local/Makefile reinplace "s|# AUTH_SPA=yes|AUTH_SPA=yes|g" ${worksrcpath}/Local/Makefile reinplace "s|# SUPPORT_TLS=yes|SUPPORT_TLS=yes|g" ${worksrcpath}/Local/Makefile reinplace "s|# TLS_LIBS=-lssl -lcrypto|TLS_LIBS=-lssl -lcrypto|g" ${worksrcpath}/Local/Makefile reinplace "s|# LDAP_LIB_TYPE=OPENLDAP2|LDAP_LIB_TYPE=OPENLDAP2|g" ${worksrcpath}/Local/Makefile # settings common to any lookup if {[variant_isset mysql4] || [variant_isset mysql5] || [variant_isset ldap] || [variant_isset macports_ldap] } then { reinplace "s|^# LOOKUP_INCLUDE=.*|LOOKUP_INCLUDE=|g" ${worksrcpath}/Local/Makefile reinplace "s|^# LOOKUP_LIBS=.*|LOOKUP_LIBS=-L${prefix}/lib|g" ${worksrcpath}/Local/Makefile # lookup specific settings if {[variant_isset mysql4]} { reinplace "s|^# LOOKUP_MYSQL=yes|LOOKUP_MYSQL=yes|g" ${worksrcpath}/Local/Makefile reinplace "s|^LOOKUP_LIBS=.*|& -L${prefix}/lib/mysql -lmysqlclient|g" ${worksrcpath}/Local/Makefile reinplace "s|^LOOKUP_INCLUDE=.*|& -I${prefix}/include/mysql -I ${prefix}/include|g" ${worksrcpath}/Local/Makefile } if {[variant_isset mysql5]} { reinplace "s|^# LOOKUP_MYSQL=yes|LOOKUP_MYSQL=yes|g" ${worksrcpath}/Local/Makefile reinplace "s|^LOOKUP_LIBS=.*|& -L${prefix}/lib/mysql5/mysql -lmysqlclient |g" ${worksrcpath}/Local/Makefile reinplace "s|^LOOKUP_INCLUDE=.*|& -I${prefix}/include/mysql5/mysql |g" ${worksrcpath}/Local/Makefile } if {[variant_isset ldap]} { reinplace "s|^# LOOKUP_LDAP=yes|LOOKUP_LDAP=yes|g" ${worksrcpath}/Local/Makefile reinplace "s|^LOOKUP_LIBS=.*|& -L/usr/lib -lldap -llber |g" ${worksrcpath}/Local/Makefile reinplace "s|^LOOKUP_INCLUDE=.*|& -I/usr/include |g" ${worksrcpath}/Local/Makefile } if {[variant_isset macports_ldap]} { reinplace "s|^# LOOKUP_LDAP=yes|LOOKUP_LDAP=yes|g" ${worksrcpath}/Local/Makefile reinplace "s|^LOOKUP_LIBS=.*|& -L${prefix}/lib -lldap -llber |g" ${worksrcpath}/Local/Makefile reinplace "s|^LOOKUP_INCLUDE=.*|& -I${prefix}/include |g" ${worksrcpath}/Local/Makefile } } } livecheck.type regex livecheck.url ${homepage} livecheck.regex {Latest Version: ([0-9.]+)}