source: trunk/dports/mail/vpopmail/Portfile

Last change on this file was 94983, checked in by mww@…, 5 years ago

vpopmail: add license

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