source: trunk/dports/mail/vpopmail/Portfile @ 58230

Last change on this file since 58230 was 58230, checked in by ryandesign@…, 11 years ago

rewrite mysql5 dependency so mysql5-devel can satisfy it

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.0 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
2# $Id: Portfile 58230 2009-09-24 16:45:22Z ryandesign@macports.org $
3
4PortSystem      1.0
5
6name                            vpopmail
7version                         5.4.25
8categories                      mail
9maintainers                     yahoo.com:compconsultant
10platforms                       darwin
11
12description                     Manage multiple virtual domains with Qmail
13
14long_description                Vpopmail is a set of programs for creating and managing multiple virtual domains on a qmail server, with full support for many POP/IMAP servers.
15
16variant onchange description {Enable use on the ONCHANGE script} {
17        configure.args-append   --enable-onchange-script
18}
19
20variant mysql5 description {Store vpopmail users and more in MySQL5} {
21        configure.args-append   --enable-auth-module=mysql \
22                                --enable-auth-logging \
23                                --enable-sql-logging \
24                                --enable-incdir=${prefix}/include/mysql5/mysql \
25                                --enable-libdir=${prefix}/lib/mysql5/mysql \
26                                --enable-valias
27        depends_lib-append      path:bin/mysql_config5:mysql5
28}
29
30variant roaming description {Enable POP before SMTP functionality} {
31        configure.args-append   --enable-roaming-users \
32                                --enable-tcpserver-file=${prefix}/var/${name}/etc/tcp.smtp
33}
34
35variant noclearpasswords description {Do not store a cleartext version of the password} {
36        configure.args-append   --disable-clear-passwd
37}
38
39variant learnpasswords description {If user password is not set, learn it the first time they authenticate} {
40        configure.args-append   --enable-learn-passwords
41}
42
43variant spamassassin description {Enable spamassassin integration} {
44        configure.args-append   --enable=spamassassin \
45                                --enable-spamc-prog=${prefix}/bin/spamc
46        depends_lib-append      port:p5-mail-spamassassin
47}
48
49variant maildrop description {Enable maildrop integration} {
50        configure.args-append   --enable-maildrop \
51                                --enable-maildrop-prog=${prefix}/bin/maildrop
52        depends_lib-append      port:maildrop
53}
54
55variant logverbose conflicts logpwds logall description {Enables verbose logging of all attempts, with passwords} {
56        configure.args-append   --enable-logging=v
57}
58
59variant logpwds conflicts logverbose logall description {Log errors with passwords} {
60        configure.args-append   --enable-logging=p
61}
62
63variant logall conflicts logpwds logverbose description {Log all attempts, no passwords} {
64        configure.args-append   --enable-logging=y
65}
66
67homepage                        http://www.inter7.com/index.php?page=vpopmail
68
69depends_lib                     port:qmail-spamcontrol \
70                                port:ucspi-tcp
71
72master_sites                    sourceforge
73                               
74checksums                       md5 273c2c25906aed5206e97b01a2593aa6 \
75                                sha1 ce62415fbd338b80f1962a477d94276f622756d0 \
76                                rmd160 57142cca0617bd95ef2e5f4aa74ab5fa0844d6df
77
78patchfiles                      patch-configure.diff
79
80configure.args                  --enable-qmaildir=${prefix}/var/qmail \
81                                --enable-tcprules-prog=${prefix}/bin/tcprules \
82                                --enable-qmail-ext \
83                                --prefix=${prefix} \
84                                --exec-prefix=${prefix}
85
86build.target
87
88destroot.target         install-strip
89destroot.keepdirs       ${destroot}${prefix}/var/${name}/domains
90
91pre-configure {
92
93        # The vpopmail users and groups are required before compilation
94        addgroup vchkpw gid=2109
95        adduser vpopmail uid=7797 gid=[existsgroup vchkpw] realname=vpopmail home=${prefix}/var/${name} shell=/usr/bin/true
96}
97
98post-destroot {
99        if {[variant_isset roaming]} {
100                system "echo \"127.:allow,RELAYCLIENT=''\" > ${destroot}${prefix}/var/${name}/etc/tcp.smtp.sample"
101                system "echo \"localhost|0|user|password|database\" >${destroot}${prefix}/var/${name}/etc/tcp.smtp.sample"
102                system "chown vpopmail:vchkpw ${destroot}${prefix}/var/${name}/etc/tcp.smtp.sample"
103                xinstall -m 644 -W ${worksrcpath} README.roamingusers ${destroot}${prefix}/var/${name}/doc
104        }
105        if {[variant_isset mysql5]} {
106                file rename ${destroot}/${prefix}/var/${name}/etc/vpopmail.mysql ${destroot}/${prefix}/var/${name}/etc/vpopmail.mysql.sample
107                xinstall -m 644 -W ${worksrcpath} README.mysql ${destroot}${prefix}/var/${name}/doc
108        }
109        if {[variant_isset maildrop]} {
110                xinstall -m 644 -W ${worksrcpath} README.maildrop ${destroot}${prefix}/var/${name}/doc
111        }
112        if {[variant_isset onchange]} {
113                xinstall -m 644 -W ${worksrcpath} README.onchange ${destroot}${prefix}/var/${name}/doc
114        }
115        if {[variant_isset spamassassin]} {
116                xinstall -m 644 -W ${worksrcpath} README.spamassassin ${destroot}${prefix}/var/${name}/doc
117        }
118}
119
120post-activate {
121        if {[variant_isset roaming]} {
122                ui_msg "
123Because you used the roaming variant, you must set up the tcpserver file
124${prefix}/var/${name}/etc/tcp.smtp, please copy the sample file from
125${prefix}/var/${name}/etc/tcp.smtp.sample
126"
127        }
128        if {[variant_isset onchange]} {
129                ui_msg "
130Because you used the onchange variant, you must set up a script file at
131${prefix}/var/${name}/etc/onchange before you can use VPOPMAIL commands
132"
133        }
134        if {[variant_isset mysql5]} {
135                ui_msg "
136Because you used the MySQL5 variant, you must set up a file called
137${prefix}/var/${name}/etc/vpopmail.mysql so that it points to your database.
138A sample has been created for you at ${prefix}/var/${name}/etc/vpopmail.mysql.sample
139"
140        }
141        ui_msg "Please review the doc in ${prefix}/var/${name}/doc\n"
142}
143
144livecheck.distname      ${name}-stable
Note: See TracBrowser for help on using the repository browser.