freebsd-ports/mail/dma/Makefile
Guido Falsi bfacd10e33 mail/dma: Fix cronjob install location
- Install the cronjob file in the correct location, so it is
  automatically picked up by cron
- While here, use ETCDIR expansion in plist in place of static path
  where appropriate

PR:		262294
Approved by:	garga (maintainer)
Fixes:		f3c2313c58 mail/dma: Implement cronjob to flush emails
2022-03-02 14:28:57 +01:00

57 lines
1.4 KiB
Makefile

# Created by: Daniel Roethlisberger <daniel@roe.ch>
PORTNAME= dma
PORTREVISION= 1
DISTVERSIONPREFIX= v
DISTVERSION= 0.13.20220128
PORTEPOCH= 1
CATEGORIES= mail
MAINTAINER= garga@FreeBSD.org
COMMENT= DragonFly Mail Agent, a small MTA for local/outbound mail
LICENSE= BSD3CLAUSE
USES= ssl uidfix
USE_GITHUB= yes
GH_ACCOUNT= corecode
GH_TAGNAME= 92937587bbfeab53653b841afe76af2fa6dad345
USE_RC_SUBR= dma_flushq
MAKE_ENV= __MAKE_CONF=/dev/null \
MANDIR=${PREFIX}/share/man/man \
MK_WERROR=no \
SRCCONF=/dev/null
CFLAGS+= -DCONF_PATH='\"${PREFIX}/etc/dma\"' -DDMA_GROUP='\"mail\"' \
-DDMA_ROOT_USER='\"mailnull\"' -I${OPENSSLINC}
LDFLAGS+= -L${OPENSSLLIB}
PORTSCOUT= limit:^[0-9\.]*$$
SUB_FILES= dma_cron pkg-message
BUILD_WRKSRC= ${WRKSRC}/bsd
INSTALL_WRKSRC= ${WRKSRC}/bsd
post-patch:
@${REINPLACE_CMD} -e 's,/etc/dma,${PREFIX}/etc/dma,g' \
${WRKSRC}/dma.8
@${REINPLACE_CMD} -e 's, /etc/dma, ${PREFIX}/etc/dma,g' \
${WRKSRC}/dma.conf
@${REINPLACE_CMD} -e '/^MK_MAN/d' \
-e 's/^NOMAN.*/MAN=/' \
${WRKSRC}/bsd/dma-mbox-create/Makefile
post-install:
${MKDIR} ${STAGEDIR}${PREFIX}/etc/cron.d
${MKDIR} ${STAGEDIR}${ETCDIR}
${MKDIR} ${STAGEDIR}/var/spool/dma
${INSTALL_DATA} ${WRKSRC}/dma.conf \
${STAGEDIR}${ETCDIR}/dma.conf.sample
${INSTALL_DATA} ${WRKSRC}/auth.conf \
${STAGEDIR}${ETCDIR}/auth.conf.sample
${INSTALL_DATA} ${WRKDIR}/dma_cron \
${STAGEDIR}${PREFIX}/etc/cron.d/dma
.include <bsd.port.mk>