blob: ca79392fed01624dcad125fe2de08c3a5d85327e (
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
|
# $NetBSD: Makefile,v 1.10 2003/07/17 21:47:01 grant Exp $
DISTNAME= sendmail.8.11.6
PKGNAME= sendmail-8.11.6
PKGREVISION= 5
WRKSRC= ${WRKDIR}/${PKGNAME:C/nb[0-9]+$//}
CATEGORIES= mail
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/
USE_WIDEPATCH?= YES
.if ${USE_WIDEPATCH} == "YES"
PATCH_SITES= ftp://ftp.kyoto.wide.ad.jp/pub/mail/smtpfeed/
PATCHFILES= sendmail8.11.6+3.4W.patch.gz
PATCH_DIST_ARGS=-d ${WRKSRC}/sendmail -E ${PATCH_DIST_STRIP}
.if !(defined(PATCH_DEBUG) || defined(PKG_VERBOSE))
PATCH_DIST_ARGS+=--forward --quiet
.endif
PATCH_DIST_STRIP= -p1
.endif
CR_PATCH=sendmail.8.11.6.security.cr.patch
PATCHFILES+= ${CR_PATCH}
SITES_${CR_PATCH}= ${MASTER_SITES}
MAINTAINER= tech-pkg@NetBSD.org
HOMEPAGE= http://www.sendmail.org/
COMMENT= The well known Mail Transport Agent
LICENSE= no-profit
USE_BUILDLINK2= # defined
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_WIDEPATCH USE_INET6 USE_TCPWRAPPERS USE_LDAP USE_DB2 \
USE_SASL USE_STARTTLS
MESSAGE_SRC= ${WRKDIR}/.MESSAGE_SRC
PLIST_SRC= ${WRKDIR}/.PLIST_SRC
DESCR_SRC= ${WRKDIR}/.DESCR_SRC
.include "../../mk/bsd.prefs.mk"
.if ${OPSYS} == "SunOS"
USE_DB2?= YES
.else
USE_DB2?= NO
.endif
.if ${USE_DB2} == "YES"
. include "../../databases/db/buildlink2.mk"
.endif
.if defined(USE_LDAP) && (${USE_LDAP} == "YES")
. include "../../databases/openldap/buildlink2.mk"
.endif
.if defined(USE_SASL) && (${USE_SASL} == "YES")
. include "../../security/cyrus-sasl/buildlink2.mk"
.endif
.if defined(USE_STARTTLS) && (${USE_STARTTLS} == "YES")
. include "../../security/openssl/buildlink2.mk"
.endif
USE_TCPWRAPPERS?= YES
.if ${USE_TCPWRAPPERS} == "YES"
. include "../../security/tcp_wrappers/buildlink2.mk"
.endif
post-patch:
${CP} ${FILESDIR}/site.config.m4 ${SITECONFIG}
${CHMOD} +w ${SITECONFIG}
${CP} ${PKGDIR}/DESCR ${DESCR_SRC}
${ECHO} '---' >>${DESCR_SRC}
${ECHO} -n 'compiled features:' >>${DESCR_SRC}
.if ${USE_WIDEPATCH} == YES
${ECHO} -n ' WIDE' >>${DESCR_SRC}
.endif
.if defined(USE_INET6) && ${USE_INET6} == YES
${CAT} ${FILESDIR}/site.config.m4-v6 >>${SITECONFIG}
${ECHO} -n ' INET6' >>${DESCR_SRC}
.endif
.if ${USE_TCPWRAPPERS} == YES
${CAT} ${FILESDIR}/site.config.m4-tcpwrappers >>${SITECONFIG}
${ECHO} -n ' TCPWRAPPERS' >>${DESCR_SRC}
.endif
.if ${OPSYS} == "SunOS"
${CAT} ${FILESDIR}/site.config.m4-solaris >>${SITECONFIG}
.endif
.if defined(USE_LDAP) && ${USE_LDAP} == YES
${CAT} ${FILESDIR}/site.config.m4-ldap >>${SITECONFIG}
${ECHO} -n ' LDAP' >>${DESCR_SRC}
.endif
.if ${USE_DB2} == YES
${CAT} ${FILESDIR}/site.config.m4-db2 >>${SITECONFIG}
${ECHO} -n ' DB2' >>${DESCR_SRC}
.endif
.if defined(USE_STARTTLS) && ${USE_STARTTLS} == YES
${CAT} ${FILESDIR}/site.config.m4-starttls >>${SITECONFIG}
${ECHO} -n ' STARTTLS' >>${DESCR_SRC}
.endif
.if defined(USE_SASL) && ${USE_SASL} == YES
${CAT} ${FILESDIR}/site.config.m4-sasl >>${SITECONFIG}
${ECHO} -n ' SASL' >>${DESCR_SRC}
.endif
${ECHO} >>${DESCR_SRC}
do-build:
cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ./Build
post-build:
${SED} -e 's#@@PREFIX@@#${PREFIX}#g' \
<${FILESDIR}/mailer.conf >${WRKDIR}/mailer.conf.sendmail
${CP} ${PKGDIR}/PLIST ${PLIST_SRC}
${CP} ${PKGDIR}/MESSAGE ${MESSAGE_SRC}
.if ${USE_DB2} == "YES"
${ECHO} "" >>${MESSAGE_SRC}
${ECHO} "If you are upgrading from \"sendmail\" 8.8.x don't forget to rebuild all" >>${MESSAGE_SRC}
${ECHO} "databases with \"${PREFIX}/bin/newaliases\" and \"${PREFIX}/sbin/makemap\"." >>${MESSAGE_SRC}
${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:
${INSTALL_DATA_DIR} ${PREFIX}/libexec/sendmail
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/sendmail
${INSTALL_DATA} ${WRKDIR}/mailer.conf.sendmail ${PREFIX}/share/examples/sendmail/mailer.conf
${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} \ .`
|