ports/169477: [PATCH] mail/qmailadmin - Take maintainership, add Options support
Bryan Drewery
bryan at shatow.net
Wed Jun 27 05:50:13 UTC 2012
>Number: 169477
>Category: ports
>Synopsis: [PATCH] mail/qmailadmin - Take maintainership, add Options support
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Wed Jun 27 05:50:12 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Bryan Drewery
>Release: FreeBSD 8.3-RELEASE i386
>Organization:
>Environment:
>Description:
- Take maintainership
- Add OPTIONS support (only supported KNOBS before)
- Add support for disabling http caching via NOCACHE option
- Cleanup some portlint warnings
>How-To-Repeat:
>Fix:
--- patch-qmailadmin.txt begins here ---
diff --git Makefile Makefile
index b4840b5..2c82b6b 100644
--- Makefile
+++ Makefile
@@ -11,16 +11,11 @@ PORTEPOCH= 2
CATEGORIES= mail www
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}-stable/${PORTVERSION}
-MAINTAINER= ports at FreeBSD.org
+MAINTAINER= bryan at shatow.net
COMMENT= CGI program for administering Qmail with vchkpw/vpopmail
-# vpopmail installation directory
-#
-# NB: change this with extreme caution! For instance, if vpopmail is not
-# already installed in this directory, building the vpopmail port as
-# a dependency will NOT automatically cause it to be installed there!
-
-VPOPMAIL_DIR?= ${LOCALBASE}/vpopmail
+LICENSE= GPLv2 GPLv3
+LICENSE_COMB= dual
BUILD_DEPENDS= \
autorespond:${PORTSDIR}/mail/autorespond \
@@ -29,7 +24,9 @@ RUN_DEPENDS= \
autorespond:${PORTSDIR}/mail/autorespond \
${VPOPMAIL_DIR}/lib/libvpopmail.a:${PORTSDIR}/mail/vpopmail
-.if defined(WITHOUT_IDX)
+.include <bsd.port.options.mk>
+
+.if empty(PORT_OPTIONS:MIDX)
BUILD_DEPENDS+= ezmlm-send:${PORTSDIR}/mail/ezmlm
RUN_DEPENDS+= ezmlm-send:${PORTSDIR}/mail/ezmlm
.else
@@ -37,11 +34,16 @@ BUILD_DEPENDS+= ezmlm-idx:${PORTSDIR}/mail/ezmlm-idx
RUN_DEPENDS+= ezmlm-idx:${PORTSDIR}/mail/ezmlm-idx
.endif
-LICENSE= GPLv2 GPLv3
-LICENSE_COMB= dual
-
CONFLICTS= qmailadmin-devel-1.*
+# vpopmail installation directory
+#
+# NB: change this with extreme caution! For instance, if vpopmail is not
+# already installed in this directory, building the vpopmail port as
+# a dependency will NOT automatically cause it to be installed there!
+
+VPOPMAIL_DIR?= ${LOCALBASE}/vpopmail
+
GNU_CONFIGURE= YES
USE_GMAKE= YES
WANT_QMAIL= yes
@@ -49,33 +51,50 @@ WANT_QMAIL= yes
#
# User-configurable variables
#
-# CGIBINDIR - location of your cgi directory
-# CGIBINSUBDIR - subdirectory to place cgi scripts in
-# CGIBINURL - location of your cgi directory in a URL
-# WEBDATADIR - location of your html files
-# WEBDATASUBDIR - subdirectory to place html files in
-# WEBDATAURL - location of your html files in a URL
+# SPAM_COMMAND - the command to use to check for spam;
+# default is "|preline LOCALBASE/bin/maildrop /etc/mailfilter"
+# do not forget the "|" at the start
#
-# WITHOUT_IPAUTH - disable the IP address check after login
-# WITHOUT_USER_INDEX - disable the user index display, which might
+# IPAUTH - the IP address check after login
+# USER_INDEX - the user index display, which might
# confuse earlier versions of Internet Explorer
-# WITH_MODIFY_QUOTA - enable domain admin to modify user quotas
-# WITH_DOMAIN_AUTOFILL - autofill the domain on login page based on the
+# MODIFY_QUOTA - enable domain admin to modify user quotas
+# DOMAIN_AUTOFILL - autofill the domain on login page based on the
# hostname
-# WITHOUT_IDX_SQL - disable the SQL support for mailing lists
-# WITH_HELP - display help links on login page
+# IDX_SQL - the SQL support for mailing lists
+# HELP - display help links on login page
#
-# WITH_SPAM_DETECTION - allow users to enable/disable spam checking
-# SPAM_COMMAND - the command to use to check for spam;
-# default is "|preline /usr/local/bin/maildrop /etc/mailfilter"
-# do not forget the "|" at the start
-# WITH_SPAM_NEEDS_EMAIL - append the user's e-mail address as the last
+# SPAM_DETECTION - allow users to enable/disable spam checking
+# SPAM_NEEDS_EMAIL - append the user's e-mail address as the last
# argument to the spam command
-# WITHOUT_CATCHALL - disable the catch-all mailbox commands
-# WITHOUT_TRIVIAL_PASSWORD - disable the check for a password containing
+# CATCHALL - the catch-all mailbox commands
+# TRIVIAL_PASSWORD - the check for a password containing
# the username
#
+OPTIONS_DEFINE= IPAUTH USER_INDEX MODIFY_QUOTA DOMAIN_AUTOFILL \
+ IDX IDX_SQL HELP SPAM_DETECTION SPAM_NEEDS_EMAIL \
+ CATCHALL TRIVIAL_PASSWORD NOCACHE
+OPTIONS_DEFAULT=IPAUTH IDX_SQL USER_INDEX CATCHALL TRIVIAL_PASSWORD
+IPAUTH_DESC= Check IP address after login
+USER_INDEX_DESC= Enable user index display
+MODIFY_QUOTA_DESC= Allow domain admin to modify quotas
+DOMAIN_AUTOFILL_DESC= Autofill domain on login using hostname
+IDX_DESC= Use ezmlm-idx instead of ezmlm
+IDX_SQL_DESC= Enable MySQL support for ezmlm
+HELP_DESC= Show help links on login page
+SPAM_DETECTION_DESC= Allow users to toggle spam checking
+SPAM_NEEDS_EMAIL_DESC= Append user's email to spam command
+CATCHALL_DESC= Enable catch-all accounts
+TRIVIAL_PASSWORD_DESC= Disallow password containing username
+NOCACHE_DESC= Prohibit caching via http headers
+
+# CGIBINDIR - location of your cgi directory
+# CGIBINSUBDIR - subdirectory to place cgi scripts in
+# CGIBINURL - location of your cgi directory in a URL
+# WEBDATADIR - location of your html files
+# WEBDATASUBDIR - subdirectory to place html files in
+# WEBDATAURL - location of your html files in a URL
CGIBINDIR?= www/cgi-bin.default
CGIBINSUBDIR?= qmailadmin
CGIBINURL?= /cgi-bin
@@ -86,8 +105,6 @@ WEBDATAURL?=
PLIST_SUB+= CGIBINDIR="${CGIBINDIR}" CGIBINSUBDIR="${CGIBINSUBDIR}" \
WEBDATADIR="${WEBDATADIR}" WEBDATASUBDIR="${WEBDATASUBDIR}"
-.include <bsd.port.pre.mk>
-
# End of user-configurable variables
CONFIGURE_ARGS+= \
@@ -102,48 +119,52 @@ CONFIGURE_ARGS+= \
--enable-autoresponder-path=${LOCALBASE}/bin \
--enable-ezmlmdir=${LOCALBASE}/bin
-.if defined(WITHOUT_IPAUTH)
+.if empty(PORT_OPTIONS:MIPAUTH)
CONFIGURE_ARGS+= --disable-ipauth
.endif
-.if defined(WITHOUT_USER_INDEX)
+.if empty(PORT_OPTIONS:MUSER_INDEX)
CONFIGURE_ARGS+= --disable-user-index
.endif
-.if defined(WITH_MODIFY_QUOTA)
+.if ${PORT_OPTIONS:MMODIFY_QUOTA}
CONFIGURE_ARGS+= --enable-modify-quota
.endif
-.if defined(WITH_DOMAIN_AUTOFILL)
+.if ${PORT_OPTIONS:MDOMAIN_AUTOFILL}
CONFIGURE_ARGS+= --enable-domain-autofill
.endif
-.if defined(WITHOUT_IDX_SQL)
+.if empty(PORT_OPTIONS:MIDX_SQL)
CONFIGURE_ARGS+= --disable-ezmlm-mysql
.endif
-.if defined(WITH_HELP)
+.if ${PORT_OPTIONS:MHELP}
CONFIGURE_ARGS+= --enable-help
.endif
-.if defined(WITH_SPAM_DETECTION)
+.if ${PORT_OPTIONS:MSPAM_DETECTION}
CONFIGURE_ARGS+= --enable-modify-spam=y
.if defined(SPAM_COMMAND)
CONFIGURE_ARGS+= --enable-spam-command="${SPAM_COMMAND}"
.endif
-.if defined(WITH_SPAM_NEEDS_EMAIL)
+.if ${PORT_OPTIONS:MSPAM_NEEDS_EMAIL}
CONFIGURE_ARGS+= --enable-spamcmd-needs-email
.else
CONFIGURE_ARGS+= --disable-spamcmd-needs-email
.endif
.endif
-.if defined(WITHOUT_CATCHALL)
+.if empty(PORT_OPTIONS:MCATCHALL)
CONFIGURE_ARGS+= --disable-catchall
.endif
-.if defined(WITHOUT_TRIVIAL_PASSWORD)
+.if empty(PORT_OPTIONS:MTRIVIAL_PASSWORD)
CONFIGURE_ARGS+= --disable-trivial-password
.endif
-.include <bsd.port.post.mk>
+.if ${PORT_OPTIONS:MNOCACHE}
+CONFIGURE_ARGS+= --enable-no-cache
+.endif
+
+.include <bsd.port.mk>
--- patch-qmailadmin.txt ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list