1 | PortSystem 1.0 |
---|
2 | name courier-imap |
---|
3 | version 1.7.1 |
---|
4 | revision 1 |
---|
5 | categories mail |
---|
6 | maintainers bchesneau@mac.com |
---|
7 | description IMAP server |
---|
8 | long_description This package contains the standalone Courier IMAP server, which is used to provide IMAP access to local mailboxes. Courier-IMAP is provided here as a separate package that can be used with other mail servers as well. |
---|
9 | |
---|
10 | homepage http://prdownloads.sourceforge.net/courier/ |
---|
11 | platforms darwin |
---|
12 | master_sites http://heanet.dl.sourceforge.net/sourceforge/courier/ \ |
---|
13 | http://unc.dl.sourceforge.net/sourceforge/courier/ \ |
---|
14 | http://easynews.dl.sourceforge.net/sourceforge/courier/ |
---|
15 | use_bzip2 yes |
---|
16 | checksums courier-imap-1.7.1.tar.bz2 md5 ce3a78cabd3d69e4982907de69ecac96 |
---|
17 | |
---|
18 | depends_lib lib:libssl.0.9:openssl |
---|
19 | depends_run path:/Library/StartupItems/DarwinPortsStartup:DarwinPortsStartup |
---|
20 | |
---|
21 | set authdaemondir ${prefix}/var/run/authdaemon.courier-imap |
---|
22 | |
---|
23 | configure.env CFLAGS=-no-cpp-precomp \ |
---|
24 | LANG=C |
---|
25 | |
---|
26 | configure.args --bindir=${prefix}/bin --mandir=${prefix}/share/man --sysconfdir=${prefix}/etc/courier --localstatedir=${prefix}/var/run --datadir=${prefix}/share/courier --with-piddir=${prefix}/var/run --with-authdaemonvar=${authdaemondir} --enable-workarounds-for-imap-client-bugs --enable-unicode=iso-8859-1,utf-8 --disable-root-check |
---|
27 | |
---|
28 | variant darwin { |
---|
29 | depends_lib-append lib:libdl.1:dlcompat |
---|
30 | patchfiles patch-authpam.c patch-rfc1035_res.h |
---|
31 | configure.args-append --with-waitfunc=wait3 |
---|
32 | } |
---|
33 | |
---|
34 | variant mysql { |
---|
35 | depends_lib-append lib:libmysqlclient:mysql |
---|
36 | configure.env-append LDFLAGS=-L${prefix}/lib/mysql \ |
---|
37 | CPPFLAGS=-I${prefix}/include/mysql |
---|
38 | } |
---|
39 | |
---|
40 | variant postgres { |
---|
41 | configure.env-append LDFLAGS=-L${prefix}/lib -L${prefix}/pgsql/lib \ |
---|
42 | CPPFLAGS=-I${prefix}/include/ -I${prefix}/pgsql/include |
---|
43 | depends_lib-append lib:plpgsql:postgresql |
---|
44 | } |
---|
45 | |
---|
46 | variant berkdb { |
---|
47 | depends_lib-append lib:libdb-4.1:db4 |
---|
48 | configure.env-append CPPFLAGES=-I${prefix}/include/db4 |
---|
49 | } |
---|
50 | |
---|
51 | pre-configure { |
---|
52 | |
---|
53 | if { ![variant_isset mysql]} { |
---|
54 | configure.args-append --without-authmysql |
---|
55 | } |
---|
56 | if { ![variant_isset ldap]} { |
---|
57 | configure.args-append --without-authldap |
---|
58 | } |
---|
59 | if { ![variant_isset pam]} { |
---|
60 | configure.args-append --without-authpam |
---|
61 | } |
---|
62 | if { ![variant_isset postgres]} { |
---|
63 | configure.args-append --without-authpostgresql |
---|
64 | } |
---|
65 | if { [variant_isset berkdb]} { |
---|
66 | configure.args-append --with-db=db |
---|
67 | } |
---|
68 | } |
---|
69 | |
---|
70 | |
---|
71 | install { |
---|
72 | system "cd ${workpath}/${worksrcdir}" |
---|
73 | system "make install DESTDIR=${destroot}" |
---|
74 | system "make install-configure DESTDIR=${destroot}" |
---|
75 | } |
---|
76 | |
---|
77 | post-install { |
---|
78 | file mkdir ${destroot}${prefix}/var/run |
---|
79 | file mkdir ${destroot}${prefix}/etc/rc.d |
---|
80 | file mkdir ${destroot}${authdaemondir} |
---|
81 | system "install -o root -m 755 -c \ |
---|
82 | ${portpath}/files/*.sh ${destroot}${prefix}/etc/rc.d" |
---|
83 | system "install -o root -m 755 -c \ |
---|
84 | ${portpath}/files/authdaemond.conf ${destroot}${prefix}/etc/courier" |
---|
85 | reinplace "s|__PREFIX|${prefix}|g" ${destroot}${prefix}/etc/rc.d/imapd.sh |
---|
86 | reinplace "s|ulimit|#ulimit|g" ${destroot}${prefix}/libexec/imapd.rc |
---|
87 | reinplace "s|ulimit|#ulimit|g" ${destroot}${prefix}/libexec/imapd-ssl.rc |
---|
88 | |
---|
89 | } |
---|