summaryrefslogtreecommitdiff
path: root/mail/sendmail/Makefile.common
blob: 2c9f0fdcae784b254b39d860d352cf03db739b8f (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# $NetBSD: Makefile.common,v 1.5 2003/03/29 12:41:38 jmmv Exp $
#
# Makefile fragment shared with libmilter
#

DISTNAME=	sendmail.${DIST_VERS}
WRKSRC=		${WRKDIR}/sendmail-${DIST_VERS}
CATEGORIES=	mail
PKGREVISION=	1
MASTER_SITES=	ftp://ftp.sendmail.org/pub/sendmail/ \
		ftp://ftp.fu-berlin.de/pub/unix/mail/sendmail/ \
		ftp://ftp.kyoto.wide.ad.jp/pub/mail/sendmail/

MAINTAINER=	packages@netbsd.org
HOMEPAGE=	http://www.sendmail.org/

LICENSE=	no-profit

DISTINFO_FILE?=	${.CURDIR}/../../mail/sendmail/distinfo
FILESDIR?=	${.CURDIR}/../../mail/sendmail/files
PATCHDIR?=	${.CURDIR}/../../mail/sendmail/patches

DIST_VERS=	8.12.8

MAKE_ENV+=	BSD_BINOWN="${BINOWN}" BSD_BINGRP="${BINGRP}" \
		BSD_MANOWN="${MANOWN}" BSD_MANGRP="${MANGRP}" \
		BUILDLINK_DIR="${BUILDLINK_DIR}"
SITECONFIG=	${WRKSRC}/devtools/Site/site.config.m4

BUILD_DEFS+=    USE_INET6 USE_TCPWRAPPERS USE_LDAP USE_DB2 \
		USE_SASL USE_STARTTLS USE_MILTER USE_DB4
DESCR_SRC=	${WRKDIR}/.DESCR_SRC

USE_BUILDLINK2=	YES

.include "../../mk/bsd.prefs.mk"

_NEED_GNU_M4=	NO
_NEED_GNU_M4_PLATFORM=	NetBSD-0.*-* NetBSD-1.[01234]*-*
_NEED_GNU_M4_PLATFORM=	NetBSD-1.5.*-* NetBSD-1.5[A-Y]-*
.for __tmp__ in ${_NEED_GNU_M4_PLATFORM}
.   if ${MACHINE_PLATFORM:M${__tmp__}} != ""
_NEED_GNU_M4=	YES
.   endif
.endfor

.if ${_NEED_GNU_M4} == "YES"
BUILD_DEPENDS+=	m4-*:../../devel/m4
EVAL_PREFIX+=	M4_PREFIX=m4
MAKE_ENV+=	M4=${M4_PREFIX}/bin/${GNU_PROGRAM_PREFIX}m4
.endif

make-sendmail-siteconfig:
	${CP} ${FILESDIR}/site.config.m4 ${SITECONFIG}
	${CHMOD} +w ${SITECONFIG}
	${CP} ${PKGDIR}/DESCR ${DESCR_SRC}
	${ECHO} '---' >>${DESCR_SRC}
	${ECHO} -n 'compiled features:' >>${DESCR_SRC}
.if defined(USE_INET6) && ${USE_INET6} == YES
	${CAT} ${FILESDIR}/site.config.m4-v6 >>${SITECONFIG}
.if ${OPSYS} != "SunOS"
	${CAT} ${FILESDIR}/site.config.m4-v6-not-solaris >>${SITECONFIG}
.endif
	${ECHO} -n ' INET6' >>${DESCR_SRC}
.endif
.if ${OPSYS} == "SunOS"
	${CAT} ${FILESDIR}/site.config.m4-solaris >>${SITECONFIG}
.endif
.if defined(USE_MILTER) && ${USE_MILTER} == YES
	${CAT} ${FILESDIR}/site.config.m4-milter >>${SITECONFIG}
	${ECHO} -n ' MILTER' >>${DESCR_SRC}
.endif