Ticket #2236: exim-4.42.2.txt

File exim-4.42.2.txt, 4.4 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                adduser ${exim_user} gid=[existsgroup mail] }
35
36destroot.destdir        ROOT=${destroot}
37
38post-destroot { system "mv ${destroot}${prefix}/etc/exim/exim.conf ${destroot}${prefix}/etc/exim/exim.conf.sample"
39                xinstall -o root -m 755 -d ${destroot}${prefix}/share/exim
40                cd ${worksrcpath}
41                system "cp -R doc/ ${destroot}${prefix}/share/exim"
42                xinstall -o ${exim_user} -g mail -m 750 -d ${destroot}${prefix}/var/spool/exim
43                xinstall -o root -m 755 -d ${destroot}${prefix}/etc/rc.d
44                xinstall -o root -m 755 -c \
45                     ${portpath}/files/exim.sh ${destroot}${prefix}/etc/rc.d
46                system "touch '${destroot}${prefix}/var/spool/exim/.turd'"
47                reinplace "s|__PREFIX|${prefix}|g" ${destroot}${prefix}/etc/rc.d/exim.sh }
48
49
50platform darwin 6 {
51
52        if {[variant_isset mysql] || [variant_isset mysql4]} {
53                patchfiles-append patch-EDITME
54                reinplace "s|LOOKUP_LIBS=-lresolv|LOOKUP_LIBS=-L${prefix}/lib/mysql -L${prefix}/lib -L/usr/lib -lmysqlclient|g" ${filespath}/patch-EDITME
55        }
56}
57
58platform darwin 7 {     
59        patchfiles-append       patch-EDITME
60                                               
61        if {[variant_isset mysql] || [variant_isset mysql4]} {
62                reinplace "s|LOOKUP_LIBS=-lresolv|LOOKUP_LIBS=-L${prefix}/lib/mysql -L${prefix}/lib -L/usr/lib -lresolv -lmysqlclient|g" ${filespath}/patch-EDITME
63        }
64       
65}
66
67variant smtp-auth { }
68variant tls { }
69
70variant exiscan { patch_sites           http://duncanthrax.net/exiscan-acl/
71                  patchfiles-append     exiscan-acl-4.42-27.patch
72                  checksums-append      exiscan-acl-4.42-27.patch md5 3dc7322b6852eb05f7acc3a1108810d6 }
73
74variant mysql { depends_lib-append      lib:libmysqlclient:mysql }
75
76variant mysql4 { depends_lib-append      lib:libmysqlclient:mysql4 }
77
78variant maildir { }
79
80variant ldap { }
81
82post-configure {
83        if {[variant_isset mysql] || [variant_isset mysql4]} {
84                reinplace "s|# LOOKUP_MYSQL=yes|LOOKUP_MYSQL=yes|g" Local/Makefile
85                reinplace "s|# LOOKUP_INCLUDE=.*|LOOKUP_INCLUDE=-I ${prefix}/include/mysql -I ${prefix}/include -I /usr/include|g" Local/Makefile
86        }
87
88        if {[variant_isset maildir ]} {
89                reinplace "s|# SUPPORT_MAILDIR=yes|SUPPORT_MAILDIR=yes|g" Local/Makefile       
90        }
91
92        if {[variant_isset smtp-auth ]} {
93                reinplace "s|# AUTH_CRAM_MD5=yes|AUTH_CRAM_MD5=yes|g" Local/Makefile
94                reinplace "s|# AUTH_PLAINTEXT=yes|AUTH_PLAINTEXT=yes|g" Local/Makefile
95                reinplace "s|# AUTH_SPA=yes|AUTH_SPA=yes|g" Local/Makefile     
96        }
97        if {[variant_isset tls ]} {
98                reinplace "s|# SUPPORT_TLS=yes|SUPPORT_TLS=yes|g" Local/Makefile
99                reinplace "s|# TLS_LIBS=-lssl -lcrypto|TLS_LIBS=-lssl -lcrypto|g" Local/Makefile
100        }
101        if {[variant_isset ldap]} {
102                reinplace "s|# LDAP_LIB_TYPE=OPENLDAP2|LDAP_LIB_TYPE=OPENLDAP2|g" Local/Makefile
103                reinplace "s|# LOOKUP_LIBS=-L/usr/local/lib -lldap -llber -lmysqlclient -lpq -lgds|LOOKUP_LIBS=-lldap|g" Local/Makefile
104        }
105}
106