xref: /freebsd/usr.sbin/mailwrapper/Makefile (revision 657729a89dd578d8cfc70d6616f5c65a48a8b33a)
1# $FreeBSD$
2
3.include <src.opts.mk>
4
5.if ${MK_MAILWRAPPER} != "no"
6PROG=	mailwrapper
7MAN=	mailwrapper.8
8
9LIBADD=	util
10.endif
11
12.if ${MK_MAILWRAPPER} != "no" || ${MK_SENDMAIL} != "no" || ${MK_DMAGENT} != "no"
13SYMLINKS=	../sbin/mailwrapper /usr/bin/mailq \
14		../sbin/mailwrapper /usr/bin/newaliases \
15		mailwrapper /usr/sbin/hoststat \
16		mailwrapper /usr/sbin/purgestat \
17		mailwrapper /usr/sbin/sendmail
18
19.if ${MK_MAILWRAPPER} == "no" && ${MK_DMAGENT} != "no"
20SYMLINKS+=	../libexec/dma ${BINDIR}/mailwrapper
21.elif ${MK_MAILWRAPPER} == "no" && ${MK_DMAGENT} == "no" && ${MK_SENDMAIL} != "no"
22SYMLINKS+=	../libexec/sendmail/sendmail ${BINDIR}/mailwrapper
23.endif
24.endif
25
26.if ${MK_MAILWRAPPER} != "no" && ${MK_SENDMAIL} == "no"
27SYMLINKS+=	..${BINDIR}/mailwrapper /bin/rmail
28.endif
29
30.if ${MK_SENDMAIL} != "no"
31FILES=		${SRCTOP}/etc/mail/mailer.conf
32FILESDIR=	${SHAREDIR}/examples/sendmail
33.endif
34
35.if ${MK_MAILWRAPPER} != "no"
36# We install here if either dma(8) is enabled, or sendmail(8) isn't.  In the
37# latter scenario, we take care of the possibility that neither sendmail(8) nor
38# dma(8) are installed and simply provide a default that can be changed for an
39# alternative in ports.
40.if ${MK_DMAGENT} != "no" || ${MK_SENDMAIL} == "no"
41CONFS=		${SRCTOP}/libexec/dma/dmagent/mailer.conf
42.else
43CONFS=		${SRCTOP}/etc/mail/mailer.conf
44.endif
45CONFSDIR=	/etc/mail
46CONFSMODE=	644
47.endif
48
49.include <bsd.prog.mk>
50