On Jan 27, 2009, at 01:55, [email protected] wrote:
Revision: 46011
http://trac.macports.org/changeset/46011
Author: [email protected]
Date: 2009-01-26 23:55:26 -0800 (Mon, 26 Jan 2009)
Log Message:
-----------
mail/vpopmail:
New port, closes #14022
Added Paths:
-----------
trunk/dports/mail/vpopmail/
trunk/dports/mail/vpopmail/Portfile
trunk/dports/mail/vpopmail/files/
trunk/dports/mail/vpopmail/files/patch-configure.diff
Added: trunk/dports/mail/vpopmail/Portfile
===================================================================
--- trunk/dports/mail/vpopmail/Portfile
(rev 0)
+++ trunk/dports/mail/vpopmail/Portfile 2009-01-27 07:55:26 UTC
(rev 46011)
@@ -0,0 +1,143 @@
+# $Id$
+
+PortSystem 1.0
+
+name vpopmail
+version 5.4.25
+categories mail
+maintainers yahoo.com:compconsultant
+platforms darwin
+
+description Manage multiple virtual domains with Qmail
+
+long_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.
+
+variant onchange description {Enable use on the ONCHANGE script} {
+ configure.args-append --enable-onchange-script
+}
+
+variant mysql5 description {Store vpopmail users and more in
MySQL5} {
+ configure.args-append --enable-auth-module=mysql \
+ --enable-auth-logging \
+ --enable-sql-logging \
+ --enable-incdir=${prefix}/include/mysql5/mysql \
+ --enable-libdir=${prefix}/lib/mysql5/mysql \
+ --enable-valias
+ depends_lib-append port:mysql5
+}
To give the user the choice of using the mysql5 or mysql5-devel
ports, the dependency on mysql should be changed from "port:mysql5"
to e.g. "path:bin/mysql_config5:mysql5"
+variant roaming description {Enable POP before SMTP functionality} {
+ configure.args-append --enable-roaming-users \
+
--enable-tcpserver-file=${prefix}/var/${name}/etc/tcp.smtp
+}
+
+variant noclearpasswords description {Do not store a cleartext
version of the password} {
+ configure.args-append --disable-clear-passwd
+}
+
+variant learnpasswords description {If user password is not set,
learn it the first time they authenticate} {
+ configure.args-append --enable-learn-passwords
+}
+
+variant spamassassin description {Enable spamassassin integration} {
+ configure.args-append --enable=spamassassin \
+ --enable-spamc-prog=${prefix}/bin/spamc
+ depends_lib-append port:p5-mail-spamassassin
+}
+
+variant maildrop description {Enable maildrop integration} {
+ configure.args-append --enable-maildrop \
+ --enable-maildrop-prog=${prefix}/bin/maildrop
+ depends_lib-append port:maildrop
+}
+
+variant logverbose conflicts logpwds logall description {Enables
verbose logging of all attempts, with passwords} {
+ configure.args-append --enable-logging=v
+}
+
+variant logpwds conflicts logverbose logall description {Log
errors with passwords} {
+ configure.args-append --enable-logging=p
+}
+
+variant logall conflicts logpwds logverbose description {Log all
attempts, no passwords} {
+ configure.args-append --enable-logging=y
+}
There are a lot of variants here. Can this be reduced at all? For
example, could the user specify the logging options in a
configuration file instead?
+homepage http://www.inter7.com/index.php?page=vpopmail
+
+depends_lib port:qmail-spamcontrol \
+ port:ucspi-tcp
+
+master_sites sourceforge
+
+checksums md5 273c2c25906aed5206e97b01a2593aa6 \
+ sha1 ce62415fbd338b80f1962a477d94276f622756d0 \
+ rmd160 57142cca0617bd95ef2e5f4aa74ab5fa0844d6df
+
+patchfiles patch-configure.diff
+
+configure.args --enable-qmaildir=${prefix}/var/qmail \
+ --enable-tcprules-prog=${prefix}/bin/tcprules \
+ --enable-qmail-ext \
+ --prefix=/opt/local \
+ --exec-prefix=/opt/local
Please use the ${prefix} variable instead of assuming it's /opt/
local. Actually, "--prefix=${prefix}" is already in
configure.pre_args by default, so you should remove "--prefix=/opt/
local" from configure.args entirely. And --exec-prefix by default is
the value of --prefix, so you don't need the line "--exec-prefix=/opt/
local" either.
+build.target
+
+destroot.target install-strip
+destroot.keepdirs ${destroot}${prefix}/var/${name}/domains
+
+pre-configure {
+
+ # The vpopmail users and groups are required before compilation
+ addgroup vchkpw gid=2109
+ adduser vpopmail uid=7797 gid=[existsgroup vchkpw]
realname=vpopmail home=${prefix}/var/${name} shell=/usr/bin/true
+}
+
+post-destroot {
+ if {[variant_isset roaming]} {
+ system "echo \"127.:allow,RELAYCLIENT=''\" > ${destroot}$
{prefix}/var/${name}/etc/tcp.smtp.sample"
+ system "echo \"localhost|0|user|password|database\" >${destroot}$
{prefix}/var/${name}/etc/tcp.smtp.sample"
+ system "chown vpopmail:vchkpw ${destroot}${prefix}/var/${name}/
etc/tcp.smtp.sample"
+ xinstall -m 644 -W ${worksrcpath}
README.roamingusers ${destroot}${prefix}/var/${name}/doc
+ }
+ if {[variant_isset mysql5]} {
+ file rename ${destroot}/${prefix}/var/${name}/etc/vpopmail.mysql
${destroot}/${prefix}/var/${name}/etc/vpopmail.mysql.sample
You should not put a slash before the variable ${prefix} because the
variable ${prefix} already begins with a slash.
+ xinstall -m 644 -W ${worksrcpath} README.mysql $
{destroot}${prefix}/var/${name}/doc
+ }
+ if {[variant_isset maildrop]} {
+ xinstall -m 644 -W ${worksrcpath} README.maildrop $
{destroot}${prefix}/var/${name}/doc
+ }
+ if {[variant_isset onchange]} {
+ xinstall -m 644 -W ${worksrcpath} README.onchange $
{destroot}${prefix}/var/${name}/doc
+ }
+ if {[variant_isset spamassassin]} {
+ xinstall -m 644 -W ${worksrcpath}
README.spamassassin ${destroot}${prefix}/var/${name}/doc
+ }
+}
The usual place for documentation files would be ${prefix}/share/doc/$
{name} or ${prefix}/share/doc/${name}-${version}... or is vpopmail
already storing other documentation in ${prefix}/var/${name}/doc?
Would users of other vpopmail distributions expect it there?
I have the same concerns about the configuration files which, based
on the above, appear to live in ${prefix}/var/${name}/etc/ but a more
traditional place would be ${prefix}/etc or ${prefix}/etc/${name}.
_______________________________________________
macports-dev mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev