svn commit: r312845 - in head/mail: qmail qmail-mysql qmail-spamcontrol qmail-tls qmail/files
Bryan Drewery
bdrewery at FreeBSD.org
Sat Feb 23 18:49:31 UTC 2013
Author: bdrewery
Date: Sat Feb 23 18:49:29 2013
New Revision: 312845
URL: http://svnweb.freebsd.org/changeset/ports/312845
Log:
- Cleanup example rc file
- Support SHUTDOWN
- Check for needed files/dependencies in precmd
- Respect LOCALBASE
- Make rclint happy
- Rename symlink from qmail.sh to qmailsmtpd
- Rename installed example rc file from qmail-smtpd.rcNG to qmailsmtpd
Added:
head/mail/qmail/files/qmailsmtpd.in
- copied, changed from r311723, head/mail/qmail/files/qmail-smtpd.rcNG
Deleted:
head/mail/qmail/files/qmail-smtpd.rcNG
Modified:
head/mail/qmail-mysql/Makefile
head/mail/qmail-spamcontrol/Makefile
head/mail/qmail-tls/Makefile
head/mail/qmail/Makefile
head/mail/qmail/files/pkg-install.in
head/mail/qmail/pkg-plist
Modified: head/mail/qmail-mysql/Makefile
==============================================================================
--- head/mail/qmail-mysql/Makefile Sat Feb 23 17:20:37 2013 (r312844)
+++ head/mail/qmail-mysql/Makefile Sat Feb 23 18:49:29 2013 (r312845)
@@ -3,7 +3,7 @@
PORTNAME= qmail
PORTVERSION= ${QMAIL_VERSION}.${MYSQL_PATCH_VERSION}
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= mail
PKGNAMESUFFIX= -mysql
Modified: head/mail/qmail-spamcontrol/Makefile
==============================================================================
--- head/mail/qmail-spamcontrol/Makefile Sat Feb 23 17:20:37 2013 (r312844)
+++ head/mail/qmail-spamcontrol/Makefile Sat Feb 23 18:49:29 2013 (r312845)
@@ -2,7 +2,7 @@
PORTNAME= qmail
PORTVERSION= ${QMAIL_VERSION}.${SPAMCONTROL_VERSION}
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= mail
MASTER_SITES+= http://www.fehcom.de/qmail/spamcontrol/:spamcontrol \
${MASTER_SITE_LOCAL:S/$/:spamcontrol/}
Modified: head/mail/qmail-tls/Makefile
==============================================================================
--- head/mail/qmail-tls/Makefile Sat Feb 23 17:20:37 2013 (r312844)
+++ head/mail/qmail-tls/Makefile Sat Feb 23 18:49:29 2013 (r312845)
@@ -3,7 +3,7 @@
PORTNAME= qmail
PORTVERSION= ${QMAIL_VERSION}.${TLS_PATCH_DATE}
-PORTREVISION= 5
+PORTREVISION= 6
CATEGORIES= mail
PKGNAMESUFFIX= -tls
Modified: head/mail/qmail/Makefile
==============================================================================
--- head/mail/qmail/Makefile Sat Feb 23 17:20:37 2013 (r312844)
+++ head/mail/qmail/Makefile Sat Feb 23 18:49:29 2013 (r312845)
@@ -3,7 +3,7 @@
PORTNAME= qmail
PORTVERSION?= ${QMAIL_VERSION}
-PORTREVISION?= 7
+PORTREVISION?= 8
CATEGORIES= mail
MASTER_SITES+= ${MASTER_SITE_QMAIL}
DISTNAME= ${PORTNAME}-${QMAIL_VERSION}
@@ -60,7 +60,7 @@ QMAILQUEUE_PATCH_DESC= Run a QMAILQUEUE
QMQP_COMPRESS_DESC= QMQP on the fly compression
QMTPC_PATCH_DESC= Send email using qmtp protocol
QUOTATRASH_DESC= Include the Trash in the quota
-RCDLINK_DESC= Create rc.d/qmail.sh symlink
+RCDLINK_DESC= Create rc.d/qmail symlink
SENDERCHECK4_DESC= LOOSE checks exclusively for RELAY clients
SMTPAUTHUSER_DESC= Create env SMTPAUTHUSER containing authuser
SMTPEXECCHECK_DESC= Smtp DOS/Windows executable detection
@@ -289,6 +289,10 @@ PKGMESSAGE?= ${WRKDIR}/pkg-message-${PKG
SUB_FILES+= pkg-message
.endif
+.if !defined(SLAVE_LDAP)
+SUB_FILES+= qmailsmtpd
+.endif
+
WRKDIR_doc= ${WRKDIR}/doc
PORTDOCS= *
@@ -813,7 +817,7 @@ do-install:
${INSTALL_SCRIPT} ${WRKDIR}/${i:T} ${PREFIX}/boot
.endfor
.if !defined(SLAVE_LDAP)
- ${INSTALL_SCRIPT} ${FILESDIR}/qmail-smtpd.rcNG ${PREFIX}/boot
+ ${INSTALL_SCRIPT} ${WRKDIR}/qmailsmtpd ${PREFIX}/boot
.endif
.for i in 1 5 7 8
@${MKDIR} ${PREFIX}/man/man$i
Modified: head/mail/qmail/files/pkg-install.in
==============================================================================
--- head/mail/qmail/files/pkg-install.in Sat Feb 23 17:20:37 2013 (r312844)
+++ head/mail/qmail/files/pkg-install.in Sat Feb 23 18:49:29 2013 (r312845)
@@ -12,10 +12,10 @@ if [ "$2" = "POST-INSTALL" ]; then
[ -e ${PREFIX}/control/me ] || (cd ${PREFIX}/configure && ./config)
- %%RCDLINK%%ln -s ${PREFIX}/rc %%LOCALBASE%%/etc/rc.d/qmail.sh
+ %%RCDLINK%%ln -s ${PREFIX}/rc %%LOCALBASE%%/etc/rc.d/qmailsmtpd
%%RCDLINK%%echo ""
- %%RCDLINK%%echo "A %%LOCALBASE%%/etc/rc.d/qmail.sh symlink was created. To enable qmail at boot"
+ %%RCDLINK%%echo "A %%LOCALBASE%%/etc/rc.d/qmailsmtpd symlink was created. To enable qmail at boot"
%%RCDLINK%%echo "time you need to copy a script to %%PREFIX%%/rc. There are some examples at"
%%RCDLINK%%echo "%%PREFIX%%/boot"
%%RCDLINK%%echo ""
Copied and modified: head/mail/qmail/files/qmailsmtpd.in (from r311723, head/mail/qmail/files/qmail-smtpd.rcNG)
==============================================================================
--- head/mail/qmail/files/qmail-smtpd.rcNG Tue Feb 5 16:40:35 2013 (r311723, copy source)
+++ head/mail/qmail/files/qmailsmtpd.in Sat Feb 23 18:49:29 2013 (r312845)
@@ -4,6 +4,7 @@
#
# PROVIDE: qmailsmtpd
# REQUIRE: LOGIN cleanvar
+# KEYWORD: shutdown
#
# To use the checkpassword interface to qmail-smtpd, set
# qmailsmtpd_checkpassword to the full path to the checkpassword program (e.g.
@@ -15,41 +16,53 @@
. /etc/rc.subr
-name="qmailsmtpd"
+name=qmailsmtpd
rcvar=qmailsmtpd_enable
+
load_rc_config $name
-: ${qmailsmtpd_tcpserver="/usr/local/bin/tcpserver"}
-: ${qmailsmtpd_tcprules="/usr/local/bin/tcprules"}
-: ${qmailsmtpd_enable="NO"}
-: ${qmailsmtpd_cdb="/etc/tcp.smtp"}
+: ${qmailsmtpd_tcpserver:=%%LOCALBASE%%/bin/tcpserver}
+: ${qmailsmtpd_tcprules:=%%LOCALBASE%%/bin/tcprules}
+: ${qmailsmtpd_pidfile:=/var/run/qmailsmtpd.pid}
+: ${qmailsmtpd_enable:=NO}
+: ${qmailsmtpd_cdb:=/etc/tcp.smtp}
: ${qmailsmtpd_flags="-R -H -u 82 -g 81"}
-: ${qmailsmtpd_host="0"}
-: ${qmailsmtpd_port="smtp"}
-: ${qmailsmtpd_smtpd="/var/qmail/bin/qmail-smtpd"}
-: ${qmailsmtpd_fqdn=`hostname`}
-: ${qmailsmtpd_checksubprogram="/usr/bin/true"}
-
-qmailsmtpd_start() {
- $qmailsmtpd_tcprules $qmailsmtpd_cdb.cdb $qmailsmtpd_cdb.tmp < $qmailsmtpd_cdb \
- || return 1
-
- if [ "x$qmailsmtpd_checkpassword" != "x" ]; then
+: ${qmailsmtpd_host:=0}
+: ${qmailsmtpd_port:=smtp}
+: ${qmailsmtpd_smtpd:=%%PREFIX%%/bin/qmail-smtpd}
+: ${qmailsmtpd_fqdn:=`hostname`}
+: ${qmailsmtpd_checksubprogram:=/usr/bin/true}
+
+start_cmd=qmailsmtpd_start
+start_precmd=qmailsmtpd_precmd
+pidfile=${qmailsmtpd_pidfile}
+procname=${qmailsmtpd_tcprules}
+
+qmailsmtpd_start()
+{
+ if [ -n "$qmailsmtpd_checkpassword" ]; then
qmailsmtpd_usercheck="$qmailsmtpd_fqdn $qmailsmtpd_checkpassword $qmailsmtpd_checksubprogram"
fi
- echo "Starting qmail-smtpd."
+ echo "Starting qmailsmtpd."
$qmailsmtpd_tcpserver -x $qmailsmtpd_cdb.cdb $qmailsmtpd_flags $qmailsmtpd_host $qmailsmtpd_port \
- $qmailsmtpd_smtpd $qmailsmtpd_usercheck &
- echo $! > /var/run/qmailsmtpd.pid
+ $qmailsmtpd_smtpd $qmailsmtpd_usercheck &
+ echo $! > $pidfile
}
-qmailsmtpd_stop() {
- echo "Stopping qmail-smtpd"
- kill `cat /var/run/qmailsmtpd.pid`
+qmailsmtpd_precmd()
+{
+ if ! [ -e "${qmailsmtpd_tcpserver}" ]; then
+ echo "sysutils/ucspi-tcp is required" >&2
+ return 1
+ fi
+ if ! [ -e "${qmailsmtpd_cdb}" ]; then
+ echo "TCP rules file '${qmailsmtpd_cdb}' is missing." >&2
+ return 1
+ fi
+ $qmailsmtpd_tcprules $qmailsmtpd_cdb.cdb $qmailsmtpd_cdb.tmp < $qmailsmtpd_cdb \
+ || return 1
}
-start_cmd="qmailsmtpd_start"
-stop_cmd="qmailsmtpd_stop"
run_rc_command "$1"
Modified: head/mail/qmail/pkg-plist
==============================================================================
--- head/mail/qmail/pkg-plist Sat Feb 23 17:20:37 2013 (r312844)
+++ head/mail/qmail/pkg-plist Sat Feb 23 18:49:29 2013 (r312845)
@@ -1,5 +1,5 @@
@comment $FreeBSD$
-%%RCDLINK%%@unexec rm -f %%LOCALBASE%%/etc/rc.d/qmail.sh
+%%RCDLINK%%@unexec rm -f %%LOCALBASE%%/etc/rc.d/qmailsmtpd
%%LDAP%%bin/auth_imap
%%LDAP%%bin/auth_pop
%%LDAP%%bin/auth_smtp
@@ -78,7 +78,7 @@ bin/tcp-env
%%NOT_LDAP%%boot/maildir
%%NOT_LDAP%%boot/proc
%%NOT_LDAP%%boot/proc+df
-%%NOT_LDAP%%boot/qmail-smtpd.rcNG
+%%NOT_LDAP%%boot/qmailsmtpd
%%LDAP%%boot/qmail/log/run
%%LDAP%%boot/qmail/run
%%LDAP%%boot/qmail-smtpd/log/run
More information about the svn-ports-head
mailing list