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: Mon, 11 Jun 2018 10:15:35
Message-Id: 1528712126.bcde888f2a0ea33ba1d8f604fd1fc73024c7daca.eras@gentoo
1 commit: bcde888f2a0ea33ba1d8f604fd1fc73024c7daca
2 Author: Eray Aslan <eras <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jun 11 10:15:06 2018 +0000
4 Commit: Eray Aslan <eras <AT> gentoo <DOT> org>
5 CommitDate: Mon Jun 11 10:15:26 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bcde888f
7
8 mail-mta/postfix: remove old
9
10 Package-Manager: Portage-2.3.40, Repoman-2.3.9
11
12 mail-mta/postfix/Manifest | 4 -
13 mail-mta/postfix/postfix-3.2.2.ebuild | 308 -------------------------------
14 mail-mta/postfix/postfix-3.2.3.ebuild | 308 -------------------------------
15 mail-mta/postfix/postfix-3.2.5-r1.ebuild | 301 ------------------------------
16 mail-mta/postfix/postfix-3.2.5.ebuild | 301 ------------------------------
17 mail-mta/postfix/postfix-3.3.0.ebuild | 301 ------------------------------
18 6 files changed, 1523 deletions(-)
19
20 diff --git a/mail-mta/postfix/Manifest b/mail-mta/postfix/Manifest
21 index 5fbc6522a83..fb465a336bf 100644
22 --- a/mail-mta/postfix/Manifest
23 +++ b/mail-mta/postfix/Manifest
24 @@ -1,11 +1,7 @@
25 DIST postfix-2.10.9.tar.gz 3820525 BLAKE2B ed1fc10f016cdc63fe2b86c68cca270c98348417babf6d8e05f76fa2550f5cbca95825f14cf54897e66323cdbe6132a1046402b853b6f000ade630277278c748 SHA512 c77df7ccc051bd72271dc5298da0ca4e45397b1ba96fc8be31e095f5b15cd30ebc0b29cf638e76efc65503cb241efd937f2d64aaa97243402c35e2927b7a7b91
26 DIST postfix-3.1.6.tar.gz 4341308 BLAKE2B 6a5ec763cf96770240f63b35b4532c555cc6e5e807aeaa526366d3069e83399e470703677ed63f51c4d4178ed66b3644b71b5f586ba78f4bfe5caad4b36c13f9 SHA512 646317393d33fcec99bef7f3dc142a847591927bc034c0c71e578baedad1875040cfeabdaa3436312f60485cb69bbdb31197aa9e7526a457946d7749b781099b
27 -DIST postfix-3.2.2.tar.gz 4390318 BLAKE2B 4d0648ad89c90b13573bf9a2721919f90fa706a37d745889bc1e3a38e5f5277af848e2ba6eed8f61dec68f53ac65fd67c133bc37ed73ecb350baa76834a5a33c SHA512 9432fa8b181db99b8e2d72b2a0f640d1456b10c42615f0a002638f7f788d748b8bb55cd36409a368ac4f6d22033d1d059728fa33980fb93d465b6dfd5ae26418
28 -DIST postfix-3.2.3.tar.gz 4390567 BLAKE2B 911b183c318bc60cfd1ba2ae5e9467cfe3cc62f9787c7566f2edea7b867974bc90f0cc4b236f71b50c08a1696e6d60beeccdc634d7bf7f3a600c260b89743a36 SHA512 99ea74a5a0620e739668e55d620a0370b72c4802983a8a4cf4d6c51c6f8f5573128f2d6869386cedadba66b3f741df2f18867a059facd94092ac95f6da3a600c
29 DIST postfix-3.2.4.tar.gz 4390376 BLAKE2B 132a6b467f9156d716a92cc7beae0f9a7c47e6a2045e83726a5e7305e6f9bf666ebcfb93a9ab1a96ec988431661059d62e926287bd13089eeb4bab3e8f4b9fc7 SHA512 6dc583d3b1c98f5c8d6486351bee9f92a98b5379cd0d76d26a382379c112317e7a2a58c3a200477a6d0f831c73395257d1a63170df17ea8a65a4048a7df391f8
30 -DIST postfix-3.2.5.tar.gz 4394765 BLAKE2B 416dfccc1a9dc524afada3e3f0c7e215380afe13df40fb575e4845d28bf2d8e1c347aff93c17455d2c1128686ed99c9ac22f70db6d591c6dc4607e45325e96a0 SHA512 ffd07e8664d41a5c40b7f3f7511a4c4cc57310d103395b12f2f7e9499d1f901768d6ebb1d5d1588d6fdb834ad2548a9df6d925ff3d7f74d74764a6f6f550ecb6
31 DIST postfix-3.2.6.tar.gz 4395159 BLAKE2B 2eef28f9189830725c02b98512ca7859770f090cbef3fe453b57fade967fd20f94cd3cd8e8955252dc230e674ed7827fc68ad910cd4fc63029dc2c92ea75f0af SHA512 081751fe9af7612e7ee01a80ceffbc09db60764e12099d2a5e053205d0e7c70c6ef4f96526e1a98780965c43354e0ccd6ef61b4dbe93b249179890b81836c705
32 -DIST postfix-3.3.0.tar.gz 4419450 BLAKE2B 780aaa33783268a078a077f3436e5bc54a9717d24e25fc0a1cf7a1b7c7388289e24e4ac602911b496a57a9f66515158101e1f00f3ebf8725bf4fc92ae23c44de SHA512 14f52fc47d6bbafefc7452ffbac4c4fb837d30181705486e8e43d6ca9003d218a01755ed4cb86413464c2585b9b84c2adcfef4933326b5d7446fe6c39b6cae8e
33 DIST postfix-3.3.1.tar.gz 4420912 BLAKE2B 065fd04cdfa343a6c50a629e8da47fad71465df790ca88adcad4efc7ab273330c39998c6bf503587b8bcba3d87bb98b1be6413e49449e2241258a99217473c11 SHA512 2307f50f8b7dab1db46ebe4ae30bc5682a25b9c49ae5ae65aa95b4620bb5450dd5929977c0f34b9e73a92ca6af36fd8e24167732420a1a2d89167c7a3b197276
34 DIST postfix-3.4-20180603.tar.gz 4428154 BLAKE2B a1f08ff767eac6e540df8d45d1cc9bd96b5dfd80d2bfa173656189aaf0d9a5266168b5babf903e326e972cca0ccff2eb6f076cff79122e811134738123761554 SHA512 bbc6e7c7abc1a68b0871a8b4fc6bbcdeb6a7889e067ae5e764b073875e5d737773e930a76b3183cc6121553e0a50420ae37f5751c03c5c7807df737ed02b8997
35 DIST postfix-vda-v13-2.10.0.patch 55701 BLAKE2B d8df041bb4ae7457cd066e71b6ae9470840d42edc9990a550ae51356cd62bfb08516250249030da26d1ef475619f0ebd609570d84ce57f8cdc347a2824b29536 SHA512 0b4b53a8cd28abf56eee3b2ed63ca1814251b60816e6ca1143249d25fd6ef7f905bec3134125ac6e851af685db8aae878012113693261529ae2ddbcf1bd93e62
36
37 diff --git a/mail-mta/postfix/postfix-3.2.2.ebuild b/mail-mta/postfix/postfix-3.2.2.ebuild
38 deleted file mode 100644
39 index 0d7b71cde94..00000000000
40 --- a/mail-mta/postfix/postfix-3.2.2.ebuild
41 +++ /dev/null
42 @@ -1,308 +0,0 @@
43 -# Copyright 1999-2017 Gentoo Foundation
44 -# Distributed under the terms of the GNU General Public License v2
45 -
46 -EAPI=6
47 -inherit flag-o-matic pam systemd toolchain-funcs user
48 -
49 -MY_PV="${PV/_pre/-}"
50 -MY_SRC="${PN}-${MY_PV}"
51 -MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/official"
52 -RC_VER="2.7"
53 -
54 -DESCRIPTION="A fast and secure drop-in replacement for sendmail"
55 -HOMEPAGE="http://www.postfix.org/"
56 -SRC_URI="${MY_URI}/${MY_SRC}.tar.gz"
57 -
58 -LICENSE="IBM"
59 -SLOT="0"
60 -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
61 -IUSE="+berkdb cdb doc dovecot-sasl +eai hardened ldap ldap-bind libressl lmdb memcached mbox mysql nis pam postgres sasl selinux sqlite ssl"
62 -
63 -DEPEND=">=dev-libs/libpcre-3.4
64 - dev-lang/perl
65 - berkdb? ( >=sys-libs/db-3.2:* )
66 - cdb? ( || ( >=dev-db/tinycdb-0.76 >=dev-db/cdb-0.75-r4 ) )
67 - eai? ( dev-libs/icu:= )
68 - ldap? ( net-nds/openldap )
69 - ldap-bind? ( net-nds/openldap[sasl] )
70 - lmdb? ( >=dev-db/lmdb-0.9.11 )
71 - mysql? ( virtual/mysql )
72 - pam? ( virtual/pam )
73 - postgres? ( dev-db/postgresql:* )
74 - sasl? ( >=dev-libs/cyrus-sasl-2 )
75 - sqlite? ( dev-db/sqlite:3 )
76 - ssl? (
77 - !libressl? ( dev-libs/openssl:0 )
78 - libressl? ( dev-libs/libressl )
79 - )"
80 -
81 -RDEPEND="${DEPEND}
82 - dovecot-sasl? ( net-mail/dovecot )
83 - memcached? ( net-misc/memcached )
84 - net-mail/mailbase
85 - !mail-mta/courier
86 - !mail-mta/esmtp
87 - !mail-mta/exim
88 - !mail-mta/mini-qmail
89 - !mail-mta/msmtp[mta]
90 - !mail-mta/netqmail
91 - !mail-mta/nullmailer
92 - !mail-mta/qmail-ldap
93 - !mail-mta/sendmail
94 - !mail-mta/opensmtpd
95 - !<mail-mta/ssmtp-2.64-r2
96 - !>=mail-mta/ssmtp-2.64-r2[mta]
97 - !net-mail/fastforward
98 - selinux? ( sec-policy/selinux-postfix )"
99 -
100 -REQUIRED_USE="ldap-bind? ( ldap sasl )"
101 -
102 -S="${WORKDIR}/${MY_SRC}"
103 -
104 -pkg_setup() {
105 - # Add postfix, postdrop user/group (bug #77565)
106 - enewgroup postfix 207
107 - enewgroup postdrop 208
108 - enewuser postfix 207 -1 /var/spool/postfix postfix,mail
109 -}
110 -
111 -src_prepare() {
112 - default
113 - sed -i -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/mail/aliases|" \
114 - src/util/sys_defs.h || die "sed failed"
115 - # change default paths to better comply with portage standard paths
116 - sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || die "sed failed"
117 - eapply -p0 "${FILESDIR}/${PN}-libressl.patch"
118 - eapply -p0 "${FILESDIR}/${PN}-libressl-runtime.patch"
119 -}
120 -
121 -src_configure() {
122 - for name in CDB LDAP LMDB MYSQL PCRE PGSQL SDBM SQLITE
123 - do
124 - local AUXLIBS_${name}=""
125 - done
126 -
127 - # Make sure LDFLAGS get passed down to the executables.
128 - local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -ldl"
129 - AUXLIBS_PCRE="$(pcre-config --libs)"
130 -
131 - use pam && mylibs="${mylibs} -lpam"
132 -
133 - if use ldap; then
134 - mycc="${mycc} -DHAS_LDAP"
135 - AUXLIBS_LDAP="-lldap -llber"
136 - fi
137 -
138 - if use mysql; then
139 - mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)"
140 - AUXLIBS_MYSQL="$(mysql_config --libs)"
141 - fi
142 -
143 - if use postgres; then
144 - mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)"
145 - AUXLIBS_PGSQL="-L$(pg_config --libdir) -lpq"
146 - fi
147 -
148 - if use sqlite; then
149 - mycc="${mycc} -DHAS_SQLITE"
150 - AUXLIBS_SQLITE="-lsqlite3 -lpthread"
151 - fi
152 -
153 - if use ssl; then
154 - mycc="${mycc} -DUSE_TLS"
155 - mylibs="${mylibs} -lssl -lcrypto"
156 - fi
157 -
158 - if use lmdb; then
159 - mycc="${mycc} -DHAS_LMDB"
160 - AUXLIBS_LMDB="-llmdb -lpthread"
161 - fi
162 -
163 - if ! use eai; then
164 - mycc="${mycc} -DNO_EAI"
165 - fi
166 -
167 - # broken. and "in other words, not supported" by upstream.
168 - # Use inet_protocols setting in main.cf
169 - #if ! use ipv6; then
170 - # mycc="${mycc} -DNO_IPV6"
171 - #fi
172 -
173 - if use sasl; then
174 - if use dovecot-sasl; then
175 - # Set dovecot as default.
176 - mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\""
177 - fi
178 - if use ldap-bind; then
179 - mycc="${mycc} -DUSE_LDAP_SASL"
180 - fi
181 - mycc="${mycc} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl"
182 - mylibs="${mylibs} -lsasl2"
183 - elif use dovecot-sasl; then
184 - mycc="${mycc} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\""
185 - fi
186 -
187 - if ! use nis; then
188 - mycc="${mycc} -DNO_NIS"
189 - fi
190 -
191 - if ! use berkdb; then
192 - mycc="${mycc} -DNO_DB"
193 - if use cdb; then
194 - # change default hash format from Berkeley DB to cdb
195 - mycc="${mycc} -DDEF_DB_TYPE=\\\"cdb\\\""
196 - fi
197 - fi
198 -
199 - if use cdb; then
200 - mycc="${mycc} -DHAS_CDB -I/usr/include/cdb"
201 - # Tinycdb is preferred.
202 - if has_version dev-db/tinycdb ; then
203 - einfo "Building with dev-db/tinycdb"
204 - AUXLIBS_CDB="-lcdb"
205 - else
206 - einfo "Building with dev-db/cdb"
207 - CDB_PATH="/usr/$(get_libdir)"
208 - for i in cdb.a alloc.a buffer.a unix.a byte.a ; do
209 - AUXLIBS_CDB="${AUXLIBS_CDB} ${CDB_PATH}/${i}"
210 - done
211 - fi
212 - fi
213 -
214 - # Robin H. Johnson <robbat2@g.o> 17/Nov/2006
215 - # Fix because infra boxes hit 2Gb .db files that fail a 32-bit fstat signed check.
216 - mycc="${mycc} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
217 - filter-lfs-flags
218 -
219 - # Workaround for bug #76512
220 - if use hardened; then
221 - [[ "$(gcc-version)" == "3.4" ]] && replace-flags -O? -Os
222 - fi
223 -
224 - # Remove annoying C++ comment style warnings - bug #378099
225 - append-flags -Wno-comment
226 -
227 - sed -i -e "/^RANLIB/s/ranlib/$(tc-getRANLIB)/g" "${S}"/makedefs
228 - sed -i -e "/^AR/s/ar/$(tc-getAR)/g" "${S}"/makedefs
229 -
230 - emake makefiles shared=yes dynamicmaps=no pie=yes \
231 - shlib_directory="/usr/$(get_libdir)/postfix/MAIL_VERSION" \
232 - DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" \
233 - AUXLIBS_CDB="${AUXLIBS_CDB}" AUXLIBS_LDAP="${AUXLIBS_LDAP}" \
234 - AUXLIBS_LMDB="${AUXLIBS_LMDB}" AUXLIBS_MYSQL="${AUXLIBS_MYSQL}" \
235 - AUXLIBS_PCRE="${AUXLIBS_PCRE}" AUXLIBS_PGSQL="${AUXLIBS_PGSQL}" \
236 - AUXLIBS_SQLITE="${AUXLIBS_SQLITE}"
237 -}
238 -
239 -src_install () {
240 - local myconf
241 - use doc && myconf="readme_directory=\"/usr/share/doc/${PF}/readme\" \
242 - html_directory=\"/usr/share/doc/${PF}/html\""
243 -
244 - LD_LIBRARY_PATH="${S}/lib" \
245 - /bin/sh postfix-install \
246 - -non-interactive \
247 - install_root="${D}" \
248 - config_directory="/etc/postfix" \
249 - manpage_directory="/usr/share/man" \
250 - command_directory="/usr/sbin" \
251 - mailq_path="/usr/bin/mailq" \
252 - newaliases_path="/usr/bin/newaliases" \
253 - sendmail_path="/usr/sbin/sendmail" \
254 - ${myconf} \
255 - || die "postfix-install failed"
256 -
257 - # Fix spool removal on upgrade
258 - rm -Rf "${D}"/var
259 - keepdir /var/spool/postfix
260 -
261 - # Install rmail for UUCP, closes bug #19127
262 - dobin auxiliary/rmail/rmail
263 -
264 - # Provide another link for legacy FSH
265 - dosym /usr/sbin/sendmail /usr/$(get_libdir)/sendmail
266 -
267 - # Install qshape and posttls-finger
268 - dobin auxiliary/qshape/qshape.pl
269 - doman man/man1/qshape.1
270 - dobin bin/posttls-finger
271 - doman man/man1/posttls-finger.1
272 -
273 - # Performance tuning tools and their manuals
274 - dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink}
275 - doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1
276 -
277 - # Set proper permissions on required files/directories
278 - dodir /var/lib/postfix
279 - keepdir /var/lib/postfix
280 - fowners -R postfix:postfix /var/lib/postfix
281 - fperms 0750 /var/lib/postfix
282 - fowners root:postdrop /usr/sbin/post{drop,queue}
283 - fperms 02711 /usr/sbin/post{drop,queue}
284 -
285 - keepdir /etc/postfix
286 - if use mbox; then
287 - mypostconf="mail_spool_directory=/var/spool/mail"
288 - else
289 - mypostconf="home_mailbox=.maildir/"
290 - fi
291 - LD_LIBRARY_PATH="${S}/lib" \
292 - "${D}"/usr/sbin/postconf -c "${D}"/etc/postfix \
293 - -e ${mypostconf} || die "postconf failed"
294 -
295 - insinto /etc/postfix
296 - newins "${FILESDIR}"/smtp.pass saslpass
297 - fperms 600 /etc/postfix/saslpass
298 -
299 - newinitd "${FILESDIR}"/postfix.rc6.${RC_VER} postfix
300 - # do not start mysql/postgres unnecessarily - bug #359913
301 - use mysql || sed -i -e "s/mysql //" "${D}/etc/init.d/postfix"
302 - use postgres || sed -i -e "s/postgresql //" "${D}/etc/init.d/postfix"
303 -
304 - dodoc *README COMPATIBILITY HISTORY PORTING RELEASE_NOTES*
305 - use doc && mv "${S}"/examples "${D}"/usr/share/doc/${PF}/
306 -
307 - pamd_mimic_system smtp auth account
308 -
309 - if use sasl; then
310 - insinto /etc/sasl2
311 - newins "${FILESDIR}"/smtp.sasl smtpd.conf
312 - fi
313 -
314 - # header files
315 - insinto /usr/include/postfix
316 - doins include/*.h
317 -
318 - # Keep config_dir clean
319 - rm -f "${D}"/etc/postfix/{*LICENSE,access,aliases,canonical,generic}
320 - rm -f "${D}"/etc/postfix/{header_checks,relocated,transport,virtual}
321 -
322 - if has_version mail-mta/postfix; then
323 - # let the sysadmin decide when to change the compatibility_level
324 - sed -i -e /^compatibility_level/"s/^/#/" "${D}"/etc/postfix/main.cf || die
325 - fi
326 -
327 - systemd_dounit "${FILESDIR}/${PN}.service"
328 -}
329 -
330 -pkg_postinst() {
331 - if [[ ! -e /etc/mail/aliases.db ]] ; then
332 - ewarn
333 - ewarn "You must edit /etc/mail/aliases to suit your needs"
334 - ewarn "and then run /usr/bin/newaliases. Postfix will not"
335 - ewarn "work correctly without it."
336 - ewarn
337 - fi
338 -
339 - # configure tls
340 - if use ssl ; then
341 - if "${EROOT}"/usr/sbin/postfix tls all-default-client; then
342 - elog "To configure client side TLS settings:"
343 - elog "${EROOT}"usr/sbin/postfix tls enable-client
344 - fi
345 - if "${EROOT}"/usr/sbin/postfix tls all-default-server; then
346 - elog "To configure server side TLS settings:"
347 - elog "${EROOT}"usr/sbin/postfix tls enable-server
348 - fi
349 - fi
350 -}
351
352 diff --git a/mail-mta/postfix/postfix-3.2.3.ebuild b/mail-mta/postfix/postfix-3.2.3.ebuild
353 deleted file mode 100644
354 index 0d7b71cde94..00000000000
355 --- a/mail-mta/postfix/postfix-3.2.3.ebuild
356 +++ /dev/null
357 @@ -1,308 +0,0 @@
358 -# Copyright 1999-2017 Gentoo Foundation
359 -# Distributed under the terms of the GNU General Public License v2
360 -
361 -EAPI=6
362 -inherit flag-o-matic pam systemd toolchain-funcs user
363 -
364 -MY_PV="${PV/_pre/-}"
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"
374 -SLOT="0"
375 -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
376 -IUSE="+berkdb cdb doc 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? ( virtual/mysql )
387 - pam? ( virtual/pam )
388 - postgres? ( dev-db/postgresql:* )
389 - sasl? ( >=dev-libs/cyrus-sasl-2 )
390 - sqlite? ( dev-db/sqlite:3 )
391 - ssl? (
392 - !libressl? ( dev-libs/openssl:0 )
393 - libressl? ( dev-libs/libressl )
394 - )"
395 -
396 -RDEPEND="${DEPEND}
397 - dovecot-sasl? ( net-mail/dovecot )
398 - memcached? ( net-misc/memcached )
399 - net-mail/mailbase
400 - !mail-mta/courier
401 - !mail-mta/esmtp
402 - !mail-mta/exim
403 - !mail-mta/mini-qmail
404 - !mail-mta/msmtp[mta]
405 - !mail-mta/netqmail
406 - !mail-mta/nullmailer
407 - !mail-mta/qmail-ldap
408 - !mail-mta/sendmail
409 - !mail-mta/opensmtpd
410 - !<mail-mta/ssmtp-2.64-r2
411 - !>=mail-mta/ssmtp-2.64-r2[mta]
412 - !net-mail/fastforward
413 - selinux? ( sec-policy/selinux-postfix )"
414 -
415 -REQUIRED_USE="ldap-bind? ( ldap sasl )"
416 -
417 -S="${WORKDIR}/${MY_SRC}"
418 -
419 -pkg_setup() {
420 - # Add postfix, postdrop user/group (bug #77565)
421 - enewgroup postfix 207
422 - enewgroup postdrop 208
423 - enewuser postfix 207 -1 /var/spool/postfix postfix,mail
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 - eapply -p0 "${FILESDIR}/${PN}-libressl.patch"
433 - eapply -p0 "${FILESDIR}/${PN}-libressl-runtime.patch"
434 -}
435 -
436 -src_configure() {
437 - for name in CDB LDAP LMDB MYSQL PCRE PGSQL SDBM SQLITE
438 - do
439 - local AUXLIBS_${name}=""
440 - done
441 -
442 - # Make sure LDFLAGS get passed down to the executables.
443 - local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -ldl"
444 - AUXLIBS_PCRE="$(pcre-config --libs)"
445 -
446 - use pam && mylibs="${mylibs} -lpam"
447 -
448 - if use ldap; then
449 - mycc="${mycc} -DHAS_LDAP"
450 - AUXLIBS_LDAP="-lldap -llber"
451 - fi
452 -
453 - if use mysql; then
454 - mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)"
455 - AUXLIBS_MYSQL="$(mysql_config --libs)"
456 - fi
457 -
458 - if use postgres; then
459 - mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)"
460 - AUXLIBS_PGSQL="-L$(pg_config --libdir) -lpq"
461 - fi
462 -
463 - if use sqlite; then
464 - mycc="${mycc} -DHAS_SQLITE"
465 - AUXLIBS_SQLITE="-lsqlite3 -lpthread"
466 - fi
467 -
468 - if use ssl; then
469 - mycc="${mycc} -DUSE_TLS"
470 - mylibs="${mylibs} -lssl -lcrypto"
471 - fi
472 -
473 - if use lmdb; then
474 - mycc="${mycc} -DHAS_LMDB"
475 - AUXLIBS_LMDB="-llmdb -lpthread"
476 - fi
477 -
478 - if ! use eai; then
479 - mycc="${mycc} -DNO_EAI"
480 - fi
481 -
482 - # broken. and "in other words, not supported" by upstream.
483 - # Use inet_protocols setting in main.cf
484 - #if ! use ipv6; then
485 - # mycc="${mycc} -DNO_IPV6"
486 - #fi
487 -
488 - if use sasl; then
489 - if use dovecot-sasl; then
490 - # Set dovecot as default.
491 - mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\""
492 - fi
493 - if use ldap-bind; then
494 - mycc="${mycc} -DUSE_LDAP_SASL"
495 - fi
496 - mycc="${mycc} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl"
497 - mylibs="${mylibs} -lsasl2"
498 - elif use dovecot-sasl; then
499 - mycc="${mycc} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\""
500 - fi
501 -
502 - if ! use nis; then
503 - mycc="${mycc} -DNO_NIS"
504 - fi
505 -
506 - if ! use berkdb; then
507 - mycc="${mycc} -DNO_DB"
508 - if use cdb; then
509 - # change default hash format from Berkeley DB to cdb
510 - mycc="${mycc} -DDEF_DB_TYPE=\\\"cdb\\\""
511 - fi
512 - fi
513 -
514 - if use cdb; then
515 - mycc="${mycc} -DHAS_CDB -I/usr/include/cdb"
516 - # Tinycdb is preferred.
517 - if has_version dev-db/tinycdb ; then
518 - einfo "Building with dev-db/tinycdb"
519 - AUXLIBS_CDB="-lcdb"
520 - else
521 - einfo "Building with dev-db/cdb"
522 - CDB_PATH="/usr/$(get_libdir)"
523 - for i in cdb.a alloc.a buffer.a unix.a byte.a ; do
524 - AUXLIBS_CDB="${AUXLIBS_CDB} ${CDB_PATH}/${i}"
525 - done
526 - fi
527 - fi
528 -
529 - # Robin H. Johnson <robbat2@g.o> 17/Nov/2006
530 - # Fix because infra boxes hit 2Gb .db files that fail a 32-bit fstat signed check.
531 - mycc="${mycc} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
532 - filter-lfs-flags
533 -
534 - # Workaround for bug #76512
535 - if use hardened; then
536 - [[ "$(gcc-version)" == "3.4" ]] && replace-flags -O? -Os
537 - fi
538 -
539 - # Remove annoying C++ comment style warnings - bug #378099
540 - append-flags -Wno-comment
541 -
542 - sed -i -e "/^RANLIB/s/ranlib/$(tc-getRANLIB)/g" "${S}"/makedefs
543 - sed -i -e "/^AR/s/ar/$(tc-getAR)/g" "${S}"/makedefs
544 -
545 - emake makefiles shared=yes dynamicmaps=no pie=yes \
546 - shlib_directory="/usr/$(get_libdir)/postfix/MAIL_VERSION" \
547 - DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" \
548 - AUXLIBS_CDB="${AUXLIBS_CDB}" AUXLIBS_LDAP="${AUXLIBS_LDAP}" \
549 - AUXLIBS_LMDB="${AUXLIBS_LMDB}" AUXLIBS_MYSQL="${AUXLIBS_MYSQL}" \
550 - AUXLIBS_PCRE="${AUXLIBS_PCRE}" AUXLIBS_PGSQL="${AUXLIBS_PGSQL}" \
551 - AUXLIBS_SQLITE="${AUXLIBS_SQLITE}"
552 -}
553 -
554 -src_install () {
555 - local myconf
556 - use doc && myconf="readme_directory=\"/usr/share/doc/${PF}/readme\" \
557 - html_directory=\"/usr/share/doc/${PF}/html\""
558 -
559 - LD_LIBRARY_PATH="${S}/lib" \
560 - /bin/sh postfix-install \
561 - -non-interactive \
562 - install_root="${D}" \
563 - config_directory="/etc/postfix" \
564 - manpage_directory="/usr/share/man" \
565 - command_directory="/usr/sbin" \
566 - mailq_path="/usr/bin/mailq" \
567 - newaliases_path="/usr/bin/newaliases" \
568 - sendmail_path="/usr/sbin/sendmail" \
569 - ${myconf} \
570 - || die "postfix-install failed"
571 -
572 - # Fix spool removal on upgrade
573 - rm -Rf "${D}"/var
574 - keepdir /var/spool/postfix
575 -
576 - # Install rmail for UUCP, closes bug #19127
577 - dobin auxiliary/rmail/rmail
578 -
579 - # Provide another link for legacy FSH
580 - dosym /usr/sbin/sendmail /usr/$(get_libdir)/sendmail
581 -
582 - # Install qshape and posttls-finger
583 - dobin auxiliary/qshape/qshape.pl
584 - doman man/man1/qshape.1
585 - dobin bin/posttls-finger
586 - doman man/man1/posttls-finger.1
587 -
588 - # Performance tuning tools and their manuals
589 - dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink}
590 - doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1
591 -
592 - # Set proper permissions on required files/directories
593 - dodir /var/lib/postfix
594 - keepdir /var/lib/postfix
595 - fowners -R postfix:postfix /var/lib/postfix
596 - fperms 0750 /var/lib/postfix
597 - fowners root:postdrop /usr/sbin/post{drop,queue}
598 - fperms 02711 /usr/sbin/post{drop,queue}
599 -
600 - keepdir /etc/postfix
601 - if use mbox; then
602 - mypostconf="mail_spool_directory=/var/spool/mail"
603 - else
604 - mypostconf="home_mailbox=.maildir/"
605 - fi
606 - LD_LIBRARY_PATH="${S}/lib" \
607 - "${D}"/usr/sbin/postconf -c "${D}"/etc/postfix \
608 - -e ${mypostconf} || die "postconf failed"
609 -
610 - insinto /etc/postfix
611 - newins "${FILESDIR}"/smtp.pass saslpass
612 - fperms 600 /etc/postfix/saslpass
613 -
614 - newinitd "${FILESDIR}"/postfix.rc6.${RC_VER} postfix
615 - # do not start mysql/postgres unnecessarily - bug #359913
616 - use mysql || sed -i -e "s/mysql //" "${D}/etc/init.d/postfix"
617 - use postgres || sed -i -e "s/postgresql //" "${D}/etc/init.d/postfix"
618 -
619 - dodoc *README COMPATIBILITY HISTORY PORTING RELEASE_NOTES*
620 - use doc && mv "${S}"/examples "${D}"/usr/share/doc/${PF}/
621 -
622 - pamd_mimic_system smtp auth account
623 -
624 - if use sasl; then
625 - insinto /etc/sasl2
626 - newins "${FILESDIR}"/smtp.sasl smtpd.conf
627 - fi
628 -
629 - # header files
630 - insinto /usr/include/postfix
631 - doins include/*.h
632 -
633 - # Keep config_dir clean
634 - rm -f "${D}"/etc/postfix/{*LICENSE,access,aliases,canonical,generic}
635 - rm -f "${D}"/etc/postfix/{header_checks,relocated,transport,virtual}
636 -
637 - if has_version mail-mta/postfix; then
638 - # let the sysadmin decide when to change the compatibility_level
639 - sed -i -e /^compatibility_level/"s/^/#/" "${D}"/etc/postfix/main.cf || die
640 - fi
641 -
642 - systemd_dounit "${FILESDIR}/${PN}.service"
643 -}
644 -
645 -pkg_postinst() {
646 - if [[ ! -e /etc/mail/aliases.db ]] ; then
647 - ewarn
648 - ewarn "You must edit /etc/mail/aliases to suit your needs"
649 - ewarn "and then run /usr/bin/newaliases. Postfix will not"
650 - ewarn "work correctly without it."
651 - ewarn
652 - fi
653 -
654 - # configure tls
655 - if use ssl ; then
656 - if "${EROOT}"/usr/sbin/postfix tls all-default-client; then
657 - elog "To configure client side TLS settings:"
658 - elog "${EROOT}"usr/sbin/postfix tls enable-client
659 - fi
660 - if "${EROOT}"/usr/sbin/postfix tls all-default-server; then
661 - elog "To configure server side TLS settings:"
662 - elog "${EROOT}"usr/sbin/postfix tls enable-server
663 - fi
664 - fi
665 -}
666
667 diff --git a/mail-mta/postfix/postfix-3.2.5-r1.ebuild b/mail-mta/postfix/postfix-3.2.5-r1.ebuild
668 deleted file mode 100644
669 index 20f11ae067a..00000000000
670 --- a/mail-mta/postfix/postfix-3.2.5-r1.ebuild
671 +++ /dev/null
672 @@ -1,301 +0,0 @@
673 -# Copyright 1999-2018 Gentoo Foundation
674 -# Distributed under the terms of the GNU General Public License v2
675 -
676 -EAPI=6
677 -inherit flag-o-matic pam systemd toolchain-funcs user
678 -
679 -MY_PV="${PV/_pre/-}"
680 -MY_SRC="${PN}-${MY_PV}"
681 -MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/official"
682 -RC_VER="2.7"
683 -
684 -DESCRIPTION="A fast and secure drop-in replacement for sendmail"
685 -HOMEPAGE="http://www.postfix.org/"
686 -SRC_URI="${MY_URI}/${MY_SRC}.tar.gz"
687 -
688 -LICENSE="|| ( IBM EPL-2.0 )"
689 -SLOT="0"
690 -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
691 -IUSE="+berkdb cdb doc dovecot-sasl +eai hardened ldap ldap-bind libressl lmdb memcached mbox mysql nis pam postgres sasl selinux sqlite ssl"
692 -
693 -DEPEND=">=dev-libs/libpcre-3.4
694 - dev-lang/perl
695 - berkdb? ( >=sys-libs/db-3.2:* )
696 - cdb? ( || ( >=dev-db/tinycdb-0.76 >=dev-db/cdb-0.75-r4 ) )
697 - eai? ( dev-libs/icu:= )
698 - ldap? ( net-nds/openldap )
699 - ldap-bind? ( net-nds/openldap[sasl] )
700 - lmdb? ( >=dev-db/lmdb-0.9.11 )
701 - mysql? ( virtual/mysql )
702 - nis? ( net-libs/libnsl )
703 - pam? ( virtual/pam )
704 - postgres? ( dev-db/postgresql:* )
705 - sasl? ( >=dev-libs/cyrus-sasl-2 )
706 - sqlite? ( dev-db/sqlite:3 )
707 - ssl? (
708 - !libressl? ( dev-libs/openssl:0 )
709 - libressl? ( dev-libs/libressl )
710 - )"
711 -
712 -RDEPEND="${DEPEND}
713 - memcached? ( net-misc/memcached )
714 - net-mail/mailbase
715 - !mail-mta/courier
716 - !mail-mta/esmtp
717 - !mail-mta/exim
718 - !mail-mta/mini-qmail
719 - !mail-mta/msmtp[mta]
720 - !mail-mta/netqmail
721 - !mail-mta/nullmailer
722 - !mail-mta/qmail-ldap
723 - !mail-mta/sendmail
724 - !mail-mta/opensmtpd
725 - !<mail-mta/ssmtp-2.64-r2
726 - !>=mail-mta/ssmtp-2.64-r2[mta]
727 - !net-mail/fastforward
728 - selinux? ( sec-policy/selinux-postfix )"
729 -
730 -REQUIRED_USE="ldap-bind? ( ldap sasl )"
731 -
732 -S="${WORKDIR}/${MY_SRC}"
733 -
734 -pkg_setup() {
735 - # Add postfix, postdrop user/group (bug #77565)
736 - enewgroup postfix 207
737 - enewgroup postdrop 208
738 - enewuser postfix 207 -1 /var/spool/postfix postfix,mail
739 -}
740 -
741 -src_prepare() {
742 - default
743 - sed -i -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/mail/aliases|" \
744 - src/util/sys_defs.h || die "sed failed"
745 - # change default paths to better comply with portage standard paths
746 - sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || die "sed failed"
747 - eapply -p0 "${FILESDIR}/${PN}-libressl.patch"
748 - eapply -p0 "${FILESDIR}/${PN}-libressl-runtime.patch"
749 -}
750 -
751 -src_configure() {
752 - for name in CDB LDAP LMDB MYSQL PCRE PGSQL SDBM SQLITE
753 - do
754 - local AUXLIBS_${name}=""
755 - done
756 -
757 - # Make sure LDFLAGS get passed down to the executables.
758 - local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -ldl"
759 - AUXLIBS_PCRE="$(pcre-config --libs)"
760 -
761 - use pam && mylibs="${mylibs} -lpam"
762 -
763 - if use ldap; then
764 - mycc="${mycc} -DHAS_LDAP"
765 - AUXLIBS_LDAP="-lldap -llber"
766 - fi
767 -
768 - if use mysql; then
769 - mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)"
770 - AUXLIBS_MYSQL="$(mysql_config --libs)"
771 - fi
772 -
773 - if use postgres; then
774 - mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)"
775 - AUXLIBS_PGSQL="-L$(pg_config --libdir) -lpq"
776 - fi
777 -
778 - if use sqlite; then
779 - mycc="${mycc} -DHAS_SQLITE"
780 - AUXLIBS_SQLITE="-lsqlite3 -lpthread"
781 - fi
782 -
783 - if use ssl; then
784 - mycc="${mycc} -DUSE_TLS"
785 - mylibs="${mylibs} -lssl -lcrypto"
786 - fi
787 -
788 - if use lmdb; then
789 - mycc="${mycc} -DHAS_LMDB"
790 - AUXLIBS_LMDB="-llmdb -lpthread"
791 - fi
792 -
793 - if ! use eai; then
794 - mycc="${mycc} -DNO_EAI"
795 - fi
796 -
797 - # broken. and "in other words, not supported" by upstream.
798 - # Use inet_protocols setting in main.cf
799 - #if ! use ipv6; then
800 - # mycc="${mycc} -DNO_IPV6"
801 - #fi
802 -
803 - if use sasl; then
804 - if use dovecot-sasl; then
805 - # Set dovecot as default.
806 - mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\""
807 - fi
808 - if use ldap-bind; then
809 - mycc="${mycc} -DUSE_LDAP_SASL"
810 - fi
811 - mycc="${mycc} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl"
812 - mylibs="${mylibs} -lsasl2"
813 - elif use dovecot-sasl; then
814 - mycc="${mycc} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\""
815 - fi
816 -
817 - if ! use nis; then
818 - mycc="${mycc} -DNO_NIS"
819 - fi
820 -
821 - if ! use berkdb; then
822 - mycc="${mycc} -DNO_DB"
823 - if use cdb; then
824 - # change default hash format from Berkeley DB to cdb
825 - mycc="${mycc} -DDEF_DB_TYPE=\\\"cdb\\\""
826 - fi
827 - fi
828 -
829 - if use cdb; then
830 - mycc="${mycc} -DHAS_CDB -I/usr/include/cdb"
831 - # Tinycdb is preferred.
832 - if has_version dev-db/tinycdb ; then
833 - einfo "Building with dev-db/tinycdb"
834 - AUXLIBS_CDB="-lcdb"
835 - else
836 - einfo "Building with dev-db/cdb"
837 - CDB_PATH="/usr/$(get_libdir)"
838 - for i in cdb.a alloc.a buffer.a unix.a byte.a ; do
839 - AUXLIBS_CDB="${AUXLIBS_CDB} ${CDB_PATH}/${i}"
840 - done
841 - fi
842 - fi
843 -
844 - # Robin H. Johnson <robbat2@g.o> 17/Nov/2006
845 - # Fix because infra boxes hit 2Gb .db files that fail a 32-bit fstat signed check.
846 - mycc="${mycc} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
847 - filter-lfs-flags
848 -
849 - # Workaround for bug #76512
850 - if use hardened; then
851 - [[ "$(gcc-version)" == "3.4" ]] && replace-flags -O? -Os
852 - fi
853 -
854 - # Remove annoying C++ comment style warnings - bug #378099
855 - append-flags -Wno-comment
856 -
857 - sed -i -e "/^RANLIB/s/ranlib/$(tc-getRANLIB)/g" "${S}"/makedefs
858 - sed -i -e "/^AR/s/ar/$(tc-getAR)/g" "${S}"/makedefs
859 -
860 - emake makefiles shared=yes dynamicmaps=no pie=yes \
861 - shlib_directory="/usr/$(get_libdir)/postfix/MAIL_VERSION" \
862 - DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" \
863 - AUXLIBS_CDB="${AUXLIBS_CDB}" AUXLIBS_LDAP="${AUXLIBS_LDAP}" \
864 - AUXLIBS_LMDB="${AUXLIBS_LMDB}" AUXLIBS_MYSQL="${AUXLIBS_MYSQL}" \
865 - AUXLIBS_PCRE="${AUXLIBS_PCRE}" AUXLIBS_PGSQL="${AUXLIBS_PGSQL}" \
866 - AUXLIBS_SQLITE="${AUXLIBS_SQLITE}"
867 -}
868 -
869 -src_install () {
870 - local myconf
871 - use doc && myconf="readme_directory=\"/usr/share/doc/${PF}/readme\" \
872 - html_directory=\"/usr/share/doc/${PF}/html\""
873 -
874 - LD_LIBRARY_PATH="${S}/lib" \
875 - /bin/sh postfix-install \
876 - -non-interactive \
877 - install_root="${D}" \
878 - config_directory="/etc/postfix" \
879 - manpage_directory="/usr/share/man" \
880 - command_directory="/usr/sbin" \
881 - mailq_path="/usr/bin/mailq" \
882 - newaliases_path="/usr/bin/newaliases" \
883 - sendmail_path="/usr/sbin/sendmail" \
884 - ${myconf} \
885 - || die "postfix-install failed"
886 -
887 - # Fix spool removal on upgrade
888 - rm -Rf "${D}"/var
889 - keepdir /var/spool/postfix
890 -
891 - # Install rmail for UUCP, closes bug #19127
892 - dobin auxiliary/rmail/rmail
893 -
894 - # Provide another link for legacy FSH
895 - dosym ../sbin/sendmail /usr/$(get_libdir)/sendmail
896 -
897 - # Install qshape, posttls-finger and collate
898 - dobin auxiliary/qshape/qshape.pl
899 - doman man/man1/qshape.1
900 - dobin bin/posttls-finger
901 - doman man/man1/posttls-finger.1
902 - dobin auxiliary/collate/collate.pl
903 - newdoc auxiliary/collate/README README.collate
904 -
905 - # Performance tuning tools and their manuals
906 - dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink}
907 - doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1
908 -
909 - keepdir /etc/postfix
910 - if use mbox; then
911 - mypostconf="mail_spool_directory=/var/spool/mail"
912 - else
913 - mypostconf="home_mailbox=.maildir/"
914 - fi
915 - LD_LIBRARY_PATH="${S}/lib" \
916 - "${D}"/usr/sbin/postconf -c "${D}"/etc/postfix \
917 - -e ${mypostconf} || die "postconf failed"
918 -
919 - insinto /etc/postfix
920 - newins "${FILESDIR}"/smtp.pass saslpass
921 - fperms 600 /etc/postfix/saslpass
922 -
923 - newinitd "${FILESDIR}"/postfix.rc6.${RC_VER} postfix
924 - # do not start mysql/postgres unnecessarily - bug #359913
925 - use mysql || sed -i -e "s/mysql //" "${D}/etc/init.d/postfix"
926 - use postgres || sed -i -e "s/postgresql //" "${D}/etc/init.d/postfix"
927 -
928 - dodoc *README COMPATIBILITY HISTORY PORTING RELEASE_NOTES*
929 - use doc && mv "${S}"/examples "${D}"/usr/share/doc/${PF}/
930 -
931 - pamd_mimic_system smtp auth account
932 -
933 - if use sasl; then
934 - insinto /etc/sasl2
935 - newins "${FILESDIR}"/smtp.sasl smtpd.conf
936 - fi
937 -
938 - # header files
939 - insinto /usr/include/postfix
940 - doins include/*.h
941 -
942 - if has_version mail-mta/postfix; then
943 - # let the sysadmin decide when to change the compatibility_level
944 - sed -i -e /^compatibility_level/"s/^/#/" "${D}"/etc/postfix/main.cf || die
945 - fi
946 -
947 - systemd_dounit "${FILESDIR}/${PN}.service"
948 -}
949 -
950 -pkg_postinst() {
951 - if [[ ! -e /etc/mail/aliases.db ]] ; then
952 - ewarn
953 - ewarn "You must edit /etc/mail/aliases to suit your needs"
954 - ewarn "and then run /usr/bin/newaliases. Postfix will not"
955 - ewarn "work correctly without it."
956 - ewarn
957 - fi
958 -
959 - # check and fix file permissions
960 - "${EROOT}"/usr/sbin/postfix set-permissions 2>/dev/null
961 -
962 - # configure tls
963 - if use ssl ; then
964 - if "${EROOT}"/usr/sbin/postfix tls all-default-client; then
965 - elog "To configure client side TLS settings:"
966 - elog "${EROOT}"usr/sbin/postfix tls enable-client
967 - fi
968 - if "${EROOT}"/usr/sbin/postfix tls all-default-server; then
969 - elog "To configure server side TLS settings:"
970 - elog "${EROOT}"usr/sbin/postfix tls enable-server
971 - fi
972 - fi
973 -}
974
975 diff --git a/mail-mta/postfix/postfix-3.2.5.ebuild b/mail-mta/postfix/postfix-3.2.5.ebuild
976 deleted file mode 100644
977 index b3f6887b50a..00000000000
978 --- a/mail-mta/postfix/postfix-3.2.5.ebuild
979 +++ /dev/null
980 @@ -1,301 +0,0 @@
981 -# Copyright 1999-2018 Gentoo Foundation
982 -# Distributed under the terms of the GNU General Public License v2
983 -
984 -EAPI=6
985 -inherit flag-o-matic pam systemd toolchain-funcs user
986 -
987 -MY_PV="${PV/_pre/-}"
988 -MY_SRC="${PN}-${MY_PV}"
989 -MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/official"
990 -RC_VER="2.7"
991 -
992 -DESCRIPTION="A fast and secure drop-in replacement for sendmail"
993 -HOMEPAGE="http://www.postfix.org/"
994 -SRC_URI="${MY_URI}/${MY_SRC}.tar.gz"
995 -
996 -LICENSE="|| ( IBM EPL-2.0 )"
997 -SLOT="0"
998 -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
999 -IUSE="+berkdb cdb doc dovecot-sasl +eai hardened ldap ldap-bind libressl lmdb memcached mbox mysql nis pam postgres sasl selinux sqlite ssl"
1000 -
1001 -DEPEND=">=dev-libs/libpcre-3.4
1002 - dev-lang/perl
1003 - berkdb? ( >=sys-libs/db-3.2:* )
1004 - cdb? ( || ( >=dev-db/tinycdb-0.76 >=dev-db/cdb-0.75-r4 ) )
1005 - eai? ( dev-libs/icu:= )
1006 - ldap? ( net-nds/openldap )
1007 - ldap-bind? ( net-nds/openldap[sasl] )
1008 - lmdb? ( >=dev-db/lmdb-0.9.11 )
1009 - mysql? ( virtual/mysql )
1010 - pam? ( virtual/pam )
1011 - postgres? ( dev-db/postgresql:* )
1012 - sasl? ( >=dev-libs/cyrus-sasl-2 )
1013 - sqlite? ( dev-db/sqlite:3 )
1014 - ssl? (
1015 - !libressl? ( dev-libs/openssl:0 )
1016 - libressl? ( dev-libs/libressl )
1017 - )"
1018 -
1019 -RDEPEND="${DEPEND}
1020 - dovecot-sasl? ( net-mail/dovecot )
1021 - memcached? ( net-misc/memcached )
1022 - net-mail/mailbase
1023 - !mail-mta/courier
1024 - !mail-mta/esmtp
1025 - !mail-mta/exim
1026 - !mail-mta/mini-qmail
1027 - !mail-mta/msmtp[mta]
1028 - !mail-mta/netqmail
1029 - !mail-mta/nullmailer
1030 - !mail-mta/qmail-ldap
1031 - !mail-mta/sendmail
1032 - !mail-mta/opensmtpd
1033 - !<mail-mta/ssmtp-2.64-r2
1034 - !>=mail-mta/ssmtp-2.64-r2[mta]
1035 - !net-mail/fastforward
1036 - selinux? ( sec-policy/selinux-postfix )"
1037 -
1038 -REQUIRED_USE="ldap-bind? ( ldap sasl )"
1039 -
1040 -S="${WORKDIR}/${MY_SRC}"
1041 -
1042 -pkg_setup() {
1043 - # Add postfix, postdrop user/group (bug #77565)
1044 - enewgroup postfix 207
1045 - enewgroup postdrop 208
1046 - enewuser postfix 207 -1 /var/spool/postfix postfix,mail
1047 -}
1048 -
1049 -src_prepare() {
1050 - default
1051 - sed -i -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/mail/aliases|" \
1052 - src/util/sys_defs.h || die "sed failed"
1053 - # change default paths to better comply with portage standard paths
1054 - sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || die "sed failed"
1055 - eapply -p0 "${FILESDIR}/${PN}-libressl.patch"
1056 - eapply -p0 "${FILESDIR}/${PN}-libressl-runtime.patch"
1057 -}
1058 -
1059 -src_configure() {
1060 - for name in CDB LDAP LMDB MYSQL PCRE PGSQL SDBM SQLITE
1061 - do
1062 - local AUXLIBS_${name}=""
1063 - done
1064 -
1065 - # Make sure LDFLAGS get passed down to the executables.
1066 - local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -ldl"
1067 - AUXLIBS_PCRE="$(pcre-config --libs)"
1068 -
1069 - use pam && mylibs="${mylibs} -lpam"
1070 -
1071 - if use ldap; then
1072 - mycc="${mycc} -DHAS_LDAP"
1073 - AUXLIBS_LDAP="-lldap -llber"
1074 - fi
1075 -
1076 - if use mysql; then
1077 - mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)"
1078 - AUXLIBS_MYSQL="$(mysql_config --libs)"
1079 - fi
1080 -
1081 - if use postgres; then
1082 - mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)"
1083 - AUXLIBS_PGSQL="-L$(pg_config --libdir) -lpq"
1084 - fi
1085 -
1086 - if use sqlite; then
1087 - mycc="${mycc} -DHAS_SQLITE"
1088 - AUXLIBS_SQLITE="-lsqlite3 -lpthread"
1089 - fi
1090 -
1091 - if use ssl; then
1092 - mycc="${mycc} -DUSE_TLS"
1093 - mylibs="${mylibs} -lssl -lcrypto"
1094 - fi
1095 -
1096 - if use lmdb; then
1097 - mycc="${mycc} -DHAS_LMDB"
1098 - AUXLIBS_LMDB="-llmdb -lpthread"
1099 - fi
1100 -
1101 - if ! use eai; then
1102 - mycc="${mycc} -DNO_EAI"
1103 - fi
1104 -
1105 - # broken. and "in other words, not supported" by upstream.
1106 - # Use inet_protocols setting in main.cf
1107 - #if ! use ipv6; then
1108 - # mycc="${mycc} -DNO_IPV6"
1109 - #fi
1110 -
1111 - if use sasl; then
1112 - if use dovecot-sasl; then
1113 - # Set dovecot as default.
1114 - mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\""
1115 - fi
1116 - if use ldap-bind; then
1117 - mycc="${mycc} -DUSE_LDAP_SASL"
1118 - fi
1119 - mycc="${mycc} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl"
1120 - mylibs="${mylibs} -lsasl2"
1121 - elif use dovecot-sasl; then
1122 - mycc="${mycc} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\""
1123 - fi
1124 -
1125 - if ! use nis; then
1126 - mycc="${mycc} -DNO_NIS"
1127 - fi
1128 -
1129 - if ! use berkdb; then
1130 - mycc="${mycc} -DNO_DB"
1131 - if use cdb; then
1132 - # change default hash format from Berkeley DB to cdb
1133 - mycc="${mycc} -DDEF_DB_TYPE=\\\"cdb\\\""
1134 - fi
1135 - fi
1136 -
1137 - if use cdb; then
1138 - mycc="${mycc} -DHAS_CDB -I/usr/include/cdb"
1139 - # Tinycdb is preferred.
1140 - if has_version dev-db/tinycdb ; then
1141 - einfo "Building with dev-db/tinycdb"
1142 - AUXLIBS_CDB="-lcdb"
1143 - else
1144 - einfo "Building with dev-db/cdb"
1145 - CDB_PATH="/usr/$(get_libdir)"
1146 - for i in cdb.a alloc.a buffer.a unix.a byte.a ; do
1147 - AUXLIBS_CDB="${AUXLIBS_CDB} ${CDB_PATH}/${i}"
1148 - done
1149 - fi
1150 - fi
1151 -
1152 - # Robin H. Johnson <robbat2@g.o> 17/Nov/2006
1153 - # Fix because infra boxes hit 2Gb .db files that fail a 32-bit fstat signed check.
1154 - mycc="${mycc} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
1155 - filter-lfs-flags
1156 -
1157 - # Workaround for bug #76512
1158 - if use hardened; then
1159 - [[ "$(gcc-version)" == "3.4" ]] && replace-flags -O? -Os
1160 - fi
1161 -
1162 - # Remove annoying C++ comment style warnings - bug #378099
1163 - append-flags -Wno-comment
1164 -
1165 - sed -i -e "/^RANLIB/s/ranlib/$(tc-getRANLIB)/g" "${S}"/makedefs
1166 - sed -i -e "/^AR/s/ar/$(tc-getAR)/g" "${S}"/makedefs
1167 -
1168 - emake makefiles shared=yes dynamicmaps=no pie=yes \
1169 - shlib_directory="/usr/$(get_libdir)/postfix/MAIL_VERSION" \
1170 - DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" \
1171 - AUXLIBS_CDB="${AUXLIBS_CDB}" AUXLIBS_LDAP="${AUXLIBS_LDAP}" \
1172 - AUXLIBS_LMDB="${AUXLIBS_LMDB}" AUXLIBS_MYSQL="${AUXLIBS_MYSQL}" \
1173 - AUXLIBS_PCRE="${AUXLIBS_PCRE}" AUXLIBS_PGSQL="${AUXLIBS_PGSQL}" \
1174 - AUXLIBS_SQLITE="${AUXLIBS_SQLITE}"
1175 -}
1176 -
1177 -src_install () {
1178 - local myconf
1179 - use doc && myconf="readme_directory=\"/usr/share/doc/${PF}/readme\" \
1180 - html_directory=\"/usr/share/doc/${PF}/html\""
1181 -
1182 - LD_LIBRARY_PATH="${S}/lib" \
1183 - /bin/sh postfix-install \
1184 - -non-interactive \
1185 - install_root="${D}" \
1186 - config_directory="/etc/postfix" \
1187 - manpage_directory="/usr/share/man" \
1188 - command_directory="/usr/sbin" \
1189 - mailq_path="/usr/bin/mailq" \
1190 - newaliases_path="/usr/bin/newaliases" \
1191 - sendmail_path="/usr/sbin/sendmail" \
1192 - ${myconf} \
1193 - || die "postfix-install failed"
1194 -
1195 - # Fix spool removal on upgrade
1196 - rm -Rf "${D}"/var
1197 - keepdir /var/spool/postfix
1198 -
1199 - # Install rmail for UUCP, closes bug #19127
1200 - dobin auxiliary/rmail/rmail
1201 -
1202 - # Provide another link for legacy FSH
1203 - dosym ../sbin/sendmail /usr/$(get_libdir)/sendmail
1204 -
1205 - # Install qshape, posttls-finger and collate
1206 - dobin auxiliary/qshape/qshape.pl
1207 - doman man/man1/qshape.1
1208 - dobin bin/posttls-finger
1209 - doman man/man1/posttls-finger.1
1210 - dobin auxiliary/collate/collate.pl
1211 - newdoc auxiliary/collate/README README.collate
1212 -
1213 - # Performance tuning tools and their manuals
1214 - dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink}
1215 - doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1
1216 -
1217 - keepdir /etc/postfix
1218 - if use mbox; then
1219 - mypostconf="mail_spool_directory=/var/spool/mail"
1220 - else
1221 - mypostconf="home_mailbox=.maildir/"
1222 - fi
1223 - LD_LIBRARY_PATH="${S}/lib" \
1224 - "${D}"/usr/sbin/postconf -c "${D}"/etc/postfix \
1225 - -e ${mypostconf} || die "postconf failed"
1226 -
1227 - insinto /etc/postfix
1228 - newins "${FILESDIR}"/smtp.pass saslpass
1229 - fperms 600 /etc/postfix/saslpass
1230 -
1231 - newinitd "${FILESDIR}"/postfix.rc6.${RC_VER} postfix
1232 - # do not start mysql/postgres unnecessarily - bug #359913
1233 - use mysql || sed -i -e "s/mysql //" "${D}/etc/init.d/postfix"
1234 - use postgres || sed -i -e "s/postgresql //" "${D}/etc/init.d/postfix"
1235 -
1236 - dodoc *README COMPATIBILITY HISTORY PORTING RELEASE_NOTES*
1237 - use doc && mv "${S}"/examples "${D}"/usr/share/doc/${PF}/
1238 -
1239 - pamd_mimic_system smtp auth account
1240 -
1241 - if use sasl; then
1242 - insinto /etc/sasl2
1243 - newins "${FILESDIR}"/smtp.sasl smtpd.conf
1244 - fi
1245 -
1246 - # header files
1247 - insinto /usr/include/postfix
1248 - doins include/*.h
1249 -
1250 - if has_version mail-mta/postfix; then
1251 - # let the sysadmin decide when to change the compatibility_level
1252 - sed -i -e /^compatibility_level/"s/^/#/" "${D}"/etc/postfix/main.cf || die
1253 - fi
1254 -
1255 - systemd_dounit "${FILESDIR}/${PN}.service"
1256 -}
1257 -
1258 -pkg_postinst() {
1259 - if [[ ! -e /etc/mail/aliases.db ]] ; then
1260 - ewarn
1261 - ewarn "You must edit /etc/mail/aliases to suit your needs"
1262 - ewarn "and then run /usr/bin/newaliases. Postfix will not"
1263 - ewarn "work correctly without it."
1264 - ewarn
1265 - fi
1266 -
1267 - # check and fix file permissions
1268 - "${EROOT}"/usr/sbin/postfix set-permissions 2>/dev/null
1269 -
1270 - # configure tls
1271 - if use ssl ; then
1272 - if "${EROOT}"/usr/sbin/postfix tls all-default-client; then
1273 - elog "To configure client side TLS settings:"
1274 - elog "${EROOT}"usr/sbin/postfix tls enable-client
1275 - fi
1276 - if "${EROOT}"/usr/sbin/postfix tls all-default-server; then
1277 - elog "To configure server side TLS settings:"
1278 - elog "${EROOT}"usr/sbin/postfix tls enable-server
1279 - fi
1280 - fi
1281 -}
1282
1283 diff --git a/mail-mta/postfix/postfix-3.3.0.ebuild b/mail-mta/postfix/postfix-3.3.0.ebuild
1284 deleted file mode 100644
1285 index 517cc59b64e..00000000000
1286 --- a/mail-mta/postfix/postfix-3.3.0.ebuild
1287 +++ /dev/null
1288 @@ -1,301 +0,0 @@
1289 -# Copyright 1999-2018 Gentoo Foundation
1290 -# Distributed under the terms of the GNU General Public License v2
1291 -
1292 -EAPI=6
1293 -inherit flag-o-matic pam systemd toolchain-funcs user
1294 -
1295 -MY_PV="${PV/_rc/-RC}"
1296 -MY_SRC="${PN}-${MY_PV}"
1297 -MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/official"
1298 -RC_VER="2.7"
1299 -
1300 -DESCRIPTION="A fast and secure drop-in replacement for sendmail"
1301 -HOMEPAGE="http://www.postfix.org/"
1302 -SRC_URI="${MY_URI}/${MY_SRC}.tar.gz"
1303 -
1304 -LICENSE="|| ( IBM EPL-2.0 )"
1305 -SLOT="0"
1306 -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
1307 -IUSE="+berkdb cdb doc dovecot-sasl +eai hardened ldap ldap-bind libressl lmdb memcached mbox mysql nis pam postgres sasl selinux sqlite ssl"
1308 -
1309 -DEPEND=">=dev-libs/libpcre-3.4
1310 - dev-lang/perl
1311 - berkdb? ( >=sys-libs/db-3.2:* )
1312 - cdb? ( || ( >=dev-db/tinycdb-0.76 >=dev-db/cdb-0.75-r4 ) )
1313 - eai? ( dev-libs/icu:= )
1314 - ldap? ( net-nds/openldap )
1315 - ldap-bind? ( net-nds/openldap[sasl] )
1316 - lmdb? ( >=dev-db/lmdb-0.9.11 )
1317 - mysql? ( virtual/mysql )
1318 - nis? ( net-libs/libnsl )
1319 - pam? ( virtual/pam )
1320 - postgres? ( dev-db/postgresql:* )
1321 - sasl? ( >=dev-libs/cyrus-sasl-2 )
1322 - sqlite? ( dev-db/sqlite:3 )
1323 - ssl? (
1324 - !libressl? ( dev-libs/openssl:0 )
1325 - libressl? ( dev-libs/libressl )
1326 - )"
1327 -
1328 -RDEPEND="${DEPEND}
1329 - memcached? ( net-misc/memcached )
1330 - net-mail/mailbase
1331 - !mail-mta/courier
1332 - !mail-mta/esmtp
1333 - !mail-mta/exim
1334 - !mail-mta/mini-qmail
1335 - !mail-mta/msmtp[mta]
1336 - !mail-mta/netqmail
1337 - !mail-mta/nullmailer
1338 - !mail-mta/qmail-ldap
1339 - !mail-mta/sendmail
1340 - !mail-mta/opensmtpd
1341 - !<mail-mta/ssmtp-2.64-r2
1342 - !>=mail-mta/ssmtp-2.64-r2[mta]
1343 - !net-mail/fastforward
1344 - selinux? ( sec-policy/selinux-postfix )"
1345 -
1346 -REQUIRED_USE="ldap-bind? ( ldap sasl )"
1347 -
1348 -S="${WORKDIR}/${MY_SRC}"
1349 -
1350 -pkg_setup() {
1351 - # Add postfix, postdrop user/group (bug #77565)
1352 - enewgroup postfix 207
1353 - enewgroup postdrop 208
1354 - enewuser postfix 207 -1 /var/spool/postfix postfix,mail
1355 -}
1356 -
1357 -src_prepare() {
1358 - default
1359 - sed -i -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/mail/aliases|" \
1360 - src/util/sys_defs.h || die "sed failed"
1361 - # change default paths to better comply with portage standard paths
1362 - sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || die "sed failed"
1363 - eapply -p0 "${FILESDIR}/${PN}-libressl.patch"
1364 - eapply -p0 "${FILESDIR}/${PN}-libressl-runtime.patch"
1365 -}
1366 -
1367 -src_configure() {
1368 - for name in CDB LDAP LMDB MYSQL PCRE PGSQL SDBM SQLITE
1369 - do
1370 - local AUXLIBS_${name}=""
1371 - done
1372 -
1373 - # Make sure LDFLAGS get passed down to the executables.
1374 - local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -ldl"
1375 - AUXLIBS_PCRE="$(pcre-config --libs)"
1376 -
1377 - use pam && mylibs="${mylibs} -lpam"
1378 -
1379 - if use ldap; then
1380 - mycc="${mycc} -DHAS_LDAP"
1381 - AUXLIBS_LDAP="-lldap -llber"
1382 - fi
1383 -
1384 - if use mysql; then
1385 - mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)"
1386 - AUXLIBS_MYSQL="$(mysql_config --libs)"
1387 - fi
1388 -
1389 - if use postgres; then
1390 - mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)"
1391 - AUXLIBS_PGSQL="-L$(pg_config --libdir) -lpq"
1392 - fi
1393 -
1394 - if use sqlite; then
1395 - mycc="${mycc} -DHAS_SQLITE"
1396 - AUXLIBS_SQLITE="-lsqlite3 -lpthread"
1397 - fi
1398 -
1399 - if use ssl; then
1400 - mycc="${mycc} -DUSE_TLS"
1401 - mylibs="${mylibs} -lssl -lcrypto"
1402 - fi
1403 -
1404 - if use lmdb; then
1405 - mycc="${mycc} -DHAS_LMDB"
1406 - AUXLIBS_LMDB="-llmdb -lpthread"
1407 - fi
1408 -
1409 - if ! use eai; then
1410 - mycc="${mycc} -DNO_EAI"
1411 - fi
1412 -
1413 - # broken. and "in other words, not supported" by upstream.
1414 - # Use inet_protocols setting in main.cf
1415 - #if ! use ipv6; then
1416 - # mycc="${mycc} -DNO_IPV6"
1417 - #fi
1418 -
1419 - if use sasl; then
1420 - if use dovecot-sasl; then
1421 - # Set dovecot as default.
1422 - mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\""
1423 - fi
1424 - if use ldap-bind; then
1425 - mycc="${mycc} -DUSE_LDAP_SASL"
1426 - fi
1427 - mycc="${mycc} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl"
1428 - mylibs="${mylibs} -lsasl2"
1429 - elif use dovecot-sasl; then
1430 - mycc="${mycc} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\""
1431 - fi
1432 -
1433 - if ! use nis; then
1434 - mycc="${mycc} -DNO_NIS"
1435 - fi
1436 -
1437 - if ! use berkdb; then
1438 - mycc="${mycc} -DNO_DB"
1439 - if use cdb; then
1440 - # change default hash format from Berkeley DB to cdb
1441 - mycc="${mycc} -DDEF_DB_TYPE=\\\"cdb\\\""
1442 - fi
1443 - fi
1444 -
1445 - if use cdb; then
1446 - mycc="${mycc} -DHAS_CDB -I/usr/include/cdb"
1447 - # Tinycdb is preferred.
1448 - if has_version dev-db/tinycdb ; then
1449 - einfo "Building with dev-db/tinycdb"
1450 - AUXLIBS_CDB="-lcdb"
1451 - else
1452 - einfo "Building with dev-db/cdb"
1453 - CDB_PATH="/usr/$(get_libdir)"
1454 - for i in cdb.a alloc.a buffer.a unix.a byte.a ; do
1455 - AUXLIBS_CDB="${AUXLIBS_CDB} ${CDB_PATH}/${i}"
1456 - done
1457 - fi
1458 - fi
1459 -
1460 - # Robin H. Johnson <robbat2@g.o> 17/Nov/2006
1461 - # Fix because infra boxes hit 2Gb .db files that fail a 32-bit fstat signed check.
1462 - mycc="${mycc} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
1463 - filter-lfs-flags
1464 -
1465 - # Workaround for bug #76512
1466 - if use hardened; then
1467 - [[ "$(gcc-version)" == "3.4" ]] && replace-flags -O? -Os
1468 - fi
1469 -
1470 - # Remove annoying C++ comment style warnings - bug #378099
1471 - append-flags -Wno-comment
1472 -
1473 - sed -i -e "/^RANLIB/s/ranlib/$(tc-getRANLIB)/g" "${S}"/makedefs
1474 - sed -i -e "/^AR/s/ar/$(tc-getAR)/g" "${S}"/makedefs
1475 -
1476 - emake makefiles shared=yes dynamicmaps=no pie=yes \
1477 - shlib_directory="/usr/$(get_libdir)/postfix/MAIL_VERSION" \
1478 - DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" \
1479 - AUXLIBS_CDB="${AUXLIBS_CDB}" AUXLIBS_LDAP="${AUXLIBS_LDAP}" \
1480 - AUXLIBS_LMDB="${AUXLIBS_LMDB}" AUXLIBS_MYSQL="${AUXLIBS_MYSQL}" \
1481 - AUXLIBS_PCRE="${AUXLIBS_PCRE}" AUXLIBS_PGSQL="${AUXLIBS_PGSQL}" \
1482 - AUXLIBS_SQLITE="${AUXLIBS_SQLITE}"
1483 -}
1484 -
1485 -src_install () {
1486 - local myconf
1487 - use doc && myconf="readme_directory=\"/usr/share/doc/${PF}/readme\" \
1488 - html_directory=\"/usr/share/doc/${PF}/html\""
1489 -
1490 - LD_LIBRARY_PATH="${S}/lib" \
1491 - /bin/sh postfix-install \
1492 - -non-interactive \
1493 - install_root="${D}" \
1494 - config_directory="/etc/postfix" \
1495 - manpage_directory="/usr/share/man" \
1496 - command_directory="/usr/sbin" \
1497 - mailq_path="/usr/bin/mailq" \
1498 - newaliases_path="/usr/bin/newaliases" \
1499 - sendmail_path="/usr/sbin/sendmail" \
1500 - ${myconf} \
1501 - || die "postfix-install failed"
1502 -
1503 - # Fix spool removal on upgrade
1504 - rm -Rf "${D}"/var
1505 - keepdir /var/spool/postfix
1506 -
1507 - # Install rmail for UUCP, closes bug #19127
1508 - dobin auxiliary/rmail/rmail
1509 -
1510 - # Provide another link for legacy FSH
1511 - dosym ../sbin/sendmail /usr/$(get_libdir)/sendmail
1512 -
1513 - # Install qshape, posttls-finger and collate
1514 - dobin auxiliary/qshape/qshape.pl
1515 - doman man/man1/qshape.1
1516 - dobin bin/posttls-finger
1517 - doman man/man1/posttls-finger.1
1518 - dobin auxiliary/collate/collate.pl
1519 - newdoc auxiliary/collate/README README.collate
1520 -
1521 - # Performance tuning tools and their manuals
1522 - dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink}
1523 - doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1
1524 -
1525 - keepdir /etc/postfix
1526 - if use mbox; then
1527 - mypostconf="mail_spool_directory=/var/spool/mail"
1528 - else
1529 - mypostconf="home_mailbox=.maildir/"
1530 - fi
1531 - LD_LIBRARY_PATH="${S}/lib" \
1532 - "${D}"/usr/sbin/postconf -c "${D}"/etc/postfix \
1533 - -e ${mypostconf} || die "postconf failed"
1534 -
1535 - insinto /etc/postfix
1536 - newins "${FILESDIR}"/smtp.pass saslpass
1537 - fperms 600 /etc/postfix/saslpass
1538 -
1539 - newinitd "${FILESDIR}"/postfix.rc6.${RC_VER} postfix
1540 - # do not start mysql/postgres unnecessarily - bug #359913
1541 - use mysql || sed -i -e "s/mysql //" "${D}/etc/init.d/postfix"
1542 - use postgres || sed -i -e "s/postgresql //" "${D}/etc/init.d/postfix"
1543 -
1544 - dodoc *README COMPATIBILITY HISTORY PORTING RELEASE_NOTES*
1545 - use doc && mv "${S}"/examples "${D}"/usr/share/doc/${PF}/
1546 -
1547 - pamd_mimic_system smtp auth account
1548 -
1549 - if use sasl; then
1550 - insinto /etc/sasl2
1551 - newins "${FILESDIR}"/smtp.sasl smtpd.conf
1552 - fi
1553 -
1554 - # header files
1555 - insinto /usr/include/postfix
1556 - doins include/*.h
1557 -
1558 - if has_version mail-mta/postfix; then
1559 - # let the sysadmin decide when to change the compatibility_level
1560 - sed -i -e /^compatibility_level/"s/^/#/" "${D}"/etc/postfix/main.cf || die
1561 - fi
1562 -
1563 - systemd_dounit "${FILESDIR}/${PN}.service"
1564 -}
1565 -
1566 -pkg_postinst() {
1567 - if [[ ! -e /etc/mail/aliases.db ]] ; then
1568 - ewarn
1569 - ewarn "You must edit /etc/mail/aliases to suit your needs"
1570 - ewarn "and then run /usr/bin/newaliases. Postfix will not"
1571 - ewarn "work correctly without it."
1572 - ewarn
1573 - fi
1574 -
1575 - # check and fix file permissions
1576 - "${EROOT}"/usr/sbin/postfix set-permissions 2>/dev/null
1577 -
1578 - # configure tls
1579 - if use ssl ; then
1580 - if "${EROOT}"/usr/sbin/postfix tls all-default-client; then
1581 - elog "To configure client side TLS settings:"
1582 - elog "${EROOT}"usr/sbin/postfix tls enable-client
1583 - fi
1584 - if "${EROOT}"/usr/sbin/postfix tls all-default-server; then
1585 - elog "To configure server side TLS settings:"
1586 - elog "${EROOT}"usr/sbin/postfix tls enable-server
1587 - fi
1588 - fi
1589 -}