summaryrefslogtreecommitdiff
path: root/usr.sbin/mailwrapper/Makefile
blob: c1b395c81e4ea20bf6617be5b85286c646ebff7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
.include <src.opts.mk>

.if ${MK_MAILWRAPPER} != "no"
PROG=	mailwrapper
MAN=	mailwrapper.8

LIBADD=	util
.endif

.if ${MK_MAILWRAPPER} != "no" || ${MK_SENDMAIL} != "no" || ${MK_DMAGENT} != "no"
SYMLINKS=	../sbin/mailwrapper /usr/bin/mailq \
		../sbin/mailwrapper /usr/bin/newaliases \
		mailwrapper /usr/sbin/hoststat \
		mailwrapper /usr/sbin/purgestat \
		mailwrapper /usr/sbin/sendmail

.if ${MK_MAILWRAPPER} == "no" && ${MK_DMAGENT} != "no"
SYMLINKS+=	../libexec/dma ${BINDIR}/mailwrapper
.elif ${MK_MAILWRAPPER} == "no" && ${MK_DMAGENT} == "no" && ${MK_SENDMAIL} != "no"
SYMLINKS+=	../libexec/sendmail/sendmail ${BINDIR}/mailwrapper
.endif
.endif

.if ${MK_MAILWRAPPER} != "no" && ${MK_SENDMAIL} == "no"
SYMLINKS+=	..${BINDIR}/mailwrapper /bin/rmail
.endif

.if ${MK_SENDMAIL} != "no"
FILES=		${SRCTOP}/etc/mail/mailer.conf
FILESDIR=	${SHAREDIR}/examples/sendmail
FILESPACKAGE=	sendmail
.endif

.if ${MK_MAILWRAPPER} != "no"
# We install here if either dma(8) is enabled, or sendmail(8) isn't.  In the
# latter scenario, we take care of the possibility that neither sendmail(8) nor
# dma(8) are installed and simply provide a default that can be changed for an
# alternative in ports.
.if ${MK_DMAGENT} != "no" || ${MK_SENDMAIL} == "no"
CONFS=		${SRCTOP}/libexec/dma/dmagent/mailer.conf
.else
CONFS=		${SRCTOP}/etc/mail/mailer.conf
.endif
CONFSDIR=	/etc/mail
CONFSMODE=	644
.endif

.include <bsd.prog.mk>