37 | | configure { |
38 | | copy ${worksrcpath}/src/EDITME ${worksrcpath}/Local/Makefile |
39 | | reinplace "s|/usr/exim/bin|${prefix}/sbin|g" ${worksrcpath}/Local/Makefile |
40 | | reinplace "s|/usr/exim/configure|${prefix}/etc/exim/exim.conf|g" ${worksrcpath}/Local/Makefile |
41 | | reinplace "s|EXIM_USER=|EXIM_USER=${exim_user}|g" ${worksrcpath}/Local/Makefile |
42 | | reinplace "s|/var/spool/exim|${prefix}/var/spool/exim|g" ${worksrcpath}/Local/Makefile |
43 | | reinplace "s|EXIM_MONITOR=eximon.bin|#EXIM_MONITOR=eximon.bin|g" ${worksrcpath}/Local/Makefile |
44 | | reinplace "s|# WITH_CONTENT_SCAN=yes|WITH_CONTENT_SCAN=yes|g" ${worksrcpath}/Local/Makefile |
45 | | reinplace "s|# LOOKUP_PASSWD=yes|LOOKUP_PASSWD=yes|g" ${worksrcpath}/Local/Makefile |
46 | | reinplace "s|# LOOKUP_CDB=yes|LOOKUP_CDB=yes|g" ${worksrcpath}/Local/Makefile |
47 | | reinplace "s|# LOOKUP_DSEARCH=yes|LOOKUP_DSEARCH=yes|g" ${worksrcpath}/Local/Makefile |
48 | | reinplace "s|# SUPPORT_MAILDIR=yes|SUPPORT_MAILDIR=yes|g" ${worksrcpath}/Local/Makefile |
49 | | reinplace "s|# TLS_LIBS=-L/usr/local/openssl/lib|TLS_LIBS=-L${prefix}/lib|g" ${worksrcpath}/Local/Makefile |
50 | | reinplace "s|# TLS_INCLUDE=-I/usr/local/openssl/include|TLS_INCLUDE=-I${prefix}/include/openssl|g" ${worksrcpath}/Local/Makefile |
51 | | reinplace "s|CC=cc|CC=${configure.cc}|g" ${worksrcpath}/OS/Makefile-Darwin |
52 | | reinplace "s|X11=/usr/X11R6|X11=${prefix}|g" ${worksrcpath}/OS/Makefile-Darwin |
53 | | reinplace "s|# Exim: OS-specific make file for Darwin (Mac OS X).|INCLUDE=-I${prefix}/include/db44|g" ${worksrcpath}/OS/Makefile-Darwin |
54 | | reinplace "s|DBMLIB =|DBMLIB=${prefix}/lib/db44/libdb-4.dylib|g" ${worksrcpath}/OS/Makefile-Darwin |
55 | | reinplace "s|/etc/aliases|${destroot}${prefix}/etc/aliases|g" ${worksrcpath}/scripts/exim_install |
56 | | adduser ${exim_user} gid=[existsgroup mail] } |
| 36 | configure { |
| 37 | copy ${worksrcpath}/src/EDITME ${worksrcpath}/Local/Makefile |
| 38 | reinplace "s|/usr/exim/bin|${prefix}/sbin|g" ${worksrcpath}/Local/Makefile |
| 39 | reinplace "s|/usr/exim/configure|${prefix}/etc/exim/exim.conf|g" ${worksrcpath}/Local/Makefile |
| 40 | reinplace "s|EXIM_USER=|EXIM_USER=${exim_user}|g" ${worksrcpath}/Local/Makefile |
| 41 | reinplace "s|/var/spool/exim|${prefix}/var/spool/exim|g" ${worksrcpath}/Local/Makefile |
| 42 | reinplace "s|EXIM_MONITOR=eximon.bin|#EXIM_MONITOR=eximon.bin|g" ${worksrcpath}/Local/Makefile |
| 43 | reinplace "s|# WITH_CONTENT_SCAN=yes|WITH_CONTENT_SCAN=yes|g" ${worksrcpath}/Local/Makefile |
| 44 | reinplace "s|# LOOKUP_PASSWD=yes|LOOKUP_PASSWD=yes|g" ${worksrcpath}/Local/Makefile |
| 45 | reinplace "s|# LOOKUP_CDB=yes|LOOKUP_CDB=yes|g" ${worksrcpath}/Local/Makefile |
| 46 | reinplace "s|# LOOKUP_DSEARCH=yes|LOOKUP_DSEARCH=yes|g" ${worksrcpath}/Local/Makefile |
| 47 | reinplace "s|# SUPPORT_MAILDIR=yes|SUPPORT_MAILDIR=yes|g" ${worksrcpath}/Local/Makefile |
| 48 | reinplace "s|# TLS_LIBS=-L/usr/local/openssl/lib|TLS_LIBS=-L${prefix}/lib|g" ${worksrcpath}/Local/Makefile |
| 49 | reinplace "s|# TLS_INCLUDE=-I/usr/local/openssl/include|TLS_INCLUDE=-I${prefix}/include/openssl|g" ${worksrcpath}/Local/Makefile |
| 50 | reinplace "s|# INCLUDE=.*|INCLUDE=-I${prefix}/include|g" ${worksrcpath}/Local/Makefile |
| 51 | reinplace "s|PCRE_LIBS=-lpcre|PCRE_LIBS=-L${prefix}/lib -lpcre|g" ${worksrcpath}/Local/Makefile |
| 52 | reinplace "s|CC=cc|CC=${configure.cc}|g" ${worksrcpath}/OS/Makefile-Darwin |
| 53 | reinplace "s|X11=/usr/X11R6|X11=${prefix}|g" ${worksrcpath}/OS/Makefile-Darwin |
| 54 | reinplace "s|# Exim: OS-specific make file for Darwin (Mac OS X).|INCLUDE=-I${prefix}/include/db44|g" ${worksrcpath}/OS/Makefile-Darwin |
| 55 | reinplace "s|DBMLIB =|DBMLIB=${prefix}/lib/db44/libdb-4.dylib|g" ${worksrcpath}/OS/Makefile-Darwin |
| 56 | reinplace "s|/etc/aliases|${destroot}${prefix}/etc/aliases|g" ${worksrcpath}/scripts/exim_install |
| 57 | adduser ${exim_user} gid=[existsgroup mail] |
| 58 | } |
61 | | post-destroot { system "mv ${destroot}${prefix}/etc/exim/exim.conf ${destroot}${prefix}/etc/exim/exim.conf.sample" |
62 | | xinstall -o root -m 755 -d ${destroot}${prefix}/share/exim |
63 | | system "cp -R ${worksrcpath}/doc/ ${destroot}${prefix}/share/exim" |
64 | | xinstall -o ${exim_user} -g mail -m 750 -d ${destroot}${prefix}/var/spool/exim |
65 | | xinstall -o root -m 755 -d ${destroot}${prefix}/etc/rc.d |
66 | | xinstall -o root -m 755 -c \ |
67 | | ${portpath}/files/exim.sh ${destroot}${prefix}/share/exim |
68 | | reinplace "s|__PREFIX|${prefix}|g" ${destroot}${prefix}/share/exim/exim.sh } |
| 63 | post-destroot { |
| 64 | system "mv ${destroot}${prefix}/etc/exim/exim.conf ${destroot}${prefix}/etc/exim/exim.conf.sample" |
| 65 | xinstall -o root -m 755 -d ${destroot}${prefix}/share/exim |
| 66 | system "cp -R ${worksrcpath}/doc/ ${destroot}${prefix}/share/exim" |
| 67 | xinstall -o ${exim_user} -g mail -m 750 -d ${destroot}${prefix}/var/spool/exim |
| 68 | xinstall -o root -m 755 -d ${destroot}${prefix}/etc/rc.d |
| 69 | xinstall -o root -m 755 -c \ |
| 70 | ${portpath}/files/exim.sh ${destroot}${prefix}/share/exim |
| 71 | reinplace "s|__PREFIX|${prefix}|g" ${destroot}${prefix}/share/exim/exim.sh |
| 72 | } |
70 | | variant mysql4 { depends_lib-append lib:libmysqlclient:mysql4 } |
| 74 | variant mysql4 description {build exim with support for mysql4 lookups} { |
| 75 | depends_lib-append port:mysql4 |
| 76 | } |
| 77 | |
| 78 | variant mysql5 conflicts mysql4 description {build exim with support for mysql5 lookups} { |
| 79 | depends_lib-append path:bin/mysql_config5:mysql5 |
| 80 | } |
| 81 | |
| 82 | variant ldap conflicts macports_ldap description {build exim with support for ldap lookups using the shipped ldap} { |
| 83 | # do nothing .. until post-configure |
| 84 | } |
| 85 | |
| 86 | variant macports_ldap conflicts ldap description {install exim with support for ldap lookups using macports ldap} { |
| 87 | depends_lib-append port:openldap |
| 88 | } |
79 | | reinplace "s|# LOOKUP_LIBS=-L/usr/local/lib -lldap -llber -lmysqlclient -lpq -lgds|LOOKUP_LIBS=-lldap|g" ${worksrcpath}/Local/Makefile |
80 | | |
81 | | if {[variant_isset mysql] || [variant_isset mysql4]} { |
82 | | reinplace "s|# LOOKUP_MYSQL=yes|LOOKUP_MYSQL=yes|g" ${worksrcpath}/Local/Makefile |
83 | | reinplace "s|# LOOKUP_INCLUDE=.*|LOOKUP_INCLUDE=-I ${prefix}/include/mysql -I ${prefix}/include -I /usr/include|g" ${worksrcpath}/Local/Makefile |
| 97 | |
| 98 | # settings common to any lookup |
| 99 | if {[variant_isset mysql4] |
| 100 | || [variant_isset mysql5] |
| 101 | || [variant_isset ldap] |
| 102 | || [variant_isset macports_ldap] |
| 103 | } then { |
| 104 | reinplace "s|^# LOOKUP_INCLUDE=.*|LOOKUP_INCLUDE=|g" ${worksrcpath}/Local/Makefile |
| 105 | reinplace "s|^# LOOKUP_LIBS=.*|LOOKUP_LIBS=-L${prefix}/lib|g" ${worksrcpath}/Local/Makefile |
| 106 | # lookup specific settings |
| 107 | if {[variant_isset mysql4]} { |
| 108 | reinplace "s|^# LOOKUP_MYSQL=yes|LOOKUP_MYSQL=yes|g" ${worksrcpath}/Local/Makefile |
| 109 | reinplace "s|^LOOKUP_LIBS=.*|& -L${prefix}/lib/mysql -lmysqlclient|g" ${worksrcpath}/Local/Makefile |
| 110 | reinplace "s|^LOOKUP_INCLUDE=.*|& -I${prefix}/include/mysql -I ${prefix}/include|g" ${worksrcpath}/Local/Makefile |
| 111 | } |
| 112 | if {[variant_isset mysql5]} { |
| 113 | reinplace "s|^# LOOKUP_MYSQL=yes|LOOKUP_MYSQL=yes|g" ${worksrcpath}/Local/Makefile |
| 114 | reinplace "s|^LOOKUP_LIBS=.*|& -L${prefix}/lib/mysql5/mysql -lmysqlclient |g" ${worksrcpath}/Local/Makefile |
| 115 | reinplace "s|^LOOKUP_INCLUDE=.*|& -I${prefix}/include/mysql5/mysql |g" ${worksrcpath}/Local/Makefile |
| 116 | } |
| 117 | if {[variant_isset ldap]} { |
| 118 | reinplace "s|^# LOOKUP_LDAP=yes|LOOKUP_LDAP=yes|g" ${worksrcpath}/Local/Makefile |
| 119 | reinplace "s|^LOOKUP_LIBS=.*|& -L/usr/lib -lldap -llber |g" ${worksrcpath}/Local/Makefile |
| 120 | reinplace "s|^LOOKUP_INCLUDE=.*|& -I/usr/include |g" ${worksrcpath}/Local/Makefile |
| 121 | } |
| 122 | if {[variant_isset macports_ldap]} { |
| 123 | reinplace "s|^# LOOKUP_LDAP=yes|LOOKUP_LDAP=yes|g" ${worksrcpath}/Local/Makefile |
| 124 | reinplace "s|^LOOKUP_LIBS=.*|& -L${prefix}/lib -lldap -llber |g" ${worksrcpath}/Local/Makefile |
| 125 | reinplace "s|^LOOKUP_INCLUDE=.*|& -I${prefix}/include |g" ${worksrcpath}/Local/Makefile |
| 126 | } |
| 127 | |