summaryrefslogtreecommitdiff
path: root/mail/qmail/options.mk
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
commit63bf0e3cd6f4272ee45ddac8a20213d56680293a (patch)
tree03d2b248d3f63a702190365433367dba92b00c8a /mail/qmail/options.mk
parentfcd65c8b83a38cdbbf992a51cbb0b949a382ccba (diff)
downloadpkgsrc-63bf0e3cd6f4272ee45ddac8a20213d56680293a.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/options.mk')
-rw-r--r--mail/qmail/options.mk136
1 files changed, 136 insertions, 0 deletions
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