|
Lines 25-36
Link Here
|
| 25 |
.endif |
25 |
.endif |
| 26 |
|
26 |
|
| 27 |
.if defined(CC) |
27 |
.if defined(CC) |
| 28 |
MAKEFILEFLAGS+= CC=$(CC) |
28 |
MAKEFILEFLAGS+= CC=${CC} |
| 29 |
.endif |
29 |
.endif |
| 30 |
|
30 |
|
| 31 |
.if defined(OPT) |
31 |
MAKEFILEFLAGS+= OPT="${CFLAGS}" |
| 32 |
MAKEFILEFLAGS+= OPT=$(OPT) |
|
|
| 33 |
.endif |
| 34 |
|
32 |
|
| 35 |
.if defined(WITH_MYSQL) |
33 |
.if defined(WITH_MYSQL) |
| 36 |
BUILD_DEPENDS+= ${LOCALBASE}/lib/mysql/libmysqlclient.a:${PORTSDIR}/databases/mysql322-client |
34 |
BUILD_DEPENDS+= ${LOCALBASE}/lib/mysql/libmysqlclient.a:${PORTSDIR}/databases/mysql322-client |
|
Lines 56-61
Link Here
|
| 56 |
POSTFIX_AUXLIBS+= ${LOCALBASE}/lib/libsasl.a -lpam -lcrypt |
54 |
POSTFIX_AUXLIBS+= ${LOCALBASE}/lib/libsasl.a -lpam -lcrypt |
| 57 |
.endif |
55 |
.endif |
| 58 |
|
56 |
|
|
|
57 |
CONF1= access aliases canonical main.cf master.cf \ |
| 58 |
regexp_table relocated transport virtual |
| 59 |
|
| 60 |
CONF2= sample-aliases.cf sample-canonical.cf sample-debug.cf \ |
| 61 |
sample-filter.cf sample-local.cf sample-misc.cf \ |
| 62 |
sample-rate.cf sample-regexp.cf sample-relocated.cf \ |
| 63 |
sample-resource.cf sample-rewrite.cf sample-smtp.cf \ |
| 64 |
sample-smtpd.cf sample-transport.cf sample-virtual.cf |
| 65 |
|
| 66 |
BIN1= bounce cleanup error lmtp local master nqmgr pickup \ |
| 67 |
pipe qmgr showq smtp smtpd trivial-rewrite |
| 68 |
|
| 69 |
BIN2= postalias postcat postconf postdrop postfix \ |
| 70 |
postkick postlog postmap postsuper sendmail |
| 71 |
|
| 59 |
MAN1= mailq.1 newaliases.1 postalias.1 postcat.1 postconf.1 postdrop.1 \ |
72 |
MAN1= mailq.1 newaliases.1 postalias.1 postcat.1 postconf.1 postdrop.1 \ |
| 60 |
postfix.1 postkick.1 postlock.1 postlog.1 postmap.1 postsuper.1 \ |
73 |
postfix.1 postkick.1 postlock.1 postlog.1 postmap.1 postsuper.1 \ |
| 61 |
sendmail.1 |
74 |
sendmail.1 |
|
Lines 63-74
Link Here
|
| 63 |
MAN5= access.5 aliases.5 canonical.5 regexp_table.5 relocated.5 \ |
76 |
MAN5= access.5 aliases.5 canonical.5 regexp_table.5 relocated.5 \ |
| 64 |
transport.5 virtual.5 |
77 |
transport.5 virtual.5 |
| 65 |
|
78 |
|
|
|
79 |
MAN8= bounce.8 cleanup.8 defer.8 error.8 lmtp.8 local.8 master.8 \ |
| 80 |
pickup.8 pipe.8 qmgr.8 showq.8 smtp.8 smtpd.8 trivial-rewrite.8 |
| 81 |
|
| 66 |
.ifdef(WITH_PCRE) |
82 |
.ifdef(WITH_PCRE) |
| 67 |
MAN5+= pcre_table.5 |
83 |
CONF1+= pcre_table |
|
|
84 |
CONF2+= sample-pcre.cf |
| 85 |
MAN5+= pcre_table.5 |
| 86 |
PLIST_SUB+= WITH_PCRE="" |
| 87 |
.else |
| 88 |
PLIST_SUB+= WITH_PCRE="@comment " |
| 68 |
.endif |
89 |
.endif |
| 69 |
|
90 |
|
| 70 |
MAN8= bounce.8 cleanup.8 defer.8 error.8 lmtp.8 local.8 master.8 \ |
91 |
.ifdef(WITH_SASL) |
| 71 |
pickup.8 pipe.8 qmgr.8 showq.8 smtp.8 smtpd.8 trivial-rewrite.8 |
92 |
CONF2+= sample-auth.cf |
|
|
93 |
PLIST_SUB+= WITH_SASL="" |
| 94 |
.else |
| 95 |
PLIST_SUB+= WITH_SASL="@comment " |
| 96 |
.endif |
| 97 |
|
| 98 |
.ifdef(WITH_LDAP) |
| 99 |
CONF2+= sample-ldap.cf |
| 100 |
PLIST_SUB+= WITH_LDAP="" |
| 101 |
.else |
| 102 |
PLIST_SUB+= WITH_LDAP="@comment " |
| 103 |
.endif |
| 104 |
|
| 105 |
DOCDIR= ${PREFIX}/share/doc/postfix |
| 72 |
|
106 |
|
| 73 |
post-patch: |
107 |
post-patch: |
| 74 |
(cd ${WRKSRC} && make -f Makefile.init makefiles ${MAKEFILEFLAGS} \ |
108 |
(cd ${WRKSRC} && make -f Makefile.init makefiles ${MAKEFILEFLAGS} \ |
|
Lines 76-180
Link Here
|
| 76 |
${ECHO} "all: default" >> Makefile) |
110 |
${ECHO} "all: default" >> Makefile) |
| 77 |
|
111 |
|
| 78 |
pre-install: |
112 |
pre-install: |
| 79 |
@/bin/sh @${PKGDIR}/INSTALL Postfix PRE-INSTALL |
113 |
@PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} PRE-INSTALL |
| 80 |
|
|
|
| 81 |
do-install: |
| 82 |
@${MKDIR} -m 755 ${PREFIX}/etc/postfix |
| 83 |
@${CHOWN} root:wheel ${PREFIX}/etc/postfix |
| 84 |
@${INSTALL} -C -o root -g wheel -m 0644 ${WRKSRC}/conf/LICENSE \ |
| 85 |
${PREFIX}/etc/postfix/LICENSE |
| 86 |
|
| 87 |
@for f in access aliases canonical main.cf master.cf \ |
| 88 |
regexp_table relocated transport virtual ; do \ |
| 89 |
${INSTALL} -C -o root -g wheel -m 0644 \ |
| 90 |
${WRKSRC}/conf/$$f ${PREFIX}/etc/postfix/sample-$$f ; \ |
| 91 |
done |
| 92 |
|
| 93 |
.if defined(WITH_PCRE) |
| 94 |
@${INSTALL} -C -o root -g wheel -m 0644 ${WRKSRC}/conf/pcre_table \ |
| 95 |
${PREFIX}/etc/postfix/sample-pcre_table |
| 96 |
.endif |
| 97 |
|
| 98 |
@for f in sample-aliases.cf sample-canonical.cf \ |
| 99 |
sample-debug.cf sample-filter.cf sample-ldap.cf \ |
| 100 |
sample-local.cf sample-misc.cf sample-rate.cf \ |
| 101 |
sample-regexp.cf sample-relocated.cf sample-resource.cf \ |
| 102 |
sample-rewrite.cf sample-smtp.cf sample-smtpd.cf \ |
| 103 |
sample-transport.cf sample-virtual.cf ; do \ |
| 104 |
${INSTALL} -C -o root -g wheel -m 0644 \ |
| 105 |
${WRKSRC}/conf/$$f ${PREFIX}/etc/postfix/$$f ; \ |
| 106 |
done |
| 107 |
|
114 |
|
| 108 |
.if defined(WITH_PCRE) |
115 |
post-install: |
| 109 |
@${INSTALL} -C -o root -g wheel -m 0644 \ |
116 |
@PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL |
| 110 |
${WRKSRC}/conf/sample-pcre.cf \ |
|
|
| 111 |
${PREFIX}/etc/postfix/sample-pcre.cf |
| 112 |
.endif |
| 113 |
|
117 |
|
| 114 |
.if defined(WITH_SASL) |
118 |
do-install: |
| 115 |
@${INSTALL} -C -o root -g wheel -m 0644 \ |
119 |
@${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 0755 \ |
| 116 |
${WRKSRC}/conf/sample-auth.cf \ |
120 |
${PREFIX}/etc/postfix \ |
| 117 |
${PREFIX}/etc/postfix/sample-auth.cf |
121 |
${PREFIX}/libexec/postfix \ |
| 118 |
.endif |
122 |
/var/spool/postfix |
| 119 |
|
123 |
@${INSTALL_DATA} ${WRKSRC}/conf/LICENSE ${PREFIX}/etc/postfix |
| 120 |
@${MKDIR} -m 755 ${PREFIX}/libexec/postfix |
124 |
|
| 121 |
@${CHOWN} root:wheel ${PREFIX}/libexec/postfix |
125 |
.for file in ${CONF1} |
| 122 |
|
126 |
@${INSTALL_DATA} \ |
| 123 |
@for f in bounce cleanup error lmtp local master nqmgr pickup \ |
127 |
${WRKSRC}/conf/${file} \ |
| 124 |
pipe qmgr showq smtp smtpd trivial-rewrite ; do \ |
128 |
${PREFIX}/etc/postfix/sample-${file} |
| 125 |
${INSTALL} -C -o root -g wheel -m 0755 \ |
129 |
.endfor |
| 126 |
${WRKSRC}/libexec/$$f \ |
130 |
|
| 127 |
${PREFIX}/libexec/postfix/$$f ; \ |
131 |
.for file in ${CONF2} |
| 128 |
done |
132 |
@${INSTALL_DATA} \ |
| 129 |
|
133 |
${WRKSRC}/conf/${file} \ |
| 130 |
@for f in postalias postcat postconf postfix postkick postlog \ |
134 |
${PREFIX}/etc/postfix |
| 131 |
postmap postsuper sendmail ; do \ |
135 |
.endfor |
| 132 |
${INSTALL} -C -o root -g wheel -m 0755 \ |
136 |
|
| 133 |
${WRKSRC}/$$f/$$f ${PREFIX}/sbin/$$f ; \ |
137 |
@${INSTALL_SCRIPT} \ |
| 134 |
done |
138 |
${WRKSRC}/conf/postfix-script-sgid \ |
| 135 |
|
139 |
${PREFIX}/etc/postfix/postfix-script |
| 136 |
@${INSTALL} -C -o root -g maildrop -m 2755 \ |
140 |
|
| 137 |
${WRKSRC}/postdrop/postdrop ${PREFIX}/sbin/postdrop |
141 |
.for file in ${BIN1} |
| 138 |
|
142 |
@${INSTALL_PROGRAM} \ |
| 139 |
@for f in ${MAN1} ; do \ |
143 |
${WRKSRC}/libexec/${file} \ |
| 140 |
${INSTALL} -C -o root -g wheel -m 0644 \ |
144 |
${PREFIX}/libexec/postfix |
| 141 |
${WRKSRC}/man/man1/$$f ${PREFIX}/man/man1/$$f ; \ |
145 |
.endfor |
| 142 |
done |
146 |
|
| 143 |
|
147 |
.for file in ${BIN2} |
| 144 |
@for f in ${MAN5} ; do \ |
148 |
@${INSTALL_PROGRAM} \ |
| 145 |
${INSTALL} -C -o root -g wheel -m 0644 \ |
149 |
${WRKSRC}/${file}/${file} \ |
| 146 |
${WRKSRC}/man/man5/$$f ${PREFIX}/man/man5/$$f ; \ |
150 |
${PREFIX}/sbin |
| 147 |
done |
151 |
.endfor |
| 148 |
|
152 |
|
| 149 |
@for f in ${MAN8} ; do \ |
153 |
.for file in ${MAN1} |
| 150 |
${INSTALL} -C -o root -g wheel -m 0644 \ |
154 |
@${INSTALL_MAN} \ |
| 151 |
${WRKSRC}/man/man8/$$f ${PREFIX}/man/man8/$$f ; \ |
155 |
${WRKSRC}/man/man1/${file} \ |
| 152 |
done |
156 |
${PREFIX}/man/man1 |
| 153 |
|
157 |
.endfor |
| 154 |
@${MKDIR} -m 755 /var/spool/postfix |
158 |
|
| 155 |
@${CHOWN} root:wheel /var/spool/postfix |
159 |
.for file in ${MAN5} |
| 156 |
|
160 |
@${INSTALL_MAN} \ |
| 157 |
@${MKDIR} -m 755 ${PREFIX}/share/doc/postfix |
161 |
${WRKSRC}/man/man5/${file} \ |
| 158 |
@${INSTALL} -d -m 555 -o root -g wheel ${PREFIX}/share/doc/postfix |
162 |
${PREFIX}/man/man5 |
| 159 |
@cd ${WRKSRC} && ${INSTALL_DATA} \ |
163 |
.endfor |
| 160 |
html/*.html html/*.gif ${PREFIX}/share/doc && \ |
164 |
|
| 161 |
${ECHO_MSG} "Installed HTML documentation in ${PREFIX}/share/doc" |
165 |
.for file in ${MAN8} |
| 162 |
|
166 |
@${INSTALL_MAN} \ |
| 163 |
@${ECHO_MSG} "--------------------------------------------------" |
167 |
${WRKSRC}/man/man8/${file} \ |
| 164 |
@${ECHO_MSG} "- To replace your existing sendmail with postfix -" |
168 |
${PREFIX}/man/man8 |
| 165 |
@${ECHO_MSG} "- type \"make replace\" -" |
169 |
.endfor |
| 166 |
@${ECHO_MSG} "--------------------------------------------------" |
170 |
|
|
|
171 |
.if !defined(NOPORTDOCS) |
| 172 |
@${INSTALL} -d -o ${DOCOWN} -g ${DOCGRP} -m 555 ${DOCDIR} |
| 173 |
@cd ${WRKSRC}/html && ${INSTALL_DATA} *.html *.gif ${DOCDIR} && \ |
| 174 |
${ECHO_MSG} "Installed HTML documentation in ${DOCDIR}" |
| 175 |
.endif |
| 176 |
|
| 177 |
@${ECHO_MSG} '--------------------------------------------------' |
| 178 |
@${ECHO_MSG} '- To replace your existing sendmail with postfix -' |
| 179 |
@${ECHO_MSG} '- type "make replace" -' |
| 180 |
@${ECHO_MSG} '--------------------------------------------------' |
| 167 |
|
181 |
|
| 168 |
.include <bsd.port.pre.mk> |
182 |
.include <bsd.port.pre.mk> |
| 169 |
|
183 |
|
| 170 |
replace: |
184 |
replace: |
| 171 |
.if ${OSVERSION} >= 400014 |
185 |
.if ${OSVERSION} >= 400014 |
| 172 |
@${ECHO_MSG} "===> Activating postfix in /etc/mail/mailer.conf" |
186 |
@${ECHO_MSG} "===> Activating postfix in /etc/mail/mailer.conf" |
| 173 |
${MV} -f /etc/mail/mailer.conf /etc/mail/mailer.conf.bak |
187 |
${MV} -f /etc/mail/mailer.conf /etc/mail/mailer.conf.bak |
| 174 |
${ECHO} 'sendmail ${PREFIX}/sbin/sendmail' > /etc/mail/mailer.conf |
188 |
${ECHO} "#" > /etc/mail/mailer.conf |
| 175 |
${ECHO} 'send-mail ${PREFIX}/sbin/sendmail' >>/etc/mail/mailer.conf |
189 |
${ECHO} -n "# Execute the Postfix sendmail program" >> /etc/mail/mailer.conf |
| 176 |
${ECHO} 'mailq ${PREFIX}/sbin/sendmail' >>/etc/mail/mailer.conf |
190 |
${ECHO} ", named /usr/local/sbin/sendmail" >> /etc/mail/mailer.conf |
| 177 |
${ECHO} 'newaliases ${PREFIX}/sbin/sendmail' >>/etc/mail/mailer.conf |
191 |
${ECHO} "#" >> /etc/mail/mailer.conf |
|
|
192 |
${ECHO} "sendmail ${PREFIX}/sbin/sendmail" >>/etc/mail/mailer.conf |
| 193 |
${ECHO} "send-mail ${PREFIX}/sbin/sendmail" >>/etc/mail/mailer.conf |
| 194 |
${ECHO} "mailq ${PREFIX}/sbin/sendmail" >>/etc/mail/mailer.conf |
| 195 |
${ECHO} "newaliases ${PREFIX}/sbin/sendmail" >>/etc/mail/mailer.conf |
| 178 |
.else |
196 |
.else |
| 179 |
@${ECHO_MSG} "===> Replacing sendmail" |
197 |
@${ECHO_MSG} "===> Replacing sendmail" |
| 180 |
@if [ -e /usr/sbin/sendmail ]; then \ |
198 |
@if [ -e /usr/sbin/sendmail ]; then \ |