summaryrefslogtreecommitdiff
path: root/mail/qmail
diff options
context:
space:
mode:
authorschmonz <schmonz@pkgsrc.org>2004-08-22 00:10:51 +0000
committerschmonz <schmonz@pkgsrc.org>2004-08-22 00:10:51 +0000
commitd019ef4579d62a890bf26aac6af2cdc213d77b1a (patch)
tree03d2b248d3f63a702190365433367dba92b00c8a /mail/qmail
parentf17dd61b08d24db387118de103ff06496cbdd0b3 (diff)
downloadpkgsrc-d019ef4579d62a890bf26aac6af2cdc213d77b1a.tar.gz
Using bsd.options.mk, add several common build-time options. The
complete list: badrcptto bigdns darwin netqmail nullenvsender outgoingip qregex realrcptto smtpauth syncdir tls This obviates the need for a separate netqmail package. As a result, reintegrate Makefile.common into Makefile, and simplify a handful of definitions. If you used the netqmail package, set PKG_OPTIONS.qmail to "netqmail bigdns" to build with the same patches as before. Note that most of these options result in patches being applied, and that any given combination of patches may not apply cleanly. If there's a combination you need that doesn't work, or build options you need that aren't available, let me know. On Darwin, the "darwin" option is set by default, as it's needed in order to build. The patch includes <nameser8_compat.h>, which is present on Panther, but not on older systems. We provide a buildlink stand-in where needed. On Linux, the "netqmail" option is set by default, as with recent glibc it's necessary to #include <errno.h> in order to build. On other platforms, no options are set by default. Bump PKGREVISION.
Diffstat (limited to 'mail/qmail')
-rw-r--r--mail/qmail/MESSAGE4
-rw-r--r--mail/qmail/Makefile138
-rw-r--r--mail/qmail/Makefile.common130
-rw-r--r--mail/qmail/PLIST6
-rw-r--r--mail/qmail/PLIST.qregex2
-rw-r--r--mail/qmail/PLIST.tls2
-rw-r--r--mail/qmail/distinfo20
-rw-r--r--mail/qmail/files/README.pkgsrc4
-rw-r--r--mail/qmail/options.mk136
9 files changed, 291 insertions, 151 deletions
diff --git a/mail/qmail/MESSAGE b/mail/qmail/MESSAGE
index 79e01db7615..1fbcb22c0f1 100644
--- a/mail/qmail/MESSAGE
+++ b/mail/qmail/MESSAGE
@@ -1,9 +1,9 @@
===========================================================================
-$NetBSD: MESSAGE,v 1.10 2004/08/02 17:28:10 schmonz Exp $
+$NetBSD: MESSAGE,v 1.11 2004/08/22 00:10:51 schmonz Exp $
Please read ${DOCDIR}/README.pkgsrc.
-There are many ways to enable ${PKGBASE}. One popular, well-regarded
+There are many ways to enable qmail. One popular, well-regarded
choice is to follow the directions in Dave Sill's "Life with qmail":
<URL:http://www.lifewithqmail.org/lwq.html>
diff --git a/mail/qmail/Makefile b/mail/qmail/Makefile
index a6049bd2b6b..cd1a0932249 100644
--- a/mail/qmail/Makefile
+++ b/mail/qmail/Makefile
@@ -1,25 +1,133 @@
-# $NetBSD: Makefile,v 1.25 2004/08/02 03:57:17 schmonz Exp $
+# $NetBSD: Makefile,v 1.26 2004/08/22 00:10:51 schmonz Exp $
#
-PKGNAME= ${QMAIL_VERS}
-PKGREVISION= 8
-CATEGORIES= mail
+DISTNAME= netqmail-1.05
+PKGNAME= qmail-1.03
+PKGREVISION= 9
+CATEGORIES= mail
+MASTER_SITES= http://qmail.org/
-MAINTAINER= schmonz@NetBSD.org
-HOMEPAGE= http://cr.yp.to/qmail.html
-COMMENT= Secure, reliable, efficient, simple, and fast MTA
+MAINTAINER= schmonz@NetBSD.org
+HOMEPAGE= http://cr.yp.to/qmail.html
+COMMENT= Secure, reliable, efficient, simple, and fast MTA
-CONFLICTS+= netqmail-[0-9]*
+DEPENDS+= checkpassword-[0-9]*:../../sysutils/checkpassword
+DEPENDS+= daemontools-[0-9]*:../../sysutils/daemontools
+DEPENDS+= qmail-users>=1.0:../../mail/qmail-users
+DEPENDS+= ucspi-tcp-[0-9]*:../../net/ucspi-tcp
-USE_BUILDLINK3= yes
+CONFLICTS+= courier-maildirmake-[0-9]*
+CONFLICTS+= mirrordir-[0-9]*
+CONFLICTS+= mutt<=1.4.2.1nb1
+CONFLICTS+= netqmail-[0-9]*
+CONFLICTS+= pulsar<=0.1.1
-RESTRICTED= "modified source and binaries may not be distributed"
-NO_BIN_ON_CDROM=${RESTRICTED}
-NO_BIN_ON_FTP= ${RESTRICTED}
-NO_PACKAGE= "needs work to function properly as a binary package"
+.if defined(PKG_PHASE) && ${PKG_PHASE} == "extract"
+WRKSRC= ${WRKDIR}/${DISTNAME}
+.else
+WRKSRC= ${WRKDIR}/${DISTNAME}/${PKGNAME_NOREV}
+.endif
-APPLY_NETQMAIL= ${DO_NADA}
+PKG_INSTALLATION_TYPES= overwrite pkgviews
-.include "../../mail/qmail/Makefile.common"
+USE_BUILDLINK3= yes
+
+ALL_TARGET= it man
+INSTALL_TARGET= setup check
+
+RESTRICTED= "modified source and binaries may not be distributed"
+NO_BIN_ON_CDROM= ${RESTRICTED}
+NO_BIN_ON_FTP= ${RESTRICTED}
+NO_PACKAGE= "needs work to function properly as a binary package"
+
+USE_PKGINSTALL= yes
+DEINSTALL_EXTRA_TMPL+= ${PKGDIR}/DEINSTALL
+INSTALL_EXTRA_TMPL+= ${PKGDIR}/INSTALL
+MAKE_DIRS+= ${PKG_SYSCONFDIR} ${PKG_SYSCONFDIR}/alias ${EGDIR}/boot
+MAKE_DIRS+= ${PKG_SYSCONFDIR}/control ${DOCDIR}
+MAKE_DIRS+= ${PKG_SYSCONFDIR}/users
+OWN_DIRS+= ${QMAILDIR} ${QMAIL_QUEUE_DIR}
+PKG_SYSCONFSUBDIR= qmail
+
+DOCDIR= ${PREFIX}/share/doc/qmail
+EGDIR= ${PREFIX}/share/examples/qmail
+SHAREDIR= ${PREFIX}/share/qmail
+MESSAGE_SUBST+= DOCDIR=${DOCDIR} EGDIR=${EGDIR}
+FILES_SUBST+= DOCDIR=${DOCDIR} EGDIR=${EGDIR} SHAREDIR=${SHAREDIR}
+FILES_SUBST+= QMAILDIR=${QMAILDIR} QMAIL_QUEUE_DIR=${QMAIL_QUEUE_DIR}
+FILES_SUBST+= QMAIL_QUEUE_EXTRA=${QMAIL_QUEUE_EXTRA}
+FILES_SUBST+= PKGNAME=${PKGNAME}
+
+PLIST_SRC= ${PKGDIR}/PLIST
+
+SETUP_PROGRAMS= dnsfq dnsip dnsptr hostname install ipmeprint
+SETUP_SCRIPTS= config config-fast
+
+MANDIRS= man
+.for i in cat man
+. for j in 1 5 7 8
+MANDIRS+= man/${i}${j}
+. endfor
+.endfor
+INSTALLATION_DIRS= bin ${MANDIRS}
+INSTALLATION_DIRS+= share/doc/qmail share/examples/qmail share/qmail
+
+.include "../../mk/bsd.prefs.mk"
+
+.include "../../mail/qmail/options.mk"
+
+BUILD_DEFS+= QMAILDIR QMAIL_QUEUE_DIR QMAIL_QUEUE_EXTRA
+
+.if !empty(QMAIL_QUEUE_DIR:M${QMAILDIR}/*)
+PKG_FAIL_REASON+= "QMAIL_QUEUE_DIR must not be under ${QMAILDIR}"
+.endif
+
+.if !empty(QMAIL_QUEUE_EXTRA)
+QUEUE_EXTRA= "T${QMAIL_QUEUE_EXTRA}\\0"
+QUEUE_EXTRALEN!= ${EXPR} `${ECHO} ${QUEUE_EXTRA} | ${WC} -c` - 2
+SUBST_CLASSES+= logging
+SUBST_STAGE.logging= do-configure
+SUBST_FILES.logging= extra.h
+SUBST_SED.logging= -e 's|0|${QUEUE_EXTRALEN}|g'
+SUBST_SED.logging+= -e 's|""|${QUEUE_EXTRA}|g'
+SUBST_MESSAGE.logging= "Setting QUEUE_EXTRA."
+.endif
+
+post-extract:
+ ${_PKG_SILENT}${_PKG_DEBUG}extract_file=${PKGNAME_NOREV}.tar.gz;\
+ export extract_file; cd ${WRKSRC}; ${EXTRACT_CMD}
+
+do-configure:
+ ${ECHO} ${CC} ${CFLAGS} > ${WRKSRC}/conf-cc
+ ${ECHO} ${CC} ${_STRIPFLAG_CC} > ${WRKSRC}/conf-ld
+ ${ECHO} ${QMAILDIR} > ${WRKSRC}/conf-qmail
+
+post-build:
+ @${SED} ${FILES_SUBST_SED} ${FILESDIR}/README.pkgsrc \
+ > ${WRKDIR}/README.pkgsrc
+
+post-install:
+ # qmail's installer sets strange permissions; set them back
+. if (${PKG_INSTALLATION_TYPE} == "overwrite")
+. for i in bin boot
+ ${CHGRP} ${BINGRP} ${QMAILDIR}/${i}
+. endfor
+. for i in doc
+ ${CHGRP} ${SHAREGRP} ${QMAILDIR}/${i}
+. endfor
+. for i in ${MANDIRS}
+ ${CHGRP} ${MANGRP} ${QMAILDIR}/${i}
+. endfor
+. endif
+
+ ${INSTALL_DATA} ${WRKDIR}/README.pkgsrc ${DOCDIR}
+
+ ${INSTALL_PROGRAM_DIR} ${SHAREDIR}/setup
+ for i in ${SETUP_PROGRAMS}; do \
+ ${INSTALL_PROGRAM} ${WRKSRC}/$$i ${SHAREDIR}/setup; \
+ done
+ for i in ${SETUP_SCRIPTS}; do \
+ ${INSTALL_SCRIPT} ${WRKSRC}/$$i ${SHAREDIR}/setup; \
+ done
.include "../../mk/bsd.pkg.mk"
diff --git a/mail/qmail/Makefile.common b/mail/qmail/Makefile.common
deleted file mode 100644
index bb6cfb05cf9..00000000000
--- a/mail/qmail/Makefile.common
+++ /dev/null
@@ -1,130 +0,0 @@
-# $NetBSD: Makefile.common,v 1.5 2004/08/02 20:05:42 schmonz Exp $
-#
-
-QMAIL_VERS= qmail-1.03
-DISTNAME= netqmail-1.05
-MASTER_SITES= http://qmail.org/
-
-DEPENDS+= checkpassword-[0-9]*:../../sysutils/checkpassword
-DEPENDS+= daemontools-[0-9]*:../../sysutils/daemontools
-DEPENDS+= qmail-users>=1.0:../../mail/qmail-users
-DEPENDS+= ucspi-tcp-[0-9]*:../../net/ucspi-tcp
-
-CONFLICTS+= courier-maildirmake-[0-9]*
-CONFLICTS+= mirrordir-[0-9]*
-CONFLICTS+= mutt<=1.4.2.1nb1
-CONFLICTS+= pulsar<=0.1.1
-
-PKG_INSTALLATION_TYPES= overwrite pkgviews
-
-WRKSRC= ${WRKDIR}/${DISTNAME}/${PKGNAME_NOREV}
-
-.if defined(PKG_PHASE) && ${PKG_PHASE} == "extract"
-WRKSRC= ${WRKDIR}/${DISTNAME}
-.endif
-
-ALL_TARGET= it man
-INSTALL_TARGET= setup check
-
-FILESDIR= ${.CURDIR}/../../mail/qmail/files
-MESSAGE_SRC= ${.CURDIR}/../../mail/qmail/MESSAGE
-PLIST_SRC= ${.CURDIR}/../../mail/qmail/PLIST
-DISTINFO_FILE= ${.CURDIR}/../../mail/netqmail/distinfo
-
-USE_PKGINSTALL= yes
-DEINSTALL_EXTRA_TMPL+= ${.CURDIR}/../../mail/qmail/DEINSTALL
-INSTALL_EXTRA_TMPL+= ${.CURDIR}/../../mail/qmail/INSTALL
-MAKE_DIRS+= ${PKG_SYSCONFDIR} ${PKG_SYSCONFDIR}/alias ${EGDIR}/boot
-MAKE_DIRS+= ${PKG_SYSCONFDIR}/control ${DOCDIR}
-MAKE_DIRS+= ${PKG_SYSCONFDIR}/users
-OWN_DIRS+= ${QMAILDIR} ${QMAIL_QUEUE_DIR}
-PKG_SYSCONFSUBDIR= qmail
-
-DOCDIR= ${PREFIX}/share/doc/qmail
-EGDIR= ${PREFIX}/share/examples/qmail
-SHAREDIR= ${PREFIX}/share/qmail
-MESSAGE_SUBST+= DOCDIR=${DOCDIR} EGDIR=${EGDIR} PKGBASE=${PKGBASE}
-FILES_SUBST+= DOCDIR=${DOCDIR} EGDIR=${EGDIR} SHAREDIR=${SHAREDIR}
-FILES_SUBST+= QMAILDIR=${QMAILDIR} QMAIL_QUEUE_DIR=${QMAIL_QUEUE_DIR}
-FILES_SUBST+= QMAIL_QUEUE_EXTRA=${QMAIL_QUEUE_EXTRA}
-FILES_SUBST+= PKGNAME=${PKGNAME}
-PLIST_SUBST+= OSXSUFX=${OSXSUFX}
-
-SETUP_PROGRAMS= dnsfq dnsip dnsptr hostname install ipmeprint
-SETUP_SCRIPTS= config config-fast
-
-MANDIRS= man
-.for i in cat man
-. for j in 1 5 7 8
-MANDIRS+= man/${i}${j}
-. endfor
-.endfor
-INSTALLATION_DIRS= bin ${MANDIRS}
-INSTALLATION_DIRS+= share/doc/qmail share/examples/qmail share/qmail
-
-.include "../../mk/bsd.prefs.mk"
-
-.if ${OPSYS} == "Darwin"
-OSXSUFX= .doc
-PATCHFILES= panther.patch
-PATCH_SITES= http://http.netdevice.com:9080/qmail/patch/
-. if defined(PKG_PHASE) && ${PKG_PHASE} == "patch"
-PATCH_DIST_STRIP= -p1
-. endif
-.else
-OSXSUFX= # empty
-.endif
-
-BUILD_DEFS+= QMAILDIR QMAIL_QUEUE_DIR QMAIL_QUEUE_EXTRA
-
-.if !empty(QMAIL_QUEUE_DIR:M${QMAILDIR}/*)
-PKG_FAIL_REASON+= "QMAIL_QUEUE_DIR must not be under ${QMAILDIR}"
-.endif
-
-.if !empty(QMAIL_QUEUE_EXTRA)
-QUEUE_EXTRA= "T${QMAIL_QUEUE_EXTRA}\\0"
-QUEUE_EXTRALEN!= ${EXPR} `${ECHO} ${QUEUE_EXTRA} | ${WC} -c` - 2
-SUBST_CLASSES+= logging
-SUBST_STAGE.logging= do-configure
-SUBST_FILES.logging= extra.h
-SUBST_SED.logging= -e 's|0|${QUEUE_EXTRALEN}|g'
-SUBST_SED.logging+= -e 's|""|${QUEUE_EXTRA}|g'
-.endif
-
-post-extract:
- @extract_file=${QMAIL_VERS}.tar.gz; export extract_file; \
- cd ${WRKSRC}; ${EXTRACT_CMD}; cd ${QMAIL_VERS}; \
- ${APPLY_NETQMAIL}
-
-do-configure:
- ${ECHO} ${CC} ${CFLAGS} > ${WRKSRC}/conf-cc
- ${ECHO} ${CC} ${_STRIPFLAG_CC} > ${WRKSRC}/conf-ld
- ${ECHO} ${QMAILDIR} > ${WRKSRC}/conf-qmail
-
-post-build:
- @${SED} ${FILES_SUBST_SED} ${FILESDIR}/README.pkgsrc \
- > ${WRKDIR}/README.pkgsrc
-
-post-install:
- # qmail's installer sets strange permissions; set them back
-. if (${PKG_INSTALLATION_TYPE} == "overwrite")
-. for i in bin boot
- ${CHGRP} ${BINGRP} ${QMAILDIR}/${i}
-. endfor
-. for i in doc
- ${CHGRP} ${SHAREGRP} ${QMAILDIR}/${i}
-. endfor
-. for i in ${MANDIRS}
- ${CHGRP} ${MANGRP} ${QMAILDIR}/${i}
-. endfor
-. endif
-
- ${INSTALL_DATA} ${WRKDIR}/README.pkgsrc ${DOCDIR}
-
- ${INSTALL_PROGRAM_DIR} ${SHAREDIR}/setup
- for i in ${SETUP_PROGRAMS}; do \
- ${INSTALL_PROGRAM} ${WRKSRC}/$$i ${SHAREDIR}/setup; \
- done
- for i in ${SETUP_SCRIPTS}; do \
- ${INSTALL_SCRIPT} ${WRKSRC}/$$i ${SHAREDIR}/setup; \
- done
diff --git a/mail/qmail/PLIST b/mail/qmail/PLIST
index 63996f49baf..efec5fca05b 100644
--- a/mail/qmail/PLIST
+++ b/mail/qmail/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.9 2004/08/02 17:28:10 schmonz Exp $
+@comment $NetBSD: PLIST,v 1.10 2004/08/22 00:10:51 schmonz Exp $
bin/bouncesaying
bin/condredirect
bin/datemail
@@ -146,7 +146,7 @@ man/man8/qmail-tcpok.8
man/man8/qmail-tcpto.8
man/man8/splogger.8
share/doc/qmail/FAQ
-share/doc/qmail/INSTALL${OSXSUFX}
+share/doc/qmail/INSTALL${DARWINSUFX}
share/doc/qmail/INSTALL.alias
share/doc/qmail/INSTALL.ctl
share/doc/qmail/INSTALL.ids
@@ -165,7 +165,7 @@ share/doc/qmail/PIC.rem2local
share/doc/qmail/README.pkgsrc
share/doc/qmail/REMOVE.binmail
share/doc/qmail/REMOVE.sendmail
-share/doc/qmail/SENDMAIL${OSXSUFX}
+share/doc/qmail/SENDMAIL${DARWINSUFX}
share/doc/qmail/TEST.deliver
share/doc/qmail/TEST.receive
share/doc/qmail/UPGRADE
diff --git a/mail/qmail/PLIST.qregex b/mail/qmail/PLIST.qregex
new file mode 100644
index 00000000000..958d5934ccd
--- /dev/null
+++ b/mail/qmail/PLIST.qregex
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST.qregex,v 1.1 2004/08/22 00:10:52 schmonz Exp $
+share/doc/qmail/README.qregex
diff --git a/mail/qmail/PLIST.tls b/mail/qmail/PLIST.tls
new file mode 100644
index 00000000000..9568b48162a
--- /dev/null
+++ b/mail/qmail/PLIST.tls
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST.tls,v 1.1 2004/08/22 00:10:52 schmonz Exp $
+bin/update_tmprsadh
diff --git a/mail/qmail/distinfo b/mail/qmail/distinfo
new file mode 100644
index 00000000000..8b5033805b6
--- /dev/null
+++ b/mail/qmail/distinfo
@@ -0,0 +1,20 @@
+$NetBSD: distinfo,v 1.8 2004/08/22 00:10:52 schmonz Exp $
+
+SHA1 (netqmail-1.05.tar.gz) = fe4cbe97bd2f18a5ca1b36e4fbbd6c524256a829
+Size (netqmail-1.05.tar.gz) = 252264 bytes
+SHA1 (badrcptto.patch) = 713875ab08239416b6d22ba0d846b14a6aa6912f
+Size (badrcptto.patch) = 3033 bytes
+SHA1 (qmail-103.patch) = dfb9cdabe91449dad2117115177b0a6a356baa9f
+Size (qmail-103.patch) = 2104 bytes
+SHA1 (nullenvsender-recipcount.patch) = 4f9d79846db6902f050ae3bd5f39b559a46c24e5
+Size (nullenvsender-recipcount.patch) = 2141 bytes
+SHA1 (outgoingip.patch) = c37b50facc72f82cad6505d2db88d5eccc5418b2
+Size (outgoingip.patch) = 6839 bytes
+SHA1 (panther.patch) = 952b919786d808a605343d078696e1af7cbd2577
+Size (panther.patch) = 2392 bytes
+SHA1 (qregex-20040725.patch) = e8eb108720b8eae0e50afc4f735923057001103d
+Size (qregex-20040725.patch) = 25360 bytes
+SHA1 (qmail-1.03-realrcptto-2004.08.20.patch) = 1406bddae6eb59c50324c15907ef31780bf77021
+Size (qmail-1.03-realrcptto-2004.08.20.patch) = 16663 bytes
+SHA1 (netqmail-1.05-tls-smtpauth-20040705.patch) = 3d26efd3601bc6a88be2685dcaed51fc553a59d3
+Size (netqmail-1.05-tls-smtpauth-20040705.patch) = 57631 bytes
diff --git a/mail/qmail/files/README.pkgsrc b/mail/qmail/files/README.pkgsrc
index 1b7842e88a6..3ce09fa3df8 100644
--- a/mail/qmail/files/README.pkgsrc
+++ b/mail/qmail/files/README.pkgsrc
@@ -16,7 +16,9 @@ package necessarily deviates from LWQ in at least this respect.
Therefore, if you need to ask for help on the qmail list, please
mention:
-* that you installed @PKGNAME@ from pkgsrc, and
+* that you installed @PKGNAME@ from pkgsrc,
+* the output of "@PKG_INFO@ -B @PKGNAME@ | @GREP@ ^QMAIL",
+* the output of "@PKG_INFO@ -Q PKG_OPTIONS @PKGNAME@", and
* how you're running (or trying to run) the qmail daemons.
If you can first reproduce your problem on a manual LWQ-style
diff --git a/mail/qmail/options.mk b/mail/qmail/options.mk
new file mode 100644
index 00000000000..c5674a1bc22
--- /dev/null
+++ b/mail/qmail/options.mk
@@ -0,0 +1,136 @@
+.if ${OPSYS} == "Darwin"
+PKG_OPTIONS.qmail+= darwin
+.endif
+
+.if ${OPSYS} == "Linux"
+PKG_OPTIONS.qmail+= netqmail # for the errno patches
+.endif
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.qmail
+PKG_SUPPORTED_OPTIONS= badrcptto bigdns darwin nullenvsender netqmail
+PKG_SUPPORTED_OPTIONS+= outgoingip qregex realrcptto smtpauth syncdir tls
+.include "../../mk/bsd.options.mk"
+
+###
+### reject messages with bad envelope recipients
+###
+.if !empty(PKG_OPTIONS:Mbadrcptto)
+BADRCPTTO_PATCH= badrcptto.patch
+PATCHFILES+= ${BADRCPTTO_PATCH}
+SITES_${BADRCPTTO_PATCH}= http://patch.be/qmail/
+PATCH_DIST_STRIP.${BADRCPTTO_PATCH}= -p2
+.endif
+
+###
+### handle oversized responses to MX queries
+###
+.if !empty(PKG_OPTIONS:Mbigdns)
+BIGDNS_PATCH= qmail-103.patch
+PATCHFILES+= ${BIGDNS_PATCH}
+SITES_${BIGDNS_PATCH}= http://www.ckdhr.com/ckd/
+PATCH_DIST_STRIP.${BIGDNS_PATCH}= -p1
+.endif
+
+###
+### build and run on Mac OS X
+###
+.if !empty(PKG_OPTIONS:Mdarwin)
+DARWIN_PATCH= panther.patch
+PATCHFILES+= ${DARWIN_PATCH}
+SITES_${DARWIN_PATCH}= http://http.netdevice.com:9080/qmail/patch/
+PATCH_DIST_STRIP.${DARWIN_PATCH}= -p1
+post-buildlink:
+ ${_PKG_SILENT}${_PKG_DEBUG} \
+ nameser8_compat_h="include/nameser8_compat.h"; \
+ if [ ! -e /usr/$${nameser8_compat_h} ]; then \
+ ${TOUCH} ${BUILDLINK_DIR}/$${nameser8_compat_h}; \
+ fi
+DARWINSUFX= .doc
+.else
+DARWINSUFX= # empty
+.endif
+PLIST_SUBST+= DARWINSUFX=${DARWINSUFX}
+
+###
+### "netqmail" patch collection
+###
+.if !empty(PKG_OPTIONS:Mnetqmail)
+NETQMAIL_PATCH= netqmail-1.05.tar.gz
+PATCHFILES+= ${NETQMAIL_PATCH}
+PATCH_DIST_CAT.${NETQMAIL_PATCH}= ${CAT} ${WRKSRC}/../${DISTNAME}.patch
+PATCH_DIST_STRIP.${NETQMAIL_PATCH}= -p1
+.endif
+
+###
+### reject messages from the null envelope sender to >1 envelope recipient
+###
+.if !empty(PKG_OPTIONS:Mnullenvsender)
+NULLENVSENDER_PATCH= nullenvsender-recipcount.patch
+PATCHFILES+= ${NULLENVSENDER_PATCH}
+SITES_${NULLENVSENDER_PATCH}= http://www.qcc.ca/~charlesc/software/misc/
+PATCH_DIST_STRIP.${NULLENVSENDER_PATCH}= -p1
+.endif
+
+###
+### force outgoing connections to originate from a particular IP
+###
+.if !empty(PKG_OPTIONS:Moutgoingip)
+OUTGOINGIP_PATCH= outgoingip.patch
+PATCHFILES+= ${OUTGOINGIP_PATCH}
+SITES_${OUTGOINGIP_PATCH}= http://www.qmail.org/
+.endif
+
+###
+### reject messages matching regular expressions
+###
+.if !empty(PKG_OPTIONS:Mqregex)
+QREGEX_PATCH= qregex-20040725.patch
+PATCHFILES+= ${QREGEX_PATCH}
+SITES_${REGEX_PATCH}= http://www.arda.homeunix.net/store/qmail/
+PATCH_DIST_STRIP.${QREGEX_PATCH}= -p3
+PLIST_SRC+= ${PKGDIR}/PLIST.qregex
+.endif
+
+###
+### reject messages that would bounce due to missing .qmail files
+###
+.if !empty(PKG_OPTIONS:Mrealrcptto)
+REALRCPTTO_PATCH= qmail-1.03-realrcptto-2004.08.20.patch
+PATCHFILES+= ${REALRCPTTO_PATCH}
+SITES_${REALRCPTTO_PATCH}= http://multivac.cwru.edu/qmail/
+PATCH_DIST_STRIP.${REALRCPTTO_PATCH}= -p1
+.endif
+
+###
+### enable STARTTLS and/or SMTP authentication
+###
+.if !empty(PKG_OPTIONS:Msmtpauth) || !empty(PKG_OPTIONS:Mtls)
+. if empty(PKG_OPTIONS:Msmtpauth)
+PKG_OPTIONS+= smtpauth
+. endif
+. include "../../security/openssl/buildlink3.mk"
+TLSSMTPAUTH_PATCH= netqmail-1.05-tls-smtpauth-20040705.patch
+PATCHFILES+= ${TLSSMTPAUTH_PATCH}
+SITES_${TLSSMTPAUTH_PATCH}= http://shupp.org/patches/
+. if !empty(PKG_OPTIONS:Mtls)
+CFLAGS+= -DTLS=20040419 # from the patch
+INSTALL_TARGET+= cert tmprsadh
+USE_GNU_TOOLS+= make
+PLIST_SRC+= ${PKGDIR}/PLIST.tls
+. endif
+.endif
+
+###
+### force synchronous link() syscall
+###
+.if !empty(PKG_OPTIONS:Msyncdir)
+. include "../../devel/syncdir/buildlink3.mk"
+SUBST_CLASSES+= load
+SUBST_STAGE.load= do-configure
+SUBST_FILES.load= make-load.sh
+SUBST_SED.load= -e '$$s|$$| -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.syncdir}/lib -L${BUILDLINK_PREFIX.syncdir}/lib \-lsyncdir|'
+. if ${OPSYS} == "Darwin"
+SUBST_SED.load+= -e '$$s|$$| -bind_at_load|'
+. endif
+SUBST_MESSAGE.load= "Setting linker flags for syncdir."
+.endif