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