freebsd-ports/mail/qmail-smtp_auth/Makefile

105 lines
3 KiB
Makefile
Raw Normal View History

# New ports collection makefile for: qmail-tls
# Date created: 03 Dec 2000
# Whom: Mario S F Ferreira <lioux@linf.unb.br> et al.
#
# $FreeBSD$
#
PORTNAME= qmail
PORTVERSION= ${QMAIL_VERSION}.${TLS_PATCH_DATE}
CATEGORIES= mail
PKGNAMESUFFIX= -tls
PATCH_SITES+= http://www.esat.kuleuven.ac.be/~vermeule/qmail/:tls
PATCHFILES+= tls.patch:tls
PATCH_DIST_STRIP+= -p1
MAINTAINER= lioux@FreeBSD.org
2003-02-23 20:58:35 +01:00
COMMENT= A SECURE, reliable, and FAST MTA for UNIX systems WITH TLS support
USE_OPENSSL= YES
# Patches from the main qmail port are not wanted
MAIN_QMAIL_PORT_WITH_OUTGOINGIP_PATCH_BARRIER= yes
TLS_PATCH_DATE= 20020825
# Using default from master port, i.e., /var/qmail
PREFIX?= ${QMAIL_PORT_PREFIX}
#PREFIX= /var/qmail-tls
.if !defined(PRE_MK_INCLUDED)
.include <bsd.port.pre.mk>
.endif
CFLAGS+= -I${OPENSSLBASE}/include -L${OPENSSLBASE}/lib -DTLS
.if defined(WITH_TLS_DEBUG)
CFLAGS+= -DDEBUG
.endif # WITH_TLS_DEBUG
#QMAIL_PORT= ${PORTSDIR}/mail/qmail
QMAIL_PORT= ${.CURDIR}/../qmail
QMAIL_PORT_PREFIX!= cd ${QMAIL_PORT} && ${MAKE} -V PREFIX
DOCFILES+= ${WRKDIR}/TLS.readme
* qmail port o bump PORTREVISION o sanitize MASTER_SITES o added several flags (defined checks) to enable active slave port control on what they inherit o add extra enhancement patches, these can be inherited too: - WITH_QMAILQUEUE_PATCH: qmailqueue-patch - WITH_BIG_TODO_PATCH: big-todo.103.patch - WITH_BIG_CONCURRENCY_PATCH: big-concurrency.patch - WITH_BIG_CONCURRENCY_PATCH_CONCURRENCY_LIMIT default: 509 o add patches checksum to distinfo o added MASTER_SITE_QMAIL for internal use o additional copies of slave qmail patches are now housed at MASTER_SITE_LOCAL, PATCH_SITE_SUBDIR=lioux because these patches only have ONE PATCH_SITES source each - qmail-ldap-1.03-20010201.patch.gz (qmail-ldap) - qmail-mysql-1.1.1.patch (qmail-mysql) - tls.patch (qmail-tls) o turn all absolute references to both binaries and FreeBSD configuration files into VARs: better maintability o s/yetanotherone-/slaveport-/: that is the correct nomenclature o ${LN} should use -sf instead of plain -s o typo fix: QMail -> qmail * qmail-ldap port o bump PORTREVISION in sync with master port bump o minor changes to comply to recent changes to the master port o block the WITH_BIG_CONCURRENCY_PATCH, it does not like the qmail-ldap patch o enable SMTP TLS support with WITH_TLS - the PKGNAMESUFFIX changes to -ldap-with_tls - let it know the location of QMAIL_TLS_PORT - add certificate and certificate-req; in fact, we are inheriting qmail-tls targets o s/yetanotherone-/slaveport-/: that is the correct nomenclature o tabulate better the WITH_* advertisement messages o add appropriate message to PKGMESSAGE about the new certificate targets following the qmail-tls port o nomenclature fix: ^ldap- -> ^qmail-ldap- * qmail-mysql port o bump PORTREVISION in sync with master port bump o block the WITH_QMAILQUEUE_PATCH, it does not like the qmail-mysql patch o s/yetanotherone-/slaveport-/: that is the correct nomenclature * qmail-tls port o bump PORTREVISION in sync with master port bump o minor changes to comply to recent changes to the master port o s/yetanotherone-/slaveport-/: that is the correct nomenclature o nomenclature fix: ^tls- -> ^qmail-tls-
2001-02-22 19:15:18 +01:00
slaveport-pre-fetch: qmail-tls-pre-fetch
* qmail port o bump PORTREVISION o sanitize MASTER_SITES o added several flags (defined checks) to enable active slave port control on what they inherit o add extra enhancement patches, these can be inherited too: - WITH_QMAILQUEUE_PATCH: qmailqueue-patch - WITH_BIG_TODO_PATCH: big-todo.103.patch - WITH_BIG_CONCURRENCY_PATCH: big-concurrency.patch - WITH_BIG_CONCURRENCY_PATCH_CONCURRENCY_LIMIT default: 509 o add patches checksum to distinfo o added MASTER_SITE_QMAIL for internal use o additional copies of slave qmail patches are now housed at MASTER_SITE_LOCAL, PATCH_SITE_SUBDIR=lioux because these patches only have ONE PATCH_SITES source each - qmail-ldap-1.03-20010201.patch.gz (qmail-ldap) - qmail-mysql-1.1.1.patch (qmail-mysql) - tls.patch (qmail-tls) o turn all absolute references to both binaries and FreeBSD configuration files into VARs: better maintability o s/yetanotherone-/slaveport-/: that is the correct nomenclature o ${LN} should use -sf instead of plain -s o typo fix: QMail -> qmail * qmail-ldap port o bump PORTREVISION in sync with master port bump o minor changes to comply to recent changes to the master port o block the WITH_BIG_CONCURRENCY_PATCH, it does not like the qmail-ldap patch o enable SMTP TLS support with WITH_TLS - the PKGNAMESUFFIX changes to -ldap-with_tls - let it know the location of QMAIL_TLS_PORT - add certificate and certificate-req; in fact, we are inheriting qmail-tls targets o s/yetanotherone-/slaveport-/: that is the correct nomenclature o tabulate better the WITH_* advertisement messages o add appropriate message to PKGMESSAGE about the new certificate targets following the qmail-tls port o nomenclature fix: ^ldap- -> ^qmail-ldap- * qmail-mysql port o bump PORTREVISION in sync with master port bump o block the WITH_QMAILQUEUE_PATCH, it does not like the qmail-mysql patch o s/yetanotherone-/slaveport-/: that is the correct nomenclature * qmail-tls port o bump PORTREVISION in sync with master port bump o minor changes to comply to recent changes to the master port o s/yetanotherone-/slaveport-/: that is the correct nomenclature o nomenclature fix: ^tls- -> ^qmail-tls-
2001-02-22 19:15:18 +01:00
qmail-tls-pre-fetch:
@${ECHO_MSG} "WITH_TLS_DEBUG=yes enable additional debug information"
* qmail port o bump PORTREVISION o sanitize MASTER_SITES o added several flags (defined checks) to enable active slave port control on what they inherit o add extra enhancement patches, these can be inherited too: - WITH_QMAILQUEUE_PATCH: qmailqueue-patch - WITH_BIG_TODO_PATCH: big-todo.103.patch - WITH_BIG_CONCURRENCY_PATCH: big-concurrency.patch - WITH_BIG_CONCURRENCY_PATCH_CONCURRENCY_LIMIT default: 509 o add patches checksum to distinfo o added MASTER_SITE_QMAIL for internal use o additional copies of slave qmail patches are now housed at MASTER_SITE_LOCAL, PATCH_SITE_SUBDIR=lioux because these patches only have ONE PATCH_SITES source each - qmail-ldap-1.03-20010201.patch.gz (qmail-ldap) - qmail-mysql-1.1.1.patch (qmail-mysql) - tls.patch (qmail-tls) o turn all absolute references to both binaries and FreeBSD configuration files into VARs: better maintability o s/yetanotherone-/slaveport-/: that is the correct nomenclature o ${LN} should use -sf instead of plain -s o typo fix: QMail -> qmail * qmail-ldap port o bump PORTREVISION in sync with master port bump o minor changes to comply to recent changes to the master port o block the WITH_BIG_CONCURRENCY_PATCH, it does not like the qmail-ldap patch o enable SMTP TLS support with WITH_TLS - the PKGNAMESUFFIX changes to -ldap-with_tls - let it know the location of QMAIL_TLS_PORT - add certificate and certificate-req; in fact, we are inheriting qmail-tls targets o s/yetanotherone-/slaveport-/: that is the correct nomenclature o tabulate better the WITH_* advertisement messages o add appropriate message to PKGMESSAGE about the new certificate targets following the qmail-tls port o nomenclature fix: ^ldap- -> ^qmail-ldap- * qmail-mysql port o bump PORTREVISION in sync with master port bump o block the WITH_QMAILQUEUE_PATCH, it does not like the qmail-mysql patch o s/yetanotherone-/slaveport-/: that is the correct nomenclature * qmail-tls port o bump PORTREVISION in sync with master port bump o minor changes to comply to recent changes to the master port o s/yetanotherone-/slaveport-/: that is the correct nomenclature o nomenclature fix: ^tls- -> ^qmail-tls-
2001-02-22 19:15:18 +01:00
slaveport-post-patch: qmail-tls-post-patch
* qmail port o bump PORTREVISION o sanitize MASTER_SITES o added several flags (defined checks) to enable active slave port control on what they inherit o add extra enhancement patches, these can be inherited too: - WITH_QMAILQUEUE_PATCH: qmailqueue-patch - WITH_BIG_TODO_PATCH: big-todo.103.patch - WITH_BIG_CONCURRENCY_PATCH: big-concurrency.patch - WITH_BIG_CONCURRENCY_PATCH_CONCURRENCY_LIMIT default: 509 o add patches checksum to distinfo o added MASTER_SITE_QMAIL for internal use o additional copies of slave qmail patches are now housed at MASTER_SITE_LOCAL, PATCH_SITE_SUBDIR=lioux because these patches only have ONE PATCH_SITES source each - qmail-ldap-1.03-20010201.patch.gz (qmail-ldap) - qmail-mysql-1.1.1.patch (qmail-mysql) - tls.patch (qmail-tls) o turn all absolute references to both binaries and FreeBSD configuration files into VARs: better maintability o s/yetanotherone-/slaveport-/: that is the correct nomenclature o ${LN} should use -sf instead of plain -s o typo fix: QMail -> qmail * qmail-ldap port o bump PORTREVISION in sync with master port bump o minor changes to comply to recent changes to the master port o block the WITH_BIG_CONCURRENCY_PATCH, it does not like the qmail-ldap patch o enable SMTP TLS support with WITH_TLS - the PKGNAMESUFFIX changes to -ldap-with_tls - let it know the location of QMAIL_TLS_PORT - add certificate and certificate-req; in fact, we are inheriting qmail-tls targets o s/yetanotherone-/slaveport-/: that is the correct nomenclature o tabulate better the WITH_* advertisement messages o add appropriate message to PKGMESSAGE about the new certificate targets following the qmail-tls port o nomenclature fix: ^ldap- -> ^qmail-ldap- * qmail-mysql port o bump PORTREVISION in sync with master port bump o block the WITH_QMAILQUEUE_PATCH, it does not like the qmail-mysql patch o s/yetanotherone-/slaveport-/: that is the correct nomenclature * qmail-tls port o bump PORTREVISION in sync with master port bump o minor changes to comply to recent changes to the master port o s/yetanotherone-/slaveport-/: that is the correct nomenclature o nomenclature fix: ^tls- -> ^qmail-tls-
2001-02-22 19:15:18 +01:00
qmail-tls-post-patch:
@${HEAD} -74 ${DISTDIR}/tls.patch > ${WRKDIR}/TLS.readme
* qmail port o bump PORTREVISION o sanitize MASTER_SITES o added several flags (defined checks) to enable active slave port control on what they inherit o add extra enhancement patches, these can be inherited too: - WITH_QMAILQUEUE_PATCH: qmailqueue-patch - WITH_BIG_TODO_PATCH: big-todo.103.patch - WITH_BIG_CONCURRENCY_PATCH: big-concurrency.patch - WITH_BIG_CONCURRENCY_PATCH_CONCURRENCY_LIMIT default: 509 o add patches checksum to distinfo o added MASTER_SITE_QMAIL for internal use o additional copies of slave qmail patches are now housed at MASTER_SITE_LOCAL, PATCH_SITE_SUBDIR=lioux because these patches only have ONE PATCH_SITES source each - qmail-ldap-1.03-20010201.patch.gz (qmail-ldap) - qmail-mysql-1.1.1.patch (qmail-mysql) - tls.patch (qmail-tls) o turn all absolute references to both binaries and FreeBSD configuration files into VARs: better maintability o s/yetanotherone-/slaveport-/: that is the correct nomenclature o ${LN} should use -sf instead of plain -s o typo fix: QMail -> qmail * qmail-ldap port o bump PORTREVISION in sync with master port bump o minor changes to comply to recent changes to the master port o block the WITH_BIG_CONCURRENCY_PATCH, it does not like the qmail-ldap patch o enable SMTP TLS support with WITH_TLS - the PKGNAMESUFFIX changes to -ldap-with_tls - let it know the location of QMAIL_TLS_PORT - add certificate and certificate-req; in fact, we are inheriting qmail-tls targets o s/yetanotherone-/slaveport-/: that is the correct nomenclature o tabulate better the WITH_* advertisement messages o add appropriate message to PKGMESSAGE about the new certificate targets following the qmail-tls port o nomenclature fix: ^ldap- -> ^qmail-ldap- * qmail-mysql port o bump PORTREVISION in sync with master port bump o block the WITH_QMAILQUEUE_PATCH, it does not like the qmail-mysql patch o s/yetanotherone-/slaveport-/: that is the correct nomenclature * qmail-tls port o bump PORTREVISION in sync with master port bump o minor changes to comply to recent changes to the master port o s/yetanotherone-/slaveport-/: that is the correct nomenclature o nomenclature fix: ^tls- -> ^qmail-tls-
2001-02-22 19:15:18 +01:00
@${PERL} -pi -ne "s|/usr/local/ssl|${OPENSSLBASE}|" ${WRKSRC}/Makefile
# Primary Ugh... ;-)
# idea stolen from www/apache13-ssl, a target written by adam@algroup.co.uk
# internal code ripped from tls.patch guts ;-) written by Frederik Vermeulen <jos-tls@kotnet.org>
certificate:
@if [ -f ${OPENSSLDIR}/openssl.cnf ]; \
then \
if [ ! -d ${WRKDIR} ]; \
then \
${MKDIR} ${WRKDIR} ; \
fi ; \
${OPENSSLBASE}/bin/openssl req -new -x509 -nodes \
-out ${WRKDIR}/servercert.pem -days 366 \
-keyout ${WRKDIR}/servercert.pem ; \
${INSTALL} -o qmaild -g qmail -m 0640 ${WRKDIR}/servercert.pem ${PREFIX}/control/servercert.pem ; \
${ECHO_MSG} "===> Do not forget to do 'make clean' to clean up temporary files" ; \
else \
${ECHO_MSG} "===> You must create the file ${OPENSSLDIR}/openssl.cnf first." ; \
fi
certificate-req:
@if [ -f ${OPENSSLDIR}/openssl.cnf ]; \
then \
if [ ! -d ${WRKDIR} ]; \
then \
${MKDIR} ${WRKDIR} ; \
fi ; \
${OPENSSLBASE}/bin/openssl req -new -nodes \
-out ${WRKDIR}/req.pem \
-keyout ${WRKDIR}/servercert.pem ; \
${INSTALL} -o qmaild -g qmail -m 0640 ${WRKDIR}/servercert.pem ${PREFIX}/control/servercert.pem ; \
${ECHO_MSG} ; \
${ECHO_MSG} "===> Do not forget to do 'make clean' to clean up temporary files" ; \
${ECHO_MSG} "===> Send ${WRKDIR}/req.pem to your CA to obtain signed_req.pem, and do:" ; \
${ECHO_MSG} "===> cat signed_req.pem >> ${PREFIX}/control/servercert.pem" ; \
else \
${ECHO_MSG} "===> You must create the file ${OPENSSLDIR}/openssl.cnf first." ; \
fi
# Local overrides
MASTERDIR= ${QMAIL_PORT}
PKGDIR_LOCAL= ${.CURDIR}
DESCR= ${PKGDIR_LOCAL}/pkg-descr
PKGMESSAGE= ${PKGDIR_LOCAL}/pkg-message
PLIST= ${PKGDIR_LOCAL}/pkg-plist
.include "${MASTERDIR}/Makefile"