Gentoo Archives: gentoo-commits

From: Eray Aslan <eras@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: mail-mta/postfix/
Date: Tue, 29 Dec 2020 06:48:33
Message-Id: 1609224465.cb8eb53dc373aee4e2d942639190a74f162e72a9.eras@gentoo
1 commit: cb8eb53dc373aee4e2d942639190a74f162e72a9
2 Author: Eray Aslan <eras <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 29 06:47:45 2020 +0000
4 Commit: Eray Aslan <eras <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 29 06:47:45 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cb8eb53d
7
8 mail-mta/postfix: remove old
9
10 Package-Manager: Portage-3.0.12, Repoman-3.0.2
11 Signed-off-by: Eray Aslan <eras <AT> gentoo.org>
12
13 mail-mta/postfix/Manifest | 2 -
14 mail-mta/postfix/postfix-3.5.6.ebuild | 316 ----------------------------------
15 mail-mta/postfix/postfix-3.5.7.ebuild | 316 ----------------------------------
16 3 files changed, 634 deletions(-)
17
18 diff --git a/mail-mta/postfix/Manifest b/mail-mta/postfix/Manifest
19 index c839916999f..7c504bf2a15 100644
20 --- a/mail-mta/postfix/Manifest
21 +++ b/mail-mta/postfix/Manifest
22 @@ -1,4 +1,2 @@
23 -DIST postfix-3.5.6.tar.gz 4613310 BLAKE2B b7d236677cc698bb7028b39a25441c1163e65112573756da6c17b3ef64d0917f86fdcb96ab4a20f13ccee0381420301b57e1e41c3fad11d28c7ad70bd2e1f7e3 SHA512 9187981357a3861d735b8601c61851a5b9e53cde5668a0ebc62ca8b922a2629e53fe3369af6beb9df1a6fe6d4d87822d8882e27410a460ea8c98418b17287b9c
24 -DIST postfix-3.5.7.tar.gz 4613756 BLAKE2B 9fa7de3e6d7d20c549c6f26d77d9a0973e789f1b6650a13be08ddc35d047b0ba6e7e75dcb5749e0772cd1e821a9e2f40891c0422bc47a90be166cc937050bc52 SHA512 7828210bc9d3eadfd47f1121ae2f7ca057e03391048e8e79fbf2f96f6677f5e17145f5869d6f5c0b735ecd8584f420df7ba4922f54686f1a5be663bff257f2c2
25 DIST postfix-3.5.8.tar.gz 4614733 BLAKE2B 13166e854f70987f981bb5e7e5dabfaa73b3170ab16fc1ff8f70f6b98a0697ac980bdf74bbfb39fdfd1972f922a31a28882b1575b79fd8f01d81e08e68d756bc SHA512 0abb07d99e343b76e6a26b4a090af9d592f4dfd03c8c737cc72bfb0f4267dafcbb0cb0aa7b6255f8b834c9289d89a5c47b167be3758239309937cb77e0d9464b
26 DIST postfix-3.6-20201212.tar.gz 4683741 BLAKE2B 9c6f1e4488c955d5760cd921a546e2f2add363c70fbca7aede45721bfb16f00dc246ad887945054f0e047c49c17a5d4390a826ca4d357c452390e1da88366397 SHA512 2473a5542189a7973a8cdb767552c1cc819607674c0bf29358adef5fd8d7b19010bd4af62e24f061c5deed8feb787962f4827ceb6958bf93437f179332cdeb83
27
28 diff --git a/mail-mta/postfix/postfix-3.5.6.ebuild b/mail-mta/postfix/postfix-3.5.6.ebuild
29 deleted file mode 100644
30 index 646b4e9c086..00000000000
31 --- a/mail-mta/postfix/postfix-3.5.6.ebuild
32 +++ /dev/null
33 @@ -1,316 +0,0 @@
34 -# Copyright 1999-2020 Gentoo Authors
35 -# Distributed under the terms of the GNU General Public License v2
36 -
37 -EAPI=7
38 -
39 -inherit flag-o-matic pam systemd toolchain-funcs
40 -
41 -MY_PV="${PV/_rc/-RC}"
42 -MY_SRC="${PN}-${MY_PV}"
43 -MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/official"
44 -RC_VER="2.7"
45 -
46 -DESCRIPTION="A fast and secure drop-in replacement for sendmail"
47 -HOMEPAGE="http://www.postfix.org/"
48 -SRC_URI="${MY_URI}/${MY_SRC}.tar.gz"
49 -
50 -LICENSE="|| ( IBM EPL-2.0 )"
51 -SLOT="0"
52 -KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sparc x86"
53 -IUSE="+berkdb cdb dovecot-sasl +eai hardened ldap ldap-bind libressl lmdb memcached mbox mysql nis pam postgres sasl selinux sqlite ssl"
54 -
55 -DEPEND=">=dev-libs/libpcre-3.4
56 - dev-lang/perl
57 - berkdb? ( >=sys-libs/db-3.2:* )
58 - cdb? ( || ( >=dev-db/tinycdb-0.76 >=dev-db/cdb-0.75-r4 ) )
59 - eai? ( dev-libs/icu:= )
60 - ldap? ( net-nds/openldap )
61 - ldap-bind? ( net-nds/openldap[sasl] )
62 - lmdb? ( >=dev-db/lmdb-0.9.11 )
63 - mysql? ( dev-db/mysql-connector-c:0= )
64 - nis? ( net-libs/libnsl )
65 - pam? ( sys-libs/pam )
66 - postgres? ( dev-db/postgresql:* )
67 - sasl? ( >=dev-libs/cyrus-sasl-2 )
68 - sqlite? ( dev-db/sqlite:3 )
69 - ssl? (
70 - !libressl? ( dev-libs/openssl:0= )
71 - libressl? ( >=dev-libs/libressl-2.9.1:0= )
72 - )"
73 -
74 -RDEPEND="${DEPEND}
75 - acct-group/postfix
76 - acct-group/postdrop
77 - acct-user/postfix
78 - memcached? ( net-misc/memcached )
79 - net-mail/mailbase
80 - !mail-mta/courier
81 - !mail-mta/esmtp
82 - !mail-mta/exim
83 - !mail-mta/mini-qmail
84 - !mail-mta/msmtp[mta]
85 - !mail-mta/netqmail
86 - !mail-mta/nullmailer
87 - !mail-mta/qmail-ldap
88 - !mail-mta/sendmail
89 - !mail-mta/opensmtpd
90 - !mail-mta/ssmtp[mta]
91 - !net-mail/fastforward
92 - selinux? ( sec-policy/selinux-postfix )"
93 -
94 -REQUIRED_USE="ldap-bind? ( ldap sasl )"
95 -
96 -S="${WORKDIR}/${MY_SRC}"
97 -
98 -PATCHES=(
99 - "${FILESDIR}/${PN}-libressl-certkey.patch"
100 - "${FILESDIR}/${PN}-libressl-server.patch"
101 -)
102 -
103 -src_prepare() {
104 - default
105 - sed -i -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/mail/aliases|" \
106 - src/util/sys_defs.h || die "sed failed"
107 - # change default paths to better comply with portage standard paths
108 - sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || die "sed failed"
109 -}
110 -
111 -src_configure() {
112 - for name in CDB LDAP LMDB MYSQL PCRE PGSQL SDBM SQLITE
113 - do
114 - local AUXLIBS_${name}=""
115 - done
116 -
117 - # Make sure LDFLAGS get passed down to the executables.
118 - local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -ldl"
119 - AUXLIBS_PCRE="$(pcre-config --libs)"
120 -
121 - use pam && mylibs="${mylibs} -lpam"
122 -
123 - if use ldap; then
124 - mycc="${mycc} -DHAS_LDAP"
125 - AUXLIBS_LDAP="-lldap -llber"
126 - fi
127 -
128 - if use mysql; then
129 - mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)"
130 - AUXLIBS_MYSQL="$(mysql_config --libs)"
131 - fi
132 -
133 - if use postgres; then
134 - mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)"
135 - AUXLIBS_PGSQL="-L$(pg_config --libdir) -lpq"
136 - fi
137 -
138 - if use sqlite; then
139 - mycc="${mycc} -DHAS_SQLITE"
140 - AUXLIBS_SQLITE="-lsqlite3 -lpthread"
141 - fi
142 -
143 - if use ssl; then
144 - mycc="${mycc} -DUSE_TLS"
145 - mylibs="${mylibs} -lssl -lcrypto"
146 - fi
147 -
148 - if use lmdb; then
149 - mycc="${mycc} -DHAS_LMDB"
150 - AUXLIBS_LMDB="-llmdb -lpthread"
151 - fi
152 -
153 - if ! use eai; then
154 - mycc="${mycc} -DNO_EAI"
155 - fi
156 -
157 - # broken. and "in other words, not supported" by upstream.
158 - # Use inet_protocols setting in main.cf
159 - #if ! use ipv6; then
160 - # mycc="${mycc} -DNO_IPV6"
161 - #fi
162 -
163 - if use sasl; then
164 - if use dovecot-sasl; then
165 - # Set dovecot as default.
166 - mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\""
167 - fi
168 - if use ldap-bind; then
169 - mycc="${mycc} -DUSE_LDAP_SASL"
170 - fi
171 - mycc="${mycc} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl"
172 - mylibs="${mylibs} -lsasl2"
173 - elif use dovecot-sasl; then
174 - mycc="${mycc} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\""
175 - fi
176 -
177 - if ! use nis; then
178 - mycc="${mycc} -DNO_NIS"
179 - fi
180 -
181 - if ! use berkdb; then
182 - mycc="${mycc} -DNO_DB"
183 - if use cdb; then
184 - # change default hash format from Berkeley DB to cdb
185 - mycc="${mycc} -DDEF_DB_TYPE=\\\"cdb\\\""
186 - fi
187 - fi
188 -
189 - if use cdb; then
190 - mycc="${mycc} -DHAS_CDB -I/usr/include/cdb"
191 - # Tinycdb is preferred.
192 - if has_version dev-db/tinycdb ; then
193 - einfo "Building with dev-db/tinycdb"
194 - AUXLIBS_CDB="-lcdb"
195 - else
196 - einfo "Building with dev-db/cdb"
197 - CDB_PATH="/usr/$(get_libdir)"
198 - for i in cdb.a alloc.a buffer.a unix.a byte.a ; do
199 - AUXLIBS_CDB="${AUXLIBS_CDB} ${CDB_PATH}/${i}"
200 - done
201 - fi
202 - fi
203 -
204 - # Robin H. Johnson <robbat2@g.o> 17/Nov/2006
205 - # Fix because infra boxes hit 2Gb .db files that fail a 32-bit fstat signed check.
206 - mycc="${mycc} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
207 - filter-lfs-flags
208 -
209 - # Workaround for bug #76512
210 - if use hardened; then
211 - [[ "$(gcc-version)" == "3.4" ]] && replace-flags -O? -Os
212 - fi
213 -
214 - # Remove annoying C++ comment style warnings - bug #378099
215 - append-flags -Wno-comment
216 -
217 - sed -i -e "/^RANLIB/s/ranlib/$(tc-getRANLIB)/g" "${S}"/makedefs
218 - sed -i -e "/^AR/s/ar/$(tc-getAR)/g" "${S}"/makedefs
219 -
220 - emake makefiles shared=yes dynamicmaps=no pie=yes \
221 - shlib_directory="/usr/$(get_libdir)/postfix/MAIL_VERSION" \
222 - DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" \
223 - AUXLIBS_CDB="${AUXLIBS_CDB}" AUXLIBS_LDAP="${AUXLIBS_LDAP}" \
224 - AUXLIBS_LMDB="${AUXLIBS_LMDB}" AUXLIBS_MYSQL="${AUXLIBS_MYSQL}" \
225 - AUXLIBS_PCRE="${AUXLIBS_PCRE}" AUXLIBS_PGSQL="${AUXLIBS_PGSQL}" \
226 - AUXLIBS_SQLITE="${AUXLIBS_SQLITE}"
227 -}
228 -
229 -src_install() {
230 - LD_LIBRARY_PATH="${S}/lib" \
231 - /bin/sh postfix-install \
232 - -non-interactive \
233 - install_root="${D}" \
234 - config_directory="/etc/postfix" \
235 - manpage_directory="/usr/share/man" \
236 - command_directory="/usr/sbin" \
237 - mailq_path="/usr/bin/mailq" \
238 - newaliases_path="/usr/bin/newaliases" \
239 - sendmail_path="/usr/sbin/sendmail" \
240 - || die "postfix-install failed"
241 -
242 - # Fix spool removal on upgrade
243 - rm -Rf "${D}"/var
244 - keepdir /var/spool/postfix
245 -
246 - # Install rmail for UUCP, closes bug #19127
247 - dobin auxiliary/rmail/rmail
248 -
249 - # Provide another link for legacy FSH
250 - dosym ../sbin/sendmail /usr/$(get_libdir)/sendmail
251 -
252 - # Install qshape, posttls-finger and collate
253 - dobin auxiliary/qshape/qshape.pl
254 - doman man/man1/qshape.1
255 - dobin bin/posttls-finger
256 - doman man/man1/posttls-finger.1
257 - dobin auxiliary/collate/collate.pl
258 - newdoc auxiliary/collate/README README.collate
259 -
260 - # Performance tuning tools and their manuals
261 - dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink}
262 - doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1
263 -
264 - # Set proper permissions on required files/directories
265 - keepdir /var/lib/postfix
266 - fowners -R postfix:postfix /var/lib/postfix
267 - fperms 0750 /var/lib/postfix
268 - fowners root:postdrop /usr/sbin/post{drop,queue}
269 - fperms 02755 /usr/sbin/post{drop,queue}
270 -
271 - keepdir /etc/postfix
272 - keepdir /etc/postfix/postfix-files.d
273 - if use mbox; then
274 - mypostconf="mail_spool_directory=/var/spool/mail"
275 - else
276 - mypostconf="home_mailbox=.maildir/"
277 - fi
278 - LD_LIBRARY_PATH="${S}/lib" \
279 - "${D}"/usr/sbin/postconf -c "${D}"/etc/postfix \
280 - -e ${mypostconf} || die "postconf failed"
281 -
282 - insinto /etc/postfix
283 - newins "${FILESDIR}"/smtp.pass saslpass
284 - fperms 600 /etc/postfix/saslpass
285 -
286 - newinitd "${FILESDIR}"/postfix.rc6.${RC_VER} postfix
287 - # do not start mysql/postgres unnecessarily - bug #359913
288 - use mysql || sed -i -e "s/mysql //" "${D}/etc/init.d/postfix"
289 - use postgres || sed -i -e "s/postgresql //" "${D}/etc/init.d/postfix"
290 -
291 - dodoc *README COMPATIBILITY HISTORY PORTING RELEASE_NOTES*
292 - mv "${S}"/examples "${D}"/usr/share/doc/${PF}/
293 - # postfix set-permissions expects uncompressed man files
294 - docompress -x /usr/share/man
295 -
296 - pamd_mimic_system smtp auth account
297 -
298 - if use sasl; then
299 - insinto /etc/sasl2
300 - newins "${FILESDIR}"/smtp.sasl smtpd.conf
301 - fi
302 -
303 - # header files
304 - insinto /usr/include/postfix
305 - doins include/*.h
306 -
307 - if has_version mail-mta/postfix; then
308 - # let the sysadmin decide when to change the compatibility_level
309 - sed -i -e /^compatibility_level/"s/^/#/" "${D}"/etc/postfix/main.cf || die
310 - fi
311 -
312 - systemd_dounit "${FILESDIR}/${PN}.service"
313 -}
314 -
315 -pkg_preinst() {
316 - if has_version '<mail-mta/postfix-3.4'; then
317 - elog
318 - elog "Postfix-3.4 introduces a new master.cf service 'postlog'"
319 - elog "with type 'unix-dgram' that is used by the new postlogd(8) daemon."
320 - elog "Before backing out to an older Postfix version, edit the master.cf"
321 - elog "file and remove the postlog entry."
322 - elog
323 - fi
324 -}
325 -
326 -pkg_postinst() {
327 - if [[ ! -e /etc/mail/aliases.db ]] ; then
328 - ewarn
329 - ewarn "You must edit /etc/mail/aliases to suit your needs"
330 - ewarn "and then run /usr/bin/newaliases. Postfix will not"
331 - ewarn "work correctly without it."
332 - ewarn
333 - fi
334 -
335 - # check and fix file permissions
336 - "${EROOT}"/usr/sbin/postfix set-permissions
337 -
338 - # configure tls
339 - if use ssl ; then
340 - if "${EROOT}"/usr/sbin/postfix tls all-default-client; then
341 - elog "To configure client side TLS settings:"
342 - elog "${EROOT}"/usr/sbin/postfix tls enable-client
343 - fi
344 - if "${EROOT}"/usr/sbin/postfix tls all-default-server; then
345 - elog "To configure server side TLS settings:"
346 - elog "${EROOT}"/usr/sbin/postfix tls enable-server
347 - fi
348 - fi
349 -}
350
351 diff --git a/mail-mta/postfix/postfix-3.5.7.ebuild b/mail-mta/postfix/postfix-3.5.7.ebuild
352 deleted file mode 100644
353 index 31581e48a3d..00000000000
354 --- a/mail-mta/postfix/postfix-3.5.7.ebuild
355 +++ /dev/null
356 @@ -1,316 +0,0 @@
357 -# Copyright 1999-2020 Gentoo Authors
358 -# Distributed under the terms of the GNU General Public License v2
359 -
360 -EAPI=7
361 -
362 -inherit flag-o-matic pam systemd toolchain-funcs
363 -
364 -MY_PV="${PV/_rc/-RC}"
365 -MY_SRC="${PN}-${MY_PV}"
366 -MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/official"
367 -RC_VER="2.7"
368 -
369 -DESCRIPTION="A fast and secure drop-in replacement for sendmail"
370 -HOMEPAGE="http://www.postfix.org/"
371 -SRC_URI="${MY_URI}/${MY_SRC}.tar.gz"
372 -
373 -LICENSE="|| ( IBM EPL-2.0 )"
374 -SLOT="0"
375 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
376 -IUSE="+berkdb cdb dovecot-sasl +eai hardened ldap ldap-bind libressl lmdb memcached mbox mysql nis pam postgres sasl selinux sqlite ssl"
377 -
378 -DEPEND=">=dev-libs/libpcre-3.4
379 - dev-lang/perl
380 - berkdb? ( >=sys-libs/db-3.2:* )
381 - cdb? ( || ( >=dev-db/tinycdb-0.76 >=dev-db/cdb-0.75-r4 ) )
382 - eai? ( dev-libs/icu:= )
383 - ldap? ( net-nds/openldap )
384 - ldap-bind? ( net-nds/openldap[sasl] )
385 - lmdb? ( >=dev-db/lmdb-0.9.11 )
386 - mysql? ( dev-db/mysql-connector-c:0= )
387 - nis? ( net-libs/libnsl )
388 - pam? ( sys-libs/pam )
389 - postgres? ( dev-db/postgresql:* )
390 - sasl? ( >=dev-libs/cyrus-sasl-2 )
391 - sqlite? ( dev-db/sqlite:3 )
392 - ssl? (
393 - !libressl? ( dev-libs/openssl:0= )
394 - libressl? ( >=dev-libs/libressl-2.9.1:0= )
395 - )"
396 -
397 -RDEPEND="${DEPEND}
398 - acct-group/postfix
399 - acct-group/postdrop
400 - acct-user/postfix
401 - memcached? ( net-misc/memcached )
402 - net-mail/mailbase
403 - !mail-mta/courier
404 - !mail-mta/esmtp
405 - !mail-mta/exim
406 - !mail-mta/mini-qmail
407 - !mail-mta/msmtp[mta]
408 - !mail-mta/netqmail
409 - !mail-mta/nullmailer
410 - !mail-mta/qmail-ldap
411 - !mail-mta/sendmail
412 - !mail-mta/opensmtpd
413 - !mail-mta/ssmtp[mta]
414 - !net-mail/fastforward
415 - selinux? ( sec-policy/selinux-postfix )"
416 -
417 -REQUIRED_USE="ldap-bind? ( ldap sasl )"
418 -
419 -S="${WORKDIR}/${MY_SRC}"
420 -
421 -PATCHES=(
422 - "${FILESDIR}/${PN}-libressl-certkey.patch"
423 - "${FILESDIR}/${PN}-libressl-server.patch"
424 -)
425 -
426 -src_prepare() {
427 - default
428 - sed -i -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/mail/aliases|" \
429 - src/util/sys_defs.h || die "sed failed"
430 - # change default paths to better comply with portage standard paths
431 - sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || die "sed failed"
432 -}
433 -
434 -src_configure() {
435 - for name in CDB LDAP LMDB MYSQL PCRE PGSQL SDBM SQLITE
436 - do
437 - local AUXLIBS_${name}=""
438 - done
439 -
440 - # Make sure LDFLAGS get passed down to the executables.
441 - local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -ldl"
442 - AUXLIBS_PCRE="$(pcre-config --libs)"
443 -
444 - use pam && mylibs="${mylibs} -lpam"
445 -
446 - if use ldap; then
447 - mycc="${mycc} -DHAS_LDAP"
448 - AUXLIBS_LDAP="-lldap -llber"
449 - fi
450 -
451 - if use mysql; then
452 - mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)"
453 - AUXLIBS_MYSQL="$(mysql_config --libs)"
454 - fi
455 -
456 - if use postgres; then
457 - mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)"
458 - AUXLIBS_PGSQL="-L$(pg_config --libdir) -lpq"
459 - fi
460 -
461 - if use sqlite; then
462 - mycc="${mycc} -DHAS_SQLITE"
463 - AUXLIBS_SQLITE="-lsqlite3 -lpthread"
464 - fi
465 -
466 - if use ssl; then
467 - mycc="${mycc} -DUSE_TLS"
468 - mylibs="${mylibs} -lssl -lcrypto"
469 - fi
470 -
471 - if use lmdb; then
472 - mycc="${mycc} -DHAS_LMDB"
473 - AUXLIBS_LMDB="-llmdb -lpthread"
474 - fi
475 -
476 - if ! use eai; then
477 - mycc="${mycc} -DNO_EAI"
478 - fi
479 -
480 - # broken. and "in other words, not supported" by upstream.
481 - # Use inet_protocols setting in main.cf
482 - #if ! use ipv6; then
483 - # mycc="${mycc} -DNO_IPV6"
484 - #fi
485 -
486 - if use sasl; then
487 - if use dovecot-sasl; then
488 - # Set dovecot as default.
489 - mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\""
490 - fi
491 - if use ldap-bind; then
492 - mycc="${mycc} -DUSE_LDAP_SASL"
493 - fi
494 - mycc="${mycc} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl"
495 - mylibs="${mylibs} -lsasl2"
496 - elif use dovecot-sasl; then
497 - mycc="${mycc} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\""
498 - fi
499 -
500 - if ! use nis; then
501 - mycc="${mycc} -DNO_NIS"
502 - fi
503 -
504 - if ! use berkdb; then
505 - mycc="${mycc} -DNO_DB"
506 - if use cdb; then
507 - # change default hash format from Berkeley DB to cdb
508 - mycc="${mycc} -DDEF_DB_TYPE=\\\"cdb\\\""
509 - fi
510 - fi
511 -
512 - if use cdb; then
513 - mycc="${mycc} -DHAS_CDB -I/usr/include/cdb"
514 - # Tinycdb is preferred.
515 - if has_version dev-db/tinycdb ; then
516 - einfo "Building with dev-db/tinycdb"
517 - AUXLIBS_CDB="-lcdb"
518 - else
519 - einfo "Building with dev-db/cdb"
520 - CDB_PATH="/usr/$(get_libdir)"
521 - for i in cdb.a alloc.a buffer.a unix.a byte.a ; do
522 - AUXLIBS_CDB="${AUXLIBS_CDB} ${CDB_PATH}/${i}"
523 - done
524 - fi
525 - fi
526 -
527 - # Robin H. Johnson <robbat2@g.o> 17/Nov/2006
528 - # Fix because infra boxes hit 2Gb .db files that fail a 32-bit fstat signed check.
529 - mycc="${mycc} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
530 - filter-lfs-flags
531 -
532 - # Workaround for bug #76512
533 - if use hardened; then
534 - [[ "$(gcc-version)" == "3.4" ]] && replace-flags -O? -Os
535 - fi
536 -
537 - # Remove annoying C++ comment style warnings - bug #378099
538 - append-flags -Wno-comment
539 -
540 - sed -i -e "/^RANLIB/s/ranlib/$(tc-getRANLIB)/g" "${S}"/makedefs
541 - sed -i -e "/^AR/s/ar/$(tc-getAR)/g" "${S}"/makedefs
542 -
543 - emake makefiles shared=yes dynamicmaps=no pie=yes \
544 - shlib_directory="/usr/$(get_libdir)/postfix/MAIL_VERSION" \
545 - DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" \
546 - AUXLIBS_CDB="${AUXLIBS_CDB}" AUXLIBS_LDAP="${AUXLIBS_LDAP}" \
547 - AUXLIBS_LMDB="${AUXLIBS_LMDB}" AUXLIBS_MYSQL="${AUXLIBS_MYSQL}" \
548 - AUXLIBS_PCRE="${AUXLIBS_PCRE}" AUXLIBS_PGSQL="${AUXLIBS_PGSQL}" \
549 - AUXLIBS_SQLITE="${AUXLIBS_SQLITE}"
550 -}
551 -
552 -src_install() {
553 - LD_LIBRARY_PATH="${S}/lib" \
554 - /bin/sh postfix-install \
555 - -non-interactive \
556 - install_root="${D}" \
557 - config_directory="/etc/postfix" \
558 - manpage_directory="/usr/share/man" \
559 - command_directory="/usr/sbin" \
560 - mailq_path="/usr/bin/mailq" \
561 - newaliases_path="/usr/bin/newaliases" \
562 - sendmail_path="/usr/sbin/sendmail" \
563 - || die "postfix-install failed"
564 -
565 - # Fix spool removal on upgrade
566 - rm -Rf "${D}"/var
567 - keepdir /var/spool/postfix
568 -
569 - # Install rmail for UUCP, closes bug #19127
570 - dobin auxiliary/rmail/rmail
571 -
572 - # Provide another link for legacy FSH
573 - dosym ../sbin/sendmail /usr/$(get_libdir)/sendmail
574 -
575 - # Install qshape, posttls-finger and collate
576 - dobin auxiliary/qshape/qshape.pl
577 - doman man/man1/qshape.1
578 - dobin bin/posttls-finger
579 - doman man/man1/posttls-finger.1
580 - dobin auxiliary/collate/collate.pl
581 - newdoc auxiliary/collate/README README.collate
582 -
583 - # Performance tuning tools and their manuals
584 - dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink}
585 - doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1
586 -
587 - # Set proper permissions on required files/directories
588 - keepdir /var/lib/postfix
589 - fowners -R postfix:postfix /var/lib/postfix
590 - fperms 0750 /var/lib/postfix
591 - fowners root:postdrop /usr/sbin/post{drop,queue}
592 - fperms 02755 /usr/sbin/post{drop,queue}
593 -
594 - keepdir /etc/postfix
595 - keepdir /etc/postfix/postfix-files.d
596 - if use mbox; then
597 - mypostconf="mail_spool_directory=/var/spool/mail"
598 - else
599 - mypostconf="home_mailbox=.maildir/"
600 - fi
601 - LD_LIBRARY_PATH="${S}/lib" \
602 - "${D}"/usr/sbin/postconf -c "${D}"/etc/postfix \
603 - -e ${mypostconf} || die "postconf failed"
604 -
605 - insinto /etc/postfix
606 - newins "${FILESDIR}"/smtp.pass saslpass
607 - fperms 600 /etc/postfix/saslpass
608 -
609 - newinitd "${FILESDIR}"/postfix.rc6.${RC_VER} postfix
610 - # do not start mysql/postgres unnecessarily - bug #359913
611 - use mysql || sed -i -e "s/mysql //" "${D}/etc/init.d/postfix"
612 - use postgres || sed -i -e "s/postgresql //" "${D}/etc/init.d/postfix"
613 -
614 - dodoc *README COMPATIBILITY HISTORY PORTING RELEASE_NOTES*
615 - mv "${S}"/examples "${D}"/usr/share/doc/${PF}/
616 - # postfix set-permissions expects uncompressed man files
617 - docompress -x /usr/share/man
618 -
619 - pamd_mimic_system smtp auth account
620 -
621 - if use sasl; then
622 - insinto /etc/sasl2
623 - newins "${FILESDIR}"/smtp.sasl smtpd.conf
624 - fi
625 -
626 - # header files
627 - insinto /usr/include/postfix
628 - doins include/*.h
629 -
630 - if has_version mail-mta/postfix; then
631 - # let the sysadmin decide when to change the compatibility_level
632 - sed -i -e /^compatibility_level/"s/^/#/" "${D}"/etc/postfix/main.cf || die
633 - fi
634 -
635 - systemd_dounit "${FILESDIR}/${PN}.service"
636 -}
637 -
638 -pkg_preinst() {
639 - if has_version '<mail-mta/postfix-3.4'; then
640 - elog
641 - elog "Postfix-3.4 introduces a new master.cf service 'postlog'"
642 - elog "with type 'unix-dgram' that is used by the new postlogd(8) daemon."
643 - elog "Before backing out to an older Postfix version, edit the master.cf"
644 - elog "file and remove the postlog entry."
645 - elog
646 - fi
647 -}
648 -
649 -pkg_postinst() {
650 - if [[ ! -e /etc/mail/aliases.db ]] ; then
651 - ewarn
652 - ewarn "You must edit /etc/mail/aliases to suit your needs"
653 - ewarn "and then run /usr/bin/newaliases. Postfix will not"
654 - ewarn "work correctly without it."
655 - ewarn
656 - fi
657 -
658 - # check and fix file permissions
659 - "${EROOT}"/usr/sbin/postfix set-permissions
660 -
661 - # configure tls
662 - if use ssl ; then
663 - if "${EROOT}"/usr/sbin/postfix tls all-default-client; then
664 - elog "To configure client side TLS settings:"
665 - elog "${EROOT}"/usr/sbin/postfix tls enable-client
666 - fi
667 - if "${EROOT}"/usr/sbin/postfix tls all-default-server; then
668 - elog "To configure server side TLS settings:"
669 - elog "${EROOT}"/usr/sbin/postfix tls enable-server
670 - fi
671 - fi
672 -}