blob: 6dc4a5de5936e66d88428c81dc5772d8813c4d8d (
plain) (
blame)
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
|
# New ports collection makefile for: postfix-current
# Date created: 18 Mar 1999
# Whom: torstenb
#
# $FreeBSD$
#
PORTNAME= postfix
PORTVERSION= 20010808
PORTREVISION= 2
CATEGORIES= mail ipv6
MASTER_SITES= ftp://ftp.porcupine.org/mirrors/postfix-release/experimental/ \
ftp://ftp.aet.tu-cottbus.de/pub/postfix_tls/%SUBDIR%/ \
ftp://ftp.tux.org/pub/net/postfix/experimental/ \
ftp://ftp.utoronto.ca/mirror/packages/postfix/experimental/ \
ftp://ftp.samurai.com/pub/postfix/experimental/ \
${MASTER_SITE_RINGSERVER:S,%SUBDIR%,net/mail/postfix/experimental/&,}
MASTER_SITE_SUBDIR= . old related/postfix
DISTNAME= snapshot-${PORTVERSION}
DIST_SUBDIR= ${PORTNAME}
MAINTAINER= dwcjr@FreeBSD.org
MAN1= mailq.1 newaliases.1 postalias.1 postcat.1 postconf.1 postdrop.1 \
postfix.1 postkick.1 postlock.1 postlog.1 postmap.1 postsuper.1 \
sendmail.1
MAN5= access.5 aliases.5 canonical.5 regexp_table.5 relocated.5 \
transport.5 virtual.5
MAN8= bounce.8 cleanup.8 defer.8 error.8 flush.8 lmtp.8 local.8 \
master.8 nqmgr.8 pickup.8 pipe.8 qmgr.8 qmqpd.8 showq.8 smtp.8 \
smtpd.8 spawn.8 trivial-rewrite.8 virtual.8
CONF1= access aliases canonical main.cf master.cf \
regexp_table relocated transport virtual
CONF2= sample-aliases.cf sample-canonical.cf sample-debug.cf \
sample-filter.cf sample-flush.cf sample-local.cf sample-misc.cf \
sample-qmqpd.cf \
sample-rate.cf sample-regexp.cf sample-relocated.cf \
sample-resource.cf sample-rewrite.cf sample-smtp.cf \
sample-smtpd.cf sample-transport.cf sample-virtual.cf
BIN1= bounce cleanup error flush lmtp local master nqmgr pickup \
pipe qmgr qmqpd showq smtp smtpd spawn trivial-rewrite virtual
BIN2= postalias postcat postconf postdrop postfix \
postkick postlock postlog postmap postsuper sendmail
DOC1= 0README COMPATIBILITY DB_README DEBUG_README ETRN_README \
FILTER_README HISTORY INSTALL LDAP_README LICENSE LINUX_README \
LMTP_README MACOSX_README MYSQL_README PCRE_README PORTING \
QMQP_README RELEASE_NOTES SASL_README TODO ULTRIX_README UUCP_README \
VERP_README VIRTUAL_README
.if defined(NOPORTDOCS)
PLIST_SUB+= SUB_DOCS="@comment "
.else
PLIST_SUB+= SUB_DOCS=""
.endif
.if !defined(DEBUG)
MAKEFILEFLAGS+= DEBUG=
.endif
MAKEFILEFLAGS+= OPT="${CFLAGS}"
SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \
TOUCH="${TOUCH}" \
MKDIR="${MKDIR}" \
pre-fetch:
@${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.postfix
.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc)
.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc"
.endif
post-patch:
(cd ${WRKSRC} && ${MAKE} -f Makefile.init makefiles ${MAKEFILEFLAGS} \
CCARGS="${POSTFIX_CCARGS}" AUXLIBS="${POSTFIX_AUXLIBS}" && \
${ECHO} "all: default" >> Makefile)
pre-install:
@PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
do-install:
@${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 0755 \
${PREFIX}/etc/postfix \
${PREFIX}/libexec/postfix \
/var/spool/postfix
@${INSTALL_DATA} ${WRKSRC}/conf/LICENSE ${PREFIX}/etc/postfix
.for file in ${CONF1}
@${INSTALL_DATA} \
${WRKSRC}/conf/${file} \
${PREFIX}/etc/postfix/sample-${file}
.endfor
.for file in ${CONF2}
@${INSTALL_DATA} \
${WRKSRC}/conf/${file} \
${PREFIX}/etc/postfix
.endfor
@${INSTALL_SCRIPT} \
${WRKSRC}/conf/postfix-script-sgid \
${PREFIX}/etc/postfix/postfix-script
@${INSTALL_SCRIPT} \
${WRKSRC}/auxiliary/rmail/rmail \
${PREFIX}/bin/rmail
.for file in ${BIN1}
@${INSTALL_PROGRAM} \
${WRKSRC}/libexec/${file} \
${PREFIX}/libexec/postfix
.endfor
.for file in ${BIN2}
@${INSTALL_PROGRAM} \
${WRKSRC}/src/${file}/${file} \
${PREFIX}/sbin
.endfor
.for file in ${BIN3}
@${INSTALL_PROGRAM} \
${WRKSRC}/src/smtpstone/${file} \
${PREFIX}/sbin
.endfor
.for file in ${MAN1}
@${INSTALL_MAN} \
${WRKSRC}/man/man1/${file} \
${PREFIX}/man/man1
.endfor
.for file in ${MAN5}
@${INSTALL_MAN} \
${WRKSRC}/man/man5/${file} \
${PREFIX}/man/man5
.endfor
.for file in ${MAN8}
@${INSTALL_MAN} \
${WRKSRC}/man/man8/${file} \
${PREFIX}/man/man8
.endfor
.if !defined(NOPORTDOCS)
@${INSTALL} -d -o ${DOCOWN} -g ${DOCGRP} -m 555 ${DOCSDIR}
@cd ${WRKSRC}/html && ${INSTALL_DATA} *.html *.gif ${DOCSDIR} && \
${ECHO_MSG} "Installed HTML documentation in ${DOCSDIR}"
@cd ${WRKSRC} && for i in ${DOC1} ; do \
${INSTALL_DATA} $$i ${DOCSDIR} ; done && \
${ECHO_MSG} "Installed text documentation in ${DOCSDIR}"
.endif
@${ECHO_MSG} '--------------------------------------------------'
@${ECHO_MSG} '- To replace your existing sendmail with postfix -'
@${ECHO_MSG} '- type "make replace" -'
@${ECHO_MSG} '--------------------------------------------------'
post-install:
@PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
post-clean:
@${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc
.include <bsd.port.pre.mk>
replace:
.if ${OSVERSION} >= 400014
@${ECHO_MSG} "===> Activating postfix in /etc/mail/mailer.conf"
${MV} -f /etc/mail/mailer.conf /etc/mail/mailer.conf.bak
${ECHO} "#" > /etc/mail/mailer.conf
${ECHO} -n "# Execute the Postfix sendmail program" >> /etc/mail/mailer.conf
${ECHO} ", named ${PREFIX}/sbin/sendmail" >> /etc/mail/mailer.conf
${ECHO} "#" >> /etc/mail/mailer.conf
${ECHO} "sendmail ${PREFIX}/sbin/sendmail" >> /etc/mail/mailer.conf
${ECHO} "send-mail ${PREFIX}/sbin/sendmail" >> /etc/mail/mailer.conf
${ECHO} "mailq ${PREFIX}/sbin/sendmail" >> /etc/mail/mailer.conf
${ECHO} "newaliases ${PREFIX}/sbin/sendmail" >> /etc/mail/mailer.conf
.else
@${ECHO_MSG} "===> Replacing sendmail"
@if [ -e /usr/sbin/sendmail ]; then \
${MV} -f /usr/sbin/sendmail /usr/sbin/sendmail.OFF; \
${CHMOD} 0 /usr/sbin/sendmail.OFF; \
fi
@if [ -e ${PREFIX}/sbin/sendmail ]; then \
${LN} -s ${PREFIX}/sbin/sendmail /usr/sbin/sendmail; \
fi
@${ECHO_MSG} "===> Replacing mailq"
@if [ -e /usr/bin/mailq ]; then \
${MV} -f /usr/bin/mailq /usr/bin/mailq.OFF; \
${CHMOD} 0 /usr/bin/mailq.OFF; \
fi
@if [ -e ${PREFIX}/sbin/sendmail ]; then \
${LN} -s ${PREFIX}/sbin/sendmail /usr/bin/mailq; \
fi
@${ECHO_MSG} "===> Replacing newaliases"
@if [ -e /usr/bin/newaliases ]; then \
${MV} -f /usr/bin/newaliases /usr/bin/newaliases.OFF; \
${CHMOD} 0 /usr/bin/newaliases.OFF; \
fi
@if [ -e ${PREFIX}/sbin/sendmail ]; then \
${LN} -s ${PREFIX}/sbin/sendmail /usr/bin/newaliases; \
fi
.endif
.include <bsd.port.post.mk>
|