Ticket #2236: exim-4.42.txt

File exim-4.42.txt, 4.3 KB (added by iane@…, 20 years ago)

Portfile for exim-4.42

Line 
1# $Id: Portfile,v 1.23 2004/07/25 22:37:58 fkr Exp $
2
3PortSystem 1.0
4name            exim
5version         4.42
6categories      mail
7description     complete replacement for sendmail
8long_description        Exim is a mail transfer agent (MTA) developed \
9                        at the University of Cambridge for use on Unix \
10                        systems connected to the Internet. It is freely \
11                        available under the terms of the GNU General \
12                        Public Licence. In overall style it is similar \
13                        to Smail 3, but its facilities are more extensive.
14homepage        http://www.exim.org/
15platforms       darwin
16maintainers     fkr@opendarwin.org cms@opendarwin.org
17master_sites    ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/ \
18                ftp://ftp.exim.org/pub/exim/exim4/
19checksums       md5     b1b7b66f9713a777e92fd6650e6ba954
20depends_build   bin:perl:perl5.8
21depends_run     path:/Library/StartupItems/DarwinPortsStartup:DarwinPortsStartup
22
23set exim_user   exim
24patch.pre_args  -p1
25
26configure   {   cd ${worksrcpath}
27                system "cp src/EDITME Local/Makefile"
28                reinplace "s|/usr/exim/bin|${prefix}/sbin|g" Local/Makefile
29                reinplace "s|/usr/exim/configure|${prefix}/etc/exim/exim.conf|g" Local/Makefile
30                reinplace "s|EXIM_USER=|EXIM_USER=${exim_user}|g" Local/Makefile
31                reinplace "s|/var/spool/exim|${prefix}/var/spool/exim|g" Local/Makefile
32                reinplace "s|EXIM_MONITOR=eximon.bin|#EXIM_MONITOR=eximon.bin|g" Local/Makefile
33                reinplace "s|/etc/aliases|${destroot}${prefix}/etc/aliases|g" scripts/exim_install
34                reinplace "s|DBMLIB =|DBMLIB =/usr/local/lib/libdb.dylib|g" OS/Makefile-Darwin
35                adduser ${exim_user} gid=[existsgroup mail] }
36
37destroot.destdir        ROOT=${destroot}
38
39post-destroot { system "mv ${destroot}${prefix}/etc/exim/exim.conf ${destroot}${prefix}/etc/exim/exim.conf.sample"
40                xinstall -o root -m 755 -d ${destroot}${prefix}/share/exim
41                cd ${worksrcpath}
42                system "cp -R doc/ ${destroot}${prefix}/share/exim"
43                xinstall -o ${exim_user} -g mail -m 750 -d ${destroot}${prefix}/var/spool/exim
44                xinstall -o root -m 755 -d ${destroot}${prefix}/etc/rc.d
45                xinstall -o root -m 755 -c \
46                     ${portpath}/files/exim.sh ${destroot}${prefix}/etc/rc.d
47                system "touch '${destroot}${prefix}/var/spool/exim/.turd'"
48                reinplace "s|__PREFIX|${prefix}|g" ${destroot}${prefix}/etc/rc.d/exim.sh }
49
50
51platform darwin 6 {
52
53        if {[variant_isset mysql] || [variant_isset mysql4]} {
54                patchfiles-append patch-EDITME
55                reinplace "s|LOOKUP_LIBS=-lresolv|LOOKUP_LIBS=-L${prefix}/lib/mysql -L${prefix}/lib -L/usr/lib -lmysqlclient|g" ${filespath}/patch-EDITME
56        }
57}
58
59platform darwin 7 {     
60        patchfiles-append       patch-EDITME
61                                               
62        if {[variant_isset mysql] || [variant_isset mysql4]} {
63                reinplace "s|LOOKUP_LIBS=-lresolv|LOOKUP_LIBS=-L${prefix}/lib/mysql -L${prefix}/lib -L/usr/lib -lresolv -lmysqlclient|g" ${filespath}/patch-EDITME
64        }
65       
66}
67
68variant smtp-auth { }
69variant tls { }
70
71variant exiscan { patch_sites           http://duncanthrax.net/exiscan-acl/
72                  patchfiles-append     exiscan-acl-4.42-27.patch
73                  checksums-append      exiscan-acl-4.42-27.patch md5 3dc7322b6852eb05f7acc3a1108810d6 }
74
75variant mysql { depends_lib-append      lib:libmysqlclient:mysql }
76
77variant mysql4 { depends_lib-append      lib:libmysqlclient:mysql4 }
78
79variant maildir { }
80
81variant ldap { }
82
83post-configure {
84        if {[variant_isset mysql] || [variant_isset mysql4]} {
85                reinplace "s|# LOOKUP_MYSQL=yes|LOOKUP_MYSQL=yes|g" Local/Makefile
86                reinplace "s|# LOOKUP_INCLUDE=.*|LOOKUP_INCLUDE=-I ${prefix}/include/mysql -I ${prefix}/include -I /usr/include|g" Local/Makefile
87        }
88
89        if {[variant_isset maildir ]} {
90                reinplace "s|# SUPPORT_MAILDIR=yes|SUPPORT_MAILDIR=yes|g" Local/Makefile       
91        }
92
93        if {[variant_isset smtp-auth ]} {
94                reinplace "s|# AUTH_CRAM_MD5=yes|AUTH_CRAM_MD5=yes|g" Local/Makefile
95                reinplace "s|# AUTH_PLAINTEXT=yes|AUTH_PLAINTEXT=yes|g" Local/Makefile
96                reinplace "s|# AUTH_SPA=yes|AUTH_SPA=yes|g" Local/Makefile     
97        }
98        if {[variant_isset tls ]} {
99                reinplace "s|# SUPPORT_TLS=yes|SUPPORT_TLS=yes|g" Local/Makefile
100                reinplace "s|# TLS_LIBS=-lssl -lcrypto|TLS_LIBS=-lssl -lcrypto|g" Local/Makefile
101        }
102        if {[variant_isset ldap]} {
103                reinplace "s|# LDAP_LIB_TYPE=OPENLDAP2|LDAP_LIB_TYPE=OPENLDAP2|g" Local/Makefile
104        }
105}
106