diff options
Diffstat (limited to 'mail')
-rw-r--r-- | mail/qmailanalog/Makefile | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/mail/qmailanalog/Makefile b/mail/qmailanalog/Makefile index 91f72a64ec7e..f2d6646bd8e4 100644 --- a/mail/qmailanalog/Makefile +++ b/mail/qmailanalog/Makefile @@ -24,8 +24,6 @@ MAN1= matchup.1 xqp.1 xsender.1 xrecipient.1 columnt.1 PLIST_SUB+= MYSUBDIR=${MYSUBDIR} -DIFF_MSG= Cannot Make and Install with different PREFIX or QMAIL_DIR - .if exists(${PREFIX}/qmail/bin/qmail-send) QMAIL_DIR?= ${PREFIX}/qmail .else @@ -38,24 +36,25 @@ MYSUBDIR?= qmailanalog/ MYSUBDIR?= .endif +PREFIX?= ${QMAIL_DIR} QMPREFIX?= ${PREFIX}/${MYSUBDIR} NO_MTREE= yes USE_REINPLACE= yes +.include <bsd.port.pre.mk> + +.if ${PREFIX} != ${QMAIL_DIR} +BROKEN= "Cannot Make and Install with different PREFIX or QMAIL_DIR" +.endif + post-patch: @${REINPLACE_CMD} "s|.usr.local.qmailanalog|${QMPREFIX}|" ${WRKSRC}/conf-home @${REINPLACE_CMD} "s|-O2|${CFLAGS}|" ${WRKSRC}/conf-cc @${REINPLACE_CMD} 's|02755|0755|g; /cat/d' ${WRKSRC}/hier.c @${REINPLACE_CMD} 's|^man prog|prog|g' ${WRKSRC}/Makefile - @${ECHO_CMD} ${PREFIX} > ${WRKDIR}/.PPREFIX - @${ECHO_CMD} ${QMAIL_DIR} >> ${WRKDIR}/.PPREFIX pre-install: - @${ECHO_CMD} ${PREFIX} > ${WRKDIR}/.IPREFIX - @${ECHO_CMD} ${QMAIL_DIR} >> ${WRKDIR}/.IPREFIX - @diff ${WRKDIR}/.[PI]PREFIX > /dev/null \ - || (${ECHO_CMD} ${DIFF_MSG} && exit 1) @${MKDIR} ${QMPREFIX} -.include <bsd.port.mk> +.include <bsd.port.post.mk> |