blob: e276c0dc79744631f03bb2e7f05e5c2b9486aa96 (
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
# $NetBSD: Makefile,v 1.16 2000/06/15 12:32:33 veego Exp $
DISTNAME= sendmail.8.9.3
PKGNAME= sendmail-8.9.3
CATEGORIES= mail
MASTER_SITES= ftp://ftp.sendmail.org/pub/sendmail/ \
ftp://ftp.cert.dfn.de/pub/tools/net/sendmail/ \
ftp://ftp.kyoto.wide.ad.jp/pub/mail/sendmail/
PATCH_SITES= ftp://ftp.kyoto.wide.ad.jp/pub/mail/sendmail/
PATCHFILES= sendmail893+3.2W.patch.gz
PATCH_DIST_ARGS=-d ${WRKSRC}/src -E ${PATCH_DIST_STRIP}
.if !(defined(PATCH_DEBUG) || defined(PKG_VERBOSE))
PATCH_DIST_ARGS+=--forward --quiet
.endif
MAINTAINER= packages@netbsd.org
HOMEPAGE= http://www.sendmail.org/
LICENSE= no-profit
NO_CONFIGURE= yes
MAKE_ENV+= BSD_BINOWN="${BINOWN}" BSD_BINGRP="${BINGRP}" \
BSD_MANOWN="${MANOWN}" BSD_MANGRP="${MANGRP}"
MESSAGE_FILE= ${WRKDIR}/MESSAGE
WRKSRC= ${WRKDIR}/${PKGNAME}
BUILD_DEFS+= USE_INET6
.include "../../mk/bsd.prefs.mk"
.if defined(USE_INET6) && ${USE_INET6} == YES
MAKE_ENV+= CONFIG="-f ${WRKSRC}/site.config-v6"
.endif
.if ${OPSYS} == "SunOS"
USE_DB2?= YES
.else
USE_DB2?= NO
.endif
.if ${USE_DB2} == YES
DEPENDS+= db-2.7.7:../../databases/db
MAKE_ENV+= DB_ENVDEF="-I${LOCALBASE}/include/db2" \
DB_LIBS="-L${LOCALBASE}/lib -ldb2"
.else
MAKE_ENV+= DB_ENVDEF="" DB_LIBS=""
.endif
PLIST_SRC= ${WRKDIR}/.PLIST_SRC
.if defined(USE_LDAP) && ${USE_LDAP} == YES
DEPENDS+= openldap-1.2.7p1:../../databases/openldap
MAKE_ENV+= LDAP_CONF="-DLDAPMAP" \
LDAP_ENVDEF="-I${LOCALBASE}/include" \
LDAP_LIBS="-L${LOCALBASE}/lib -Wl,-R${LOCALBASE}/lib -lldap -llber"
.else
MAKE_ENV+= LDAP_CONF="" LDAP_ENVDEF="" LDAP_LIBS=""
.endif
.if ${OPSYS} == "NetBSD"
MAKE_ENV+= TCPD_CONF="-DTCPWRAPPERS" TCPD_LIBS="-lwrap"
.else
MAKE_ENV+= TCPD_CONF="" TCPD_LIBS=""
.endif
post-patch:
.if defined(USE_INET6) && ${USE_INET6} == YES
@(${CP} ${FILESDIR}/site.config-v6 ${WRKSRC})
.endif
post-build:
${SED} -e 's#@@PREFIX@@#${PREFIX}#g' \
<${FILESDIR}/mailer.conf >${WRKDIR}/mailer.conf.sendmail
${SED} -e 's#@@PKGNAME@@#${PKGNAME}#g' \
-e 's#@@PREFIX@@#${PREFIX}#g' \
<${PKGDIR}/MESSAGE >${MESSAGE_FILE}
${CAT} ${PKGDIR}/PLIST.common ${PKGDIR}/PLIST.${LOWER_OPSYS} > ${PLIST_SRC}
.if ${USE_DB2} == YES
${ECHO} >>${MESSAGE_FILE} ""
${ECHO} >>${MESSAGE_FILE} "If you are upgrading from \"sendmail\" 8.8.x don't forget to rebuild all"
${ECHO} >>${MESSAGE_FILE} "databases with \"${PREFIX}/bin/newaliases\" and \"${PREFIX}/sbin/makemap\"."
${ECHO} >>${PLIST_SRC} "@exec mv -f /usr/sbin/makemap /usr/sbin/makemap.8.8 || true"
${ECHO} >>${PLIST_SRC} "@unexec mv -f /usr/sbin/makemap.8.8 /usr/sbin/makemap || true"
.endif
pre-install:
${MKDIR} ${PREFIX}/libexec/sendmail
post-install:
${INSTALL_DATA} ${WRKDIR}/mailer.conf.sendmail ${PREFIX}/etc
${CP} -pr ${WRKSRC}/cf ${PREFIX}/share/sendmail
${CHOWN} -R ${BINOWN}:${BINGRP} ${PREFIX}/share/sendmail
.if ${USE_DB2} == YES
${MV} -f /usr/sbin/makemap /usr/sbin/makemap.8.8 || ${TRUE}
.endif
.include "../../mk/bsd.pkg.mk"
# has to be below include for bsd.pkg.mk, else substition fails
OBJDIR!= ${ECHO} obj.`uname -srm | ${TR} \ .`
|