Lines 6-12
Link Here
|
6 |
# |
6 |
# |
7 |
|
7 |
|
8 |
PORTNAME= postfix |
8 |
PORTNAME= postfix |
9 |
PORTVERSION= 2.6.0 |
9 |
PORTVERSION= 2.6.1 |
10 |
PORTEPOCH= 1 |
10 |
PORTEPOCH= 1 |
11 |
CATEGORIES= mail ipv6 |
11 |
CATEGORIES= mail ipv6 |
12 |
MASTER_SITES= ftp://ftp.porcupine.org/mirrors/postfix-release/official/ \ |
12 |
MASTER_SITES= ftp://ftp.porcupine.org/mirrors/postfix-release/official/ \ |
Lines 76-83
Link Here
|
76 |
bounce.8 trace.8 \ |
76 |
bounce.8 trace.8 \ |
77 |
smtp.8 lmtp.8 |
77 |
smtp.8 lmtp.8 |
78 |
|
78 |
|
79 |
CONF1= access aliases canonical generic header_checks main.cf master.cf \ |
79 |
PORTEXAMPLES= access aliases canonical generic header_checks \ |
80 |
relocated transport virtual |
80 |
main.cf master.cf relocated transport virtual |
81 |
|
81 |
|
82 |
.if !defined(DEBUG) |
82 |
.if !defined(DEBUG) |
83 |
MAKEFILEFLAGS+= DEBUG= |
83 |
MAKEFILEFLAGS+= DEBUG= |
Lines 85-98
Link Here
|
85 |
|
85 |
|
86 |
MAKEFILEFLAGS+= CC="${CC}" OPT="${CFLAGS}" |
86 |
MAKEFILEFLAGS+= CC="${CC}" OPT="${CFLAGS}" |
87 |
|
87 |
|
88 |
SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \ |
|
|
89 |
TOUCH="${TOUCH}" \ |
90 |
MKDIR="${MKDIR}" |
91 |
|
92 |
.include <bsd.port.pre.mk> |
88 |
.include <bsd.port.pre.mk> |
93 |
|
89 |
|
|
|
90 |
POSTFIX_CCARGS+= -DDEF_CONFIG_DIR=\\\"${ETCDIR}\\\" \ |
91 |
-DDEF_SAMPLE_DIR=\\\"${EXAMPLESDIR}\\\" \ |
92 |
-DDEF_DAEMON_DIR=\\\"${PREFIX}/libexec/postfix\\\" \ |
93 |
-DDEF_COMMAND_DIR=\\\"${PREFIX}/sbin\\\" \ |
94 |
-DDEF_SENDMAIL_PATH=\\\"${PREFIX}/sbin/sendmail\\\" \ |
95 |
-DDEF_NEWALIAS_PATH=\\\"${PREFIX}/bin/newaliases\\\" \ |
96 |
-DDEF_MAILQ_PATH=\\\"${PREFIX}/bin/mailq\\\" \ |
97 |
-DDEF_MANPAGE_DIR=\\\"${MANPREFIX}/man\\\" \ |
98 |
-DDEF_README_DIR=\\\"${READMEDIR}\\\" \ |
99 |
-DDEF_HTML_DIR=\\\"${READMEDIR}\\\" \ |
100 |
-DDEF_QUEUE_DIR=\\\"/var/spool/postfix\\\" \ |
101 |
-DDEF_DATA_DIR=\\\"/var/db/postfix\\\" \ |
102 |
-DDEF_MAIL_OWNER=\\\"postfix\\\" \ |
103 |
-DDEF_SGID_GROUP=\\\"maildrop\\\" \ |
104 |
-DALIAS_DB_MAP=\\\"hash:/etc/mail/aliases\\\" |
105 |
|
94 |
# Default requirement for postfix rc script |
106 |
# Default requirement for postfix rc script |
95 |
_REQUIRE= LOGIN cleanvar |
107 |
_REQUIRE= LOGIN cleanvar |
96 |
|
108 |
|
97 |
.if defined(WITH_PCRE) |
109 |
.if defined(WITH_PCRE) |
98 |
LIB_DEPENDS+= pcre.0:${PORTSDIR}/devel/pcre |
110 |
LIB_DEPENDS+= pcre.0:${PORTSDIR}/devel/pcre |
Lines 111-116
Link Here
|
111 |
.if defined(WITH_DOVECOT) |
123 |
.if defined(WITH_DOVECOT) |
112 |
RUN_DEPENDS+= dovecot:${PORTSDIR}/mail/dovecot |
124 |
RUN_DEPENDS+= dovecot:${PORTSDIR}/mail/dovecot |
113 |
POSTFIX_CCARGS+= -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\" |
125 |
POSTFIX_CCARGS+= -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\" |
|
|
126 |
_REQUIRE+= dovecot |
114 |
.endif |
127 |
.endif |
115 |
|
128 |
|
116 |
.if defined(WITH_SASLKRB) |
129 |
.if defined(WITH_SASLKRB) |
Lines 183-210
Link Here
|
183 |
.endif |
196 |
.endif |
184 |
|
197 |
|
185 |
.if defined(WITH_VDA) |
198 |
.if defined(WITH_VDA) |
186 |
IGNORE= wait for a new VDA patch that works with 2.6.0 |
199 |
IGNORE= wait for a new VDA patch that works with ${PORTVERSION} |
187 |
PATCH_SITES+= http://vda.sourceforge.net/VDA/ |
200 |
PATCH_SITES+= http://vda.sourceforge.net/VDA/ |
188 |
PATCHFILES+= postfix-2.5.6-vda-ng.patch.gz |
201 |
PATCHFILES+= postfix-${PORTVERSION}-vda-ng.patch.gz |
189 |
PATCH_DIST_STRIP= -p1 |
202 |
PATCH_DIST_STRIP= -p1 |
|
|
203 |
PLIST_SUB+= VDA="" |
204 |
.else |
205 |
PLIST_SUB+= VDA="@comment " |
190 |
.endif |
206 |
.endif |
191 |
|
207 |
|
192 |
.if defined(WITH_TEST) |
208 |
.if defined(WITH_TEST) |
193 |
BINTEST= qmqp-sink qmqp-source smtp-sink smtp-source |
209 |
BINTEST= qmqp-sink qmqp-source smtp-sink smtp-source |
194 |
MANTEST= qmqp-sink.1 qmqp-source.1 smtp-sink.1 smtp-source.1 |
210 |
MANTEST= qmqp-sink.1 qmqp-source.1 smtp-sink.1 smtp-source.1 |
195 |
MAN1+= ${MANTEST} |
211 |
MAN1+= ${MANTEST} |
196 |
PLIST_SUB+= SUB_TEST="" |
212 |
PLIST_SUB+= TEST="" |
197 |
.else |
213 |
.else |
198 |
PLIST_SUB+= SUB_TEST="@comment " |
214 |
PLIST_SUB+= TEST="@comment " |
199 |
.endif |
215 |
.endif |
200 |
|
216 |
|
201 |
.if defined(NOPORTDOCS) |
217 |
.if defined(NOPORTDOCS) |
202 |
READMEDIR=no |
218 |
READMEDIR=no |
203 |
.else |
219 |
.else |
204 |
READMEDIR=${PREFIX}/share/doc/postfix |
220 |
READMEDIR=${DOCSDIR} |
205 |
.endif |
221 |
.endif |
206 |
|
222 |
|
207 |
SUB_LIST+= REQUIRE="${_REQUIRE}" |
223 |
SUB_LIST+= REQUIRE="${_REQUIRE}" READMEDIR="${READMEDIR}" |
|
|
224 |
SUB_FILES+= pkg-install pkg-message |
225 |
|
226 |
# sed script for files in ${WRKSRC}/README_FILES ${WRKSRC}/conf ${WRKSRC}/man |
227 |
REINPLACE= s!^PATH=.*!PATH=/bin:/sbin:/usr/bin:/usr/sbin:${PREFIX}/bin:${PREFIX}/sbin!;\ |
228 |
s!(_directory = )/usr/!\1${PREFIX}/!g;\ |
229 |
s!^(data_directory = /var/)lib/!\1db/!g;\ |
230 |
s!^\#(mynetworks_style = host)!\1!g;\ |
231 |
s!^(sendmail_path =)!\1 ${PREFIX}/sbin/sendmail!g;\ |
232 |
s!^(newaliases_path =)!\1 ${PREFIX}/bin/newaliases!g;\ |
233 |
s!^(mailq_path =)!\1 ${PREFIX}/bin/mailq!g;\ |
234 |
s!^(setgid_group =)!\1 maildrop!g;\ |
235 |
s!^(manpage_directory =)!\1 ${PREFIX}/man!g;\ |
236 |
s!^(sample_directory =)!\1 ${EXAMPLESDIR}!g;\ |
237 |
s!^((html|readme)_directory =)!\1 ${READMEDIR}!g;\ |
238 |
\!^\#alias_database = dbm:/etc/mail/aliases$$!d;\ |
239 |
s!/etc/aliases!/etc/mail/aliases!g;\ |
240 |
s!(:|= )/etc/postfix!\1$$config_directory!g;\ |
241 |
s!/etc/postfix!${ETCDIR}!g; |
208 |
|
242 |
|
209 |
pre-patch: |
243 |
pre-patch: |
210 |
.if defined(POSTFIX_OPTIONS) |
244 |
.if defined(POSTFIX_OPTIONS) |
Lines 233-252
Link Here
|
233 |
fi |
267 |
fi |
234 |
.endif |
268 |
.endif |
235 |
|
269 |
|
236 |
@${ECHO} "<HTML><BODY>See <A HREF="header_checks.5.html">header_checks.5.html</A></BODY></HTML>" \ |
270 |
@${ECHO} '<HTML><BODY>See <A HREF="header_checks.5.html">header_checks.5.html</A></BODY></HTML>' \ |
237 |
> ${WRKSRC}/html/body_checks.5.html |
271 |
> ${WRKSRC}/html/body_checks.5.html |
238 |
@${FIND} -P ${WRKSRC}/man -type f | ${XARGS} \ |
272 |
@${REINPLACE_CMD} -E -e 's![[:<:]]perl[[:>:]]!${PERL}!' \ |
239 |
${REINPLACE_CMD} -e "s|/etc/postfix|${PREFIX}/etc/postfix|g" |
273 |
${WRKSRC}/src/bounce/Makefile.in |
240 |
@${FIND} -P ${WRKSRC}/README_FILES -type f | ${XARGS} \ |
274 |
@${REINPLACE_CMD} -E -e 's!^(#define DEF_SGID_GROUP[^"]+)"postdrop"$$!\1"maildrop"!' \ |
241 |
${REINPLACE_CMD} -e "s|/etc/postfix|${PREFIX}/etc/postfix|g" |
275 |
${WRKSRC}/src/global/mail_params.h |
242 |
@${FIND} -P ${WRKSRC}/conf -type f | ${XARGS} \ |
276 |
@${FIND} -X ${WRKSRC}/README_FILES ${WRKSRC}/conf ${WRKSRC}/man \ |
243 |
${REINPLACE_CMD} -e "s|/etc/postfix|${PREFIX}/etc/postfix|g" |
277 |
-type f -a ! \( -name INSTALL -o -name aliases \) | ${XARGS} \ |
|
|
278 |
${REINPLACE_CMD} -E -e '${REINPLACE}' |
244 |
|
279 |
|
245 |
post-patch: |
280 |
post-patch: |
246 |
# All files modified with ${FILESDIR}/patch-* to use !!PREFIX!! need REINPLACE. Put below. |
281 |
.if defined(WITH_VDA) |
247 |
@${REINPLACE_CMD} -e "s,!!PREFIX!!,${PREFIX},g" \ |
282 |
@${ECHO} '$$readme_directory/VDA_README:f:root:-:644' \ |
248 |
${WRKSRC}/conf/main.cf ${WRKSRC}/src/global/mail_params.h |
283 |
>> ${WRKSRC}/conf/postfix-files |
249 |
@${REINPLACE_CMD} -e "s|perl|${PERL}|" ${WRKSRC}/src/bounce/Makefile.in |
284 |
@${REINPLACE_CMD} -E -e '${REINPLACE}' \ |
|
|
285 |
${WRKSRC}/README_FILES/VDA_README |
286 |
.endif |
250 |
|
287 |
|
251 |
do-configure: |
288 |
do-configure: |
252 |
(cd ${WRKSRC} && ${MAKE} -f Makefile.init makefiles ${MAKEFILEFLAGS} \ |
289 |
(cd ${WRKSRC} && ${MAKE} -f Makefile.init makefiles ${MAKEFILEFLAGS} \ |
Lines 257-305
Link Here
|
257 |
@${SETENV} ${SCRIPTS_ENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL |
294 |
@${SETENV} ${SCRIPTS_ENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL |
258 |
|
295 |
|
259 |
do-install: |
296 |
do-install: |
260 |
cd ${WRKSRC}; ${SH} postfix-install -non-interactive install_root=/ tempdir=/tmp \ |
297 |
@cd ${WRKSRC} && ${SH} postfix-install -non-interactive install_root=/ tempdir=/tmp |
261 |
config_directory=${PREFIX}/etc/postfix \ |
|
|
262 |
data_directory=/var/db/postfix \ |
263 |
daemon_directory=${PREFIX}/libexec/postfix \ |
264 |
command_directory=${PREFIX}/sbin \ |
265 |
queue_directory=/var/spool/postfix \ |
266 |
sendmail_path=${PREFIX}/sbin/sendmail \ |
267 |
newaliases_path=${PREFIX}/bin/newaliases \ |
268 |
mailq_path=${PREFIX}/bin/mailq \ |
269 |
mail_owner=postfix \ |
270 |
setgid_group=maildrop \ |
271 |
manpage_directory=${MANPREFIX}/man \ |
272 |
sample_directory=${PREFIX}/etc/postfix \ |
273 |
readme_directory=${READMEDIR} |
274 |
|
275 |
${INSTALL_SCRIPT} ${WRKSRC}/auxiliary/rmail/rmail ${PREFIX}/bin/rmail |
298 |
${INSTALL_SCRIPT} ${WRKSRC}/auxiliary/rmail/rmail ${PREFIX}/bin/rmail |
276 |
|
|
|
277 |
${INSTALL_SCRIPT} ${WRKSRC}/auxiliary/qshape/qshape.pl ${PREFIX}/bin/qshape |
299 |
${INSTALL_SCRIPT} ${WRKSRC}/auxiliary/qshape/qshape.pl ${PREFIX}/bin/qshape |
278 |
${INSTALL_MAN} ${WRKSRC}/man/man1/qshape.1 ${MANPREFIX}/man/man1 |
300 |
${INSTALL_MAN} ${WRKSRC}/man/man1/qshape.1 ${MANPREFIX}/man/man1 |
279 |
|
|
|
280 |
.for f in ${BINTEST} |
301 |
.for f in ${BINTEST} |
281 |
${INSTALL_PROGRAM} ${WRKSRC}/bin/${f} ${PREFIX}/bin |
302 |
${INSTALL_PROGRAM} ${WRKSRC}/bin/${f} ${PREFIX}/bin |
282 |
.endfor |
303 |
.endfor |
283 |
.for f in ${MANTEST} |
304 |
.for f in ${MANTEST} |
284 |
${INSTALL_MAN} ${WRKSRC}/man/man1/${f} ${MANPREFIX}/man/man1 |
305 |
${INSTALL_MAN} ${WRKSRC}/man/man1/${f} ${MANPREFIX}/man/man1 |
285 |
.endfor |
306 |
.endfor |
286 |
|
|
|
287 |
@${MKDIR} ${PREFIX}/etc/postfix/dist |
288 |
.for f in ${CONF1} |
289 |
${INSTALL_DATA} ${WRKSRC}/conf/${f} ${PREFIX}/etc/postfix/dist |
290 |
.endfor |
291 |
|
292 |
.if !defined(NOPORTDOCS) |
307 |
.if !defined(NOPORTDOCS) |
293 |
${INSTALL} -d -o ${DOCOWN} -g ${DOCGRP} -m 555 ${DOCSDIR} |
308 |
${INSTALL} -o ${DOCOWN} -g ${DOCGRP} -m 555 -d ${DOCSDIR} |
294 |
@cd ${WRKSRC}/html && ${INSTALL_DATA} *.html *.jpg *.png ${DOCSDIR} && \ |
309 |
@cd ${WRKSRC}/html && ${INSTALL_DATA} *.html *.jpg *.png ${DOCSDIR} && \ |
295 |
${ECHO_MSG} "Installed HTML documentation in ${DOCSDIR}" |
310 |
${ECHO_MSG} "Installed HTML documentation in ${DOCSDIR}" |
296 |
.endif |
311 |
.endif |
|
|
312 |
.if !defined(NOPORTEXAMPLES) |
313 |
${INSTALL} -o ${SHAREOWN} -g ${SHAREGRP} -m 555 -d ${EXAMPLESDIR} |
314 |
.for f in ${PORTEXAMPLES} |
315 |
${INSTALL_DATA} ${WRKSRC}/conf/${f} ${EXAMPLESDIR} |
316 |
.endfor |
317 |
@${ECHO_MSG} "Installed configuration examples in ${EXAMPLESDIR}" |
318 |
.endif |
297 |
|
319 |
|
298 |
post-install: |
320 |
post-install: |
299 |
@${SETENV} ${SCRIPTS_ENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL |
321 |
@${SETENV} ${SCRIPTS_ENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL |
300 |
# Fix compressed man pages |
322 |
# Fix compressed man pages |
301 |
@${REINPLACE_CMD} -E -e "s|(man[158]/.*.[158]):|\1.gz:|g" ${PREFIX}/libexec/postfix/postfix-files |
323 |
@${REINPLACE_CMD} -i '' -E -e "s|(man[158]/.*.[158]):|\1.gz:|g" ${PREFIX}/libexec/postfix/postfix-files |
302 |
@${RM} -f ${PREFIX}/libexec/postfix/postfix-files.bak |
|
|
303 |
@${CAT} ${PKGMESSAGE} |
324 |
@${CAT} ${PKGMESSAGE} |
304 |
|
325 |
|
305 |
.include <bsd.port.post.mk> |
326 |
.include <bsd.port.post.mk> |