1 |
commit: 04d4d1b35999e41cb05ee7050eac56b0c831a6eb |
2 |
Author: Eray Aslan <eras <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Oct 10 11:02:47 2016 +0000 |
4 |
Commit: Eray Aslan <eras <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Oct 10 11:02:47 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=04d4d1b3 |
7 |
|
8 |
mail-mta/postfix: remove old |
9 |
|
10 |
Package-Manager: portage-2.3.1 |
11 |
|
12 |
mail-mta/postfix/Manifest | 1 - |
13 |
mail-mta/postfix/postfix-3.1.1-r2.ebuild | 308 ------------------------------ |
14 |
mail-mta/postfix/postfix-3.1.1.ebuild | 311 ------------------------------- |
15 |
mail-mta/postfix/postfix-3.1.2.ebuild | 308 ------------------------------ |
16 |
4 files changed, 928 deletions(-) |
17 |
|
18 |
diff --git a/mail-mta/postfix/Manifest b/mail-mta/postfix/Manifest |
19 |
index b97519a..fe99300 100644 |
20 |
--- a/mail-mta/postfix/Manifest |
21 |
+++ b/mail-mta/postfix/Manifest |
22 |
@@ -3,7 +3,6 @@ DIST postfix-3.0.2.tar.gz 4239235 SHA256 68256314202f5f0f24022d64f7ac664d28fa139 |
23 |
DIST postfix-3.0.3.tar.gz 4240588 SHA256 401e46ec3450569dcce60d1d8ca22a19ab1f7f817b0cc730cdf4875ba608ac02 SHA512 b6cd091a8cdda9678fa2979082e47a363dd086e4376effc0a427d1beb5eb35bd7dc28003ad28323c42318d7f630e0d8b105c56fd1a63bd5b5a20501db68ac524 WHIRLPOOL b013164f12e2adde464052f37584320687716f18c65cdd01344848bbcdd5a08be16c741234a063d717474a50be0d14d7b5574ccb69dc56e00f30b619d148c9f9 |
24 |
DIST postfix-3.0.7.tar.gz 4242726 SHA256 2cc47eec71f0dbbe990d1e0de5b2b5236eacce503e4c4eefe753366b80106ab8 SHA512 0663337c091ac9f8cadcb44d33f1cd4716f718fb0bc8f55c300e87cc96517d2b11cb71855f4ea1d8b88dc5a76d14718bbd22ad46e5ad15afaf43bd88fa850efc WHIRLPOOL 20078faba287247e49cffa630b911151323203659de5275c3ad6bbffdcd17dc09acac56b2631aabc9d1dd8e45d8a3b63baa3d1fe55ae94e6059f5951e8c9c9a2 |
25 |
DIST postfix-3.1.0.tar.gz 4336709 SHA256 88ac3e92755629077d9363319b1fa0db406efb10c2f22cdbb941bd8ab36fd733 SHA512 06cf4c827de8d613cab6a57a8e76198d293660a263f60d17dd189f511da4b1e12eb98bbcf75695697a62959e26ca204bf2a53eb6657e8bd756a816977e717783 WHIRLPOOL 5fe4350d47051cfda00505012493f5c6f70598be901cd94a598a7e3332bc022b41050935c5263f140f0df573e3a3e00f6b97dd1d90c01a4e3d78a039f47a16a8 |
26 |
-DIST postfix-3.1.1.tar.gz 4337295 SHA256 3deda4c34631970490b1b5fbb559905f93531bf1c7eb00e38b0d0deb1dba9982 SHA512 e094dae3c3aaf6be23edefb7863d2f9fb57cd4e705464f17799fa4f71f9877efdf3f59ceb1970457a0dc6e6f3237ee06131f4ce1b21a5db9a61fe0c5f95a219d WHIRLPOOL 4dbf26e498cb48ebf5d5721aa69447deed4db25dd2a9159514826eb7d4986dd7fef40980281f0872f565750ed5d316f831856b87eaaabfed3df8b23f982592cd |
27 |
DIST postfix-3.1.2.tar.gz 4337569 SHA256 1ab9b4ee6bf9eb37d2467a63244132aab22ac23b91a72f327334e236b0d30f6b SHA512 58493d1890c3235d74a18365294ca764bd3b3f278b9825da931005165af60250342c6cf477c3b3575e50858d99cd3ee40f22bece094eb61e9be6c3cf0313d571 WHIRLPOOL 37e90ef6275a7f2dc8f712bb05348861098697438f274a5c5b69f50b31d55574af262a658657863c93f77fdeba2d37bf7b30dc43bf1629615f496ede19a89c00 |
28 |
DIST postfix-3.1.3.tar.gz 4338730 SHA256 52f8127e6797e2617a36d0afb9473c55e95c3a777b6280df3f106168fd814979 SHA512 00e2b0974e59420cabfddc92597a99b42c8a8c9cd9a0c279c63ba6be9f40b15400f37dc16d0b1312130e72b5ba82b56fc7d579ee9ef975a957c0931b0401213c WHIRLPOOL 7274501921349e1f99344adb500638e91b92f3a3a87ec2171add18d58b926478459d4540a15f421c52175efb61d220c98438a9727adf5473d609d1b94480b663 |
29 |
DIST postfix-3.2-20161008.tar.gz 4350036 SHA256 9abd0e09767d19ac03d8eb44c806d865cdbe83e9881e17d7c60f8fc9be34a14c SHA512 c7eda9a28c2c4b873af8a6f86cff479bd99877ef4a55fa709ca5441f2da97ea92994334e858211cd7c2803a3a77650b7e4f919a28fa04258e24e77747f5bcd3a WHIRLPOOL e82e5052221749131badb4bb3aaea3aa98d4438b69dfd6d50680355fce6bde5f58630dbf13f324d67914536b2e264811f0fe6521a60defb2a61b8ab8e4a66a14 |
30 |
|
31 |
diff --git a/mail-mta/postfix/postfix-3.1.1-r2.ebuild b/mail-mta/postfix/postfix-3.1.1-r2.ebuild |
32 |
deleted file mode 100644 |
33 |
index 56d5b0e..00000000 |
34 |
--- a/mail-mta/postfix/postfix-3.1.1-r2.ebuild |
35 |
+++ /dev/null |
36 |
@@ -1,308 +0,0 @@ |
37 |
-# Copyright 1999-2016 Gentoo Foundation |
38 |
-# Distributed under the terms of the GNU General Public License v2 |
39 |
-# $Id$ |
40 |
- |
41 |
-EAPI=6 |
42 |
-inherit flag-o-matic pam systemd toolchain-funcs user |
43 |
- |
44 |
-MY_PV="${PV/_rc/-RC}" |
45 |
-MY_SRC="${PN}-${MY_PV}" |
46 |
-MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/official" |
47 |
-RC_VER="2.7" |
48 |
- |
49 |
-DESCRIPTION="A fast and secure drop-in replacement for sendmail" |
50 |
-HOMEPAGE="http://www.postfix.org/" |
51 |
-SRC_URI="${MY_URI}/${MY_SRC}.tar.gz" |
52 |
- |
53 |
-LICENSE="IBM" |
54 |
-SLOT="0" |
55 |
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd" |
56 |
-IUSE="+berkdb cdb doc dovecot-sasl +eai hardened ldap ldap-bind libressl lmdb memcached mbox mysql nis pam postgres sasl selinux sqlite ssl" |
57 |
- |
58 |
-DEPEND=">=dev-libs/libpcre-3.4 |
59 |
- dev-lang/perl |
60 |
- berkdb? ( >=sys-libs/db-3.2:* ) |
61 |
- cdb? ( || ( >=dev-db/tinycdb-0.76 >=dev-db/cdb-0.75-r4 ) ) |
62 |
- eai? ( dev-libs/icu:= ) |
63 |
- ldap? ( net-nds/openldap ) |
64 |
- ldap-bind? ( net-nds/openldap[sasl] ) |
65 |
- lmdb? ( >=dev-db/lmdb-0.9.11 ) |
66 |
- mysql? ( virtual/mysql ) |
67 |
- pam? ( virtual/pam ) |
68 |
- postgres? ( dev-db/postgresql:* ) |
69 |
- sasl? ( >=dev-libs/cyrus-sasl-2 ) |
70 |
- sqlite? ( dev-db/sqlite:3 ) |
71 |
- ssl? ( |
72 |
- !libressl? ( dev-libs/openssl:0 ) |
73 |
- libressl? ( dev-libs/libressl ) |
74 |
- )" |
75 |
- |
76 |
-RDEPEND="${DEPEND} |
77 |
- dovecot-sasl? ( net-mail/dovecot ) |
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-2.64-r2 |
91 |
- !>=mail-mta/ssmtp-2.64-r2[mta] |
92 |
- !net-mail/fastforward |
93 |
- selinux? ( sec-policy/selinux-postfix )" |
94 |
- |
95 |
-REQUIRED_USE="ldap-bind? ( ldap sasl )" |
96 |
- |
97 |
-S="${WORKDIR}/${MY_SRC}" |
98 |
- |
99 |
-pkg_setup() { |
100 |
- # Add postfix, postdrop user/group (bug #77565) |
101 |
- enewgroup postfix 207 |
102 |
- enewgroup postdrop 208 |
103 |
- enewuser postfix 207 -1 /var/spool/postfix postfix,mail |
104 |
-} |
105 |
- |
106 |
-src_prepare() { |
107 |
- default |
108 |
- sed -i -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/mail/aliases|" \ |
109 |
- src/util/sys_defs.h || die "sed failed" |
110 |
- # change default paths to better comply with portage standard paths |
111 |
- sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || die "sed failed" |
112 |
- eapply -p0 "${FILESDIR}/${PN}-libressl.patch" |
113 |
-} |
114 |
- |
115 |
-src_configure() { |
116 |
- for name in CDB LDAP LMDB MYSQL PCRE PGSQL SDBM SQLITE |
117 |
- do |
118 |
- local AUXLIBS_${name}="" |
119 |
- done |
120 |
- |
121 |
- # Make sure LDFLAGS get passed down to the executables. |
122 |
- local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -ldl" |
123 |
- AUXLIBS_PCRE="$(pcre-config --libs)" |
124 |
- |
125 |
- use pam && mylibs="${mylibs} -lpam" |
126 |
- |
127 |
- if use ldap; then |
128 |
- mycc="${mycc} -DHAS_LDAP" |
129 |
- AUXLIBS_LDAP="-lldap -llber" |
130 |
- fi |
131 |
- |
132 |
- if use mysql; then |
133 |
- mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)" |
134 |
- AUXLIBS_MYSQL="$(mysql_config --libs)" |
135 |
- fi |
136 |
- |
137 |
- if use postgres; then |
138 |
- mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)" |
139 |
- AUXLIBS_PGSQL="-L$(pg_config --libdir) -lpq" |
140 |
- fi |
141 |
- |
142 |
- if use sqlite; then |
143 |
- mycc="${mycc} -DHAS_SQLITE" |
144 |
- AUXLIBS_SQLITE="-lsqlite3 -lpthread" |
145 |
- fi |
146 |
- |
147 |
- if use ssl; then |
148 |
- mycc="${mycc} -DUSE_TLS" |
149 |
- mylibs="${mylibs} -lssl -lcrypto" |
150 |
- fi |
151 |
- |
152 |
- if use lmdb; then |
153 |
- mycc="${mycc} -DHAS_LMDB" |
154 |
- AUXLIBS_LMDB="-llmdb -lpthread" |
155 |
- fi |
156 |
- |
157 |
- if ! use eai; then |
158 |
- mycc="${mycc} -DNO_EAI" |
159 |
- fi |
160 |
- |
161 |
- # broken. and "in other words, not supported" by upstream. |
162 |
- # Use inet_protocols setting in main.cf |
163 |
- #if ! use ipv6; then |
164 |
- # mycc="${mycc} -DNO_IPV6" |
165 |
- #fi |
166 |
- |
167 |
- if use sasl; then |
168 |
- if use dovecot-sasl; then |
169 |
- # Set dovecot as default. |
170 |
- mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\"" |
171 |
- fi |
172 |
- if use ldap-bind; then |
173 |
- mycc="${mycc} -DUSE_LDAP_SASL" |
174 |
- fi |
175 |
- mycc="${mycc} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl" |
176 |
- mylibs="${mylibs} -lsasl2" |
177 |
- elif use dovecot-sasl; then |
178 |
- mycc="${mycc} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\"" |
179 |
- fi |
180 |
- |
181 |
- if ! use nis; then |
182 |
- mycc="${mycc} -DNO_NIS" |
183 |
- fi |
184 |
- |
185 |
- if ! use berkdb; then |
186 |
- mycc="${mycc} -DNO_DB" |
187 |
- if use cdb; then |
188 |
- # change default hash format from Berkeley DB to cdb |
189 |
- mycc="${mycc} -DDEF_DB_TYPE=\\\"cdb\\\"" |
190 |
- fi |
191 |
- fi |
192 |
- |
193 |
- if use cdb; then |
194 |
- mycc="${mycc} -DHAS_CDB -I/usr/include/cdb" |
195 |
- # Tinycdb is preferred. |
196 |
- if has_version dev-db/tinycdb ; then |
197 |
- einfo "Building with dev-db/tinycdb" |
198 |
- AUXLIBS_CDB="-lcdb" |
199 |
- else |
200 |
- einfo "Building with dev-db/cdb" |
201 |
- CDB_PATH="/usr/$(get_libdir)" |
202 |
- for i in cdb.a alloc.a buffer.a unix.a byte.a ; do |
203 |
- AUXLIBS_CDB="${AUXLIBS_CDB} ${CDB_PATH}/${i}" |
204 |
- done |
205 |
- fi |
206 |
- fi |
207 |
- |
208 |
- # Robin H. Johnson <robbat2@g.o> 17/Nov/2006 |
209 |
- # Fix because infra boxes hit 2Gb .db files that fail a 32-bit fstat signed check. |
210 |
- mycc="${mycc} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE" |
211 |
- filter-lfs-flags |
212 |
- |
213 |
- # Workaround for bug #76512 |
214 |
- if use hardened; then |
215 |
- [[ "$(gcc-version)" == "3.4" ]] && replace-flags -O? -Os |
216 |
- fi |
217 |
- |
218 |
- # Remove annoying C++ comment style warnings - bug #378099 |
219 |
- append-flags -Wno-comment |
220 |
- |
221 |
- sed -i -e "/^RANLIB/s/ranlib/$(tc-getRANLIB)/g" "${S}"/makedefs |
222 |
- sed -i -e "/^AR/s/ar/$(tc-getAR)/g" "${S}"/makedefs |
223 |
- |
224 |
- emake makefiles shared=yes dynamicmaps=no pie=yes \ |
225 |
- shlib_directory="/usr/$(get_libdir)/postfix/MAIL_VERSION" \ |
226 |
- DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" \ |
227 |
- AUXLIBS_CDB="${AUXLIBS_CDB}" AUXLIBS_LDAP="${AUXLIBS_LDAP}" \ |
228 |
- AUXLIBS_LMDB="${AUXLIBS_LMDB}" AUXLIBS_MYSQL="${AUXLIBS_MYSQL}" \ |
229 |
- AUXLIBS_PCRE="${AUXLIBS_PCRE}" AUXLIBS_PGSQL="${AUXLIBS_PGSQL}" \ |
230 |
- AUXLIBS_SQLITE="${AUXLIBS_SQLITE}" |
231 |
-} |
232 |
- |
233 |
-src_install () { |
234 |
- local myconf |
235 |
- use doc && myconf="readme_directory=\"/usr/share/doc/${PF}/readme\" \ |
236 |
- html_directory=\"/usr/share/doc/${PF}/html\"" |
237 |
- |
238 |
- LD_LIBRARY_PATH="${S}/lib" \ |
239 |
- /bin/sh postfix-install \ |
240 |
- -non-interactive \ |
241 |
- install_root="${D}" \ |
242 |
- config_directory="/etc/postfix" \ |
243 |
- manpage_directory="/usr/share/man" \ |
244 |
- command_directory="/usr/sbin" \ |
245 |
- mailq_path="/usr/bin/mailq" \ |
246 |
- newaliases_path="/usr/bin/newaliases" \ |
247 |
- sendmail_path="/usr/sbin/sendmail" \ |
248 |
- ${myconf} \ |
249 |
- || die "postfix-install failed" |
250 |
- |
251 |
- # Fix spool removal on upgrade |
252 |
- rm -Rf "${D}"/var |
253 |
- keepdir /var/spool/postfix |
254 |
- |
255 |
- # Install rmail for UUCP, closes bug #19127 |
256 |
- dobin auxiliary/rmail/rmail |
257 |
- |
258 |
- # Provide another link for legacy FSH |
259 |
- dosym /usr/sbin/sendmail /usr/$(get_libdir)/sendmail |
260 |
- |
261 |
- # Install qshape and posttls-finger |
262 |
- dobin auxiliary/qshape/qshape.pl |
263 |
- doman man/man1/qshape.1 |
264 |
- dobin bin/posttls-finger |
265 |
- doman man/man1/posttls-finger.1 |
266 |
- |
267 |
- # Performance tuning tools and their manuals |
268 |
- dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink} |
269 |
- doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1 |
270 |
- |
271 |
- # Set proper permissions on required files/directories |
272 |
- dodir /var/lib/postfix |
273 |
- keepdir /var/lib/postfix |
274 |
- fowners -R postfix:postfix /var/lib/postfix |
275 |
- fperms 0750 /var/lib/postfix |
276 |
- fowners root:postdrop /usr/sbin/post{drop,queue} |
277 |
- fperms 02711 /usr/sbin/post{drop,queue} |
278 |
- |
279 |
- keepdir /etc/postfix |
280 |
- if use mbox; then |
281 |
- mypostconf="mail_spool_directory=/var/spool/mail" |
282 |
- else |
283 |
- mypostconf="home_mailbox=.maildir/" |
284 |
- fi |
285 |
- LD_LIBRARY_PATH="${S}/lib" \ |
286 |
- "${D}"/usr/sbin/postconf -c "${D}"/etc/postfix \ |
287 |
- -e ${mypostconf} || die "postconf failed" |
288 |
- |
289 |
- insinto /etc/postfix |
290 |
- newins "${FILESDIR}"/smtp.pass saslpass |
291 |
- fperms 600 /etc/postfix/saslpass |
292 |
- |
293 |
- newinitd "${FILESDIR}"/postfix.rc6.${RC_VER} postfix |
294 |
- # do not start mysql/postgres unnecessarily - bug #359913 |
295 |
- use mysql || sed -i -e "s/mysql //" "${D}/etc/init.d/postfix" |
296 |
- use postgres || sed -i -e "s/postgresql //" "${D}/etc/init.d/postfix" |
297 |
- |
298 |
- dodoc *README COMPATIBILITY HISTORY PORTING RELEASE_NOTES* |
299 |
- use doc && mv "${S}"/examples "${D}"/usr/share/doc/${PF}/ |
300 |
- |
301 |
- pamd_mimic_system smtp auth account |
302 |
- |
303 |
- if use sasl; then |
304 |
- insinto /etc/sasl2 |
305 |
- newins "${FILESDIR}"/smtp.sasl smtpd.conf |
306 |
- fi |
307 |
- |
308 |
- # header files |
309 |
- insinto /usr/include/postfix |
310 |
- doins include/*.h |
311 |
- |
312 |
- # Keep config_dir clean |
313 |
- rm -f "${D}"/etc/postfix/{*LICENSE,access,aliases,canonical,generic} |
314 |
- rm -f "${D}"/etc/postfix/{header_checks,relocated,transport,virtual} |
315 |
- |
316 |
- if has_version mail-mta/postfix; then |
317 |
- # let the sysadmin decide when to change the compatibility_level |
318 |
- sed -i -e /^compatibility_level/"s/^/#/" "${D}"/etc/postfix/main.cf || die |
319 |
- fi |
320 |
- |
321 |
- systemd_dounit "${FILESDIR}/${PN}.service" |
322 |
-} |
323 |
- |
324 |
-pkg_postinst() { |
325 |
- [ "${EROOT}" == "/" ] && pkg_config |
326 |
- |
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 |
- |
336 |
-pkg_config() { |
337 |
- # configure tls |
338 |
- if use ssl ; then |
339 |
- elog "To configure client side TLS settings:" |
340 |
- elog "${EROOT}"usr/sbin/postfix tls enable-client |
341 |
- elog "To configure server side TLS settings:" |
342 |
- elog "${EROOT}"usr/sbin/postfix tls enable-server |
343 |
- fi |
344 |
-} |
345 |
|
346 |
diff --git a/mail-mta/postfix/postfix-3.1.1.ebuild b/mail-mta/postfix/postfix-3.1.1.ebuild |
347 |
deleted file mode 100644 |
348 |
index febec01..00000000 |
349 |
--- a/mail-mta/postfix/postfix-3.1.1.ebuild |
350 |
+++ /dev/null |
351 |
@@ -1,311 +0,0 @@ |
352 |
-# Copyright 1999-2016 Gentoo Foundation |
353 |
-# Distributed under the terms of the GNU General Public License v2 |
354 |
-# $Id$ |
355 |
- |
356 |
-EAPI=6 |
357 |
-inherit flag-o-matic pam systemd toolchain-funcs user |
358 |
- |
359 |
-MY_PV="${PV/_rc/-RC}" |
360 |
-MY_SRC="${PN}-${MY_PV}" |
361 |
-MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/official" |
362 |
-RC_VER="2.7" |
363 |
- |
364 |
-DESCRIPTION="A fast and secure drop-in replacement for sendmail" |
365 |
-HOMEPAGE="http://www.postfix.org/" |
366 |
-SRC_URI="${MY_URI}/${MY_SRC}.tar.gz" |
367 |
- |
368 |
-LICENSE="IBM" |
369 |
-SLOT="0" |
370 |
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd" |
371 |
-IUSE="+berkdb cdb doc dovecot-sasl +eai hardened ldap ldap-bind libressl lmdb memcached mbox mysql nis pam postgres sasl selinux sqlite ssl" |
372 |
- |
373 |
-DEPEND=">=dev-libs/libpcre-3.4 |
374 |
- dev-lang/perl |
375 |
- berkdb? ( >=sys-libs/db-3.2:* ) |
376 |
- cdb? ( || ( >=dev-db/tinycdb-0.76 >=dev-db/cdb-0.75-r4 ) ) |
377 |
- eai? ( dev-libs/icu:= ) |
378 |
- ldap? ( net-nds/openldap ) |
379 |
- ldap-bind? ( net-nds/openldap[sasl] ) |
380 |
- lmdb? ( >=dev-db/lmdb-0.9.11 ) |
381 |
- mysql? ( virtual/mysql ) |
382 |
- pam? ( virtual/pam ) |
383 |
- postgres? ( dev-db/postgresql:* ) |
384 |
- sasl? ( >=dev-libs/cyrus-sasl-2 ) |
385 |
- sqlite? ( dev-db/sqlite:3 ) |
386 |
- ssl? ( |
387 |
- !libressl? ( dev-libs/openssl:0 ) |
388 |
- libressl? ( dev-libs/libressl ) |
389 |
- )" |
390 |
- |
391 |
-RDEPEND="${DEPEND} |
392 |
- dovecot-sasl? ( net-mail/dovecot ) |
393 |
- memcached? ( net-misc/memcached ) |
394 |
- net-mail/mailbase |
395 |
- !mail-mta/courier |
396 |
- !mail-mta/esmtp |
397 |
- !mail-mta/exim |
398 |
- !mail-mta/mini-qmail |
399 |
- !mail-mta/msmtp[mta] |
400 |
- !mail-mta/netqmail |
401 |
- !mail-mta/nullmailer |
402 |
- !mail-mta/qmail-ldap |
403 |
- !mail-mta/sendmail |
404 |
- !mail-mta/opensmtpd |
405 |
- !<mail-mta/ssmtp-2.64-r2 |
406 |
- !>=mail-mta/ssmtp-2.64-r2[mta] |
407 |
- !net-mail/fastforward |
408 |
- selinux? ( sec-policy/selinux-postfix )" |
409 |
- |
410 |
-REQUIRED_USE="ldap-bind? ( ldap sasl )" |
411 |
- |
412 |
-S="${WORKDIR}/${MY_SRC}" |
413 |
- |
414 |
-pkg_setup() { |
415 |
- # Add postfix, postdrop user/group (bug #77565) |
416 |
- enewgroup postfix 207 |
417 |
- enewgroup postdrop 208 |
418 |
- enewuser postfix 207 -1 /var/spool/postfix postfix,mail |
419 |
-} |
420 |
- |
421 |
-src_prepare() { |
422 |
- default |
423 |
- sed -i -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/mail/aliases|" \ |
424 |
- src/util/sys_defs.h || die "sed failed" |
425 |
- # change default paths to better comply with portage standard paths |
426 |
- sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || die "sed failed" |
427 |
-} |
428 |
- |
429 |
-src_configure() { |
430 |
- for name in CDB LDAP LMDB MYSQL PCRE PGSQL SDBM SQLITE |
431 |
- do |
432 |
- local AUXLIBS_${name}="" |
433 |
- done |
434 |
- |
435 |
- # Make sure LDFLAGS get passed down to the executables. |
436 |
- local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -ldl" |
437 |
- AUXLIBS_PCRE="$(pcre-config --libs)" |
438 |
- |
439 |
- use pam && mylibs="${mylibs} -lpam" |
440 |
- |
441 |
- if use ldap; then |
442 |
- mycc="${mycc} -DHAS_LDAP" |
443 |
- AUXLIBS_LDAP="-lldap -llber" |
444 |
- fi |
445 |
- |
446 |
- if use mysql; then |
447 |
- mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)" |
448 |
- AUXLIBS_MYSQL="$(mysql_config --libs)" |
449 |
- fi |
450 |
- |
451 |
- if use postgres; then |
452 |
- mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)" |
453 |
- AUXLIBS_PGSQL="-L$(pg_config --libdir) -lpq" |
454 |
- fi |
455 |
- |
456 |
- if use sqlite; then |
457 |
- mycc="${mycc} -DHAS_SQLITE" |
458 |
- AUXLIBS_SQLITE="-lsqlite3 -lpthread" |
459 |
- fi |
460 |
- |
461 |
- if use ssl; then |
462 |
- mycc="${mycc} -DUSE_TLS" |
463 |
- mylibs="${mylibs} -lssl -lcrypto" |
464 |
- fi |
465 |
- |
466 |
- if use lmdb; then |
467 |
- mycc="${mycc} -DHAS_LMDB" |
468 |
- AUXLIBS_LMDB="-llmdb -lpthread" |
469 |
- fi |
470 |
- |
471 |
- if ! use eai; then |
472 |
- mycc="${mycc} -DNO_EAI" |
473 |
- fi |
474 |
- |
475 |
- # broken. and "in other words, not supported" by upstream. |
476 |
- # Use inet_protocols setting in main.cf |
477 |
- #if ! use ipv6; then |
478 |
- # mycc="${mycc} -DNO_IPV6" |
479 |
- #fi |
480 |
- |
481 |
- if use sasl; then |
482 |
- if use dovecot-sasl; then |
483 |
- # Set dovecot as default. |
484 |
- mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\"" |
485 |
- fi |
486 |
- if use ldap-bind; then |
487 |
- mycc="${mycc} -DUSE_LDAP_SASL" |
488 |
- fi |
489 |
- mycc="${mycc} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl" |
490 |
- mylibs="${mylibs} -lsasl2" |
491 |
- elif use dovecot-sasl; then |
492 |
- mycc="${mycc} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\"" |
493 |
- fi |
494 |
- |
495 |
- if ! use nis; then |
496 |
- mycc="${mycc} -DNO_NIS" |
497 |
- fi |
498 |
- |
499 |
- if ! use berkdb; then |
500 |
- mycc="${mycc} -DNO_DB" |
501 |
- if use cdb; then |
502 |
- # change default hash format from Berkeley DB to cdb |
503 |
- mycc="${mycc} -DDEF_DB_TYPE=\\\"cdb\\\"" |
504 |
- fi |
505 |
- fi |
506 |
- |
507 |
- if use cdb; then |
508 |
- mycc="${mycc} -DHAS_CDB -I/usr/include/cdb" |
509 |
- # Tinycdb is preferred. |
510 |
- if has_version dev-db/tinycdb ; then |
511 |
- einfo "Building with dev-db/tinycdb" |
512 |
- AUXLIBS_CDB="-lcdb" |
513 |
- else |
514 |
- einfo "Building with dev-db/cdb" |
515 |
- CDB_PATH="/usr/$(get_libdir)" |
516 |
- for i in cdb.a alloc.a buffer.a unix.a byte.a ; do |
517 |
- AUXLIBS_CDB="${AUXLIBS_CDB} ${CDB_PATH}/${i}" |
518 |
- done |
519 |
- fi |
520 |
- fi |
521 |
- |
522 |
- # Robin H. Johnson <robbat2@g.o> 17/Nov/2006 |
523 |
- # Fix because infra boxes hit 2Gb .db files that fail a 32-bit fstat signed check. |
524 |
- mycc="${mycc} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE" |
525 |
- filter-lfs-flags |
526 |
- |
527 |
- # Workaround for bug #76512 |
528 |
- if use hardened; then |
529 |
- [[ "$(gcc-version)" == "3.4" ]] && replace-flags -O? -Os |
530 |
- fi |
531 |
- |
532 |
- # Remove annoying C++ comment style warnings - bug #378099 |
533 |
- append-flags -Wno-comment |
534 |
- |
535 |
- sed -i -e "/^RANLIB/s/ranlib/$(tc-getRANLIB)/g" "${S}"/makedefs |
536 |
- sed -i -e "/^AR/s/ar/$(tc-getAR)/g" "${S}"/makedefs |
537 |
- |
538 |
- emake makefiles shared=yes dynamicmaps=no pie=yes \ |
539 |
- shlib_directory="/usr/$(get_libdir)/postfix/MAIL_VERSION" \ |
540 |
- DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" \ |
541 |
- AUXLIBS_CDB="${AUXLIBS_CDB}" AUXLIBS_LDAP="${AUXLIBS_LDAP}" \ |
542 |
- AUXLIBS_LMDB="${AUXLIBS_LMDB}" AUXLIBS_MYSQL="${AUXLIBS_MYSQL}" \ |
543 |
- AUXLIBS_PCRE="${AUXLIBS_PCRE}" AUXLIBS_PGSQL="${AUXLIBS_PGSQL}" \ |
544 |
- AUXLIBS_SQLITE="${AUXLIBS_SQLITE}" |
545 |
-} |
546 |
- |
547 |
-src_install () { |
548 |
- local myconf |
549 |
- use doc && myconf="readme_directory=\"/usr/share/doc/${PF}/readme\" \ |
550 |
- html_directory=\"/usr/share/doc/${PF}/html\"" |
551 |
- |
552 |
- LD_LIBRARY_PATH="${S}/lib" \ |
553 |
- /bin/sh postfix-install \ |
554 |
- -non-interactive \ |
555 |
- install_root="${D}" \ |
556 |
- config_directory="/etc/postfix" \ |
557 |
- manpage_directory="/usr/share/man" \ |
558 |
- command_directory="/usr/sbin" \ |
559 |
- mailq_path="/usr/bin/mailq" \ |
560 |
- newaliases_path="/usr/bin/newaliases" \ |
561 |
- sendmail_path="/usr/sbin/sendmail" \ |
562 |
- ${myconf} \ |
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 /usr/sbin/sendmail /usr/$(get_libdir)/sendmail |
574 |
- |
575 |
- # Install qshape and posttls-finger |
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 |
- |
581 |
- # Performance tuning tools and their manuals |
582 |
- dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink} |
583 |
- doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1 |
584 |
- |
585 |
- # Set proper permissions on required files/directories |
586 |
- dodir /var/lib/postfix |
587 |
- keepdir /var/lib/postfix |
588 |
- fowners -R postfix:postfix /var/lib/postfix |
589 |
- fperms 0750 /var/lib/postfix |
590 |
- fowners root:postdrop /usr/sbin/post{drop,queue} |
591 |
- fperms 02711 /usr/sbin/post{drop,queue} |
592 |
- |
593 |
- keepdir /etc/postfix |
594 |
- if use mbox; then |
595 |
- mypostconf="mail_spool_directory=/var/spool/mail" |
596 |
- else |
597 |
- mypostconf="home_mailbox=.maildir/" |
598 |
- fi |
599 |
- LD_LIBRARY_PATH="${S}/lib" \ |
600 |
- "${D}"/usr/sbin/postconf -c "${D}"/etc/postfix \ |
601 |
- -e ${mypostconf} || die "postconf failed" |
602 |
- |
603 |
- insinto /etc/postfix |
604 |
- newins "${FILESDIR}"/smtp.pass saslpass |
605 |
- fperms 600 /etc/postfix/saslpass |
606 |
- |
607 |
- newinitd "${FILESDIR}"/postfix.rc6.${RC_VER} postfix |
608 |
- # do not start mysql/postgres unnecessarily - bug #359913 |
609 |
- use mysql || sed -i -e "s/mysql //" "${D}/etc/init.d/postfix" |
610 |
- use postgres || sed -i -e "s/postgresql //" "${D}/etc/init.d/postfix" |
611 |
- |
612 |
- dodoc *README COMPATIBILITY HISTORY PORTING RELEASE_NOTES* |
613 |
- use doc && mv "${S}"/examples "${D}"/usr/share/doc/${PF}/ |
614 |
- |
615 |
- pamd_mimic_system smtp auth account |
616 |
- |
617 |
- if use sasl; then |
618 |
- insinto /etc/sasl2 |
619 |
- newins "${FILESDIR}"/smtp.sasl smtpd.conf |
620 |
- fi |
621 |
- |
622 |
- # header files |
623 |
- insinto /usr/include/postfix |
624 |
- doins include/*.h |
625 |
- |
626 |
- # Keep config_dir clean |
627 |
- rm -f "${D}"/etc/postfix/{*LICENSE,access,aliases,canonical,generic} |
628 |
- rm -f "${D}"/etc/postfix/{header_checks,relocated,transport,virtual} |
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_postinst() { |
639 |
- [ "${EROOT}" == "/" ] && pkg_config |
640 |
- |
641 |
- if [[ ! -e /etc/mail/aliases.db ]] ; then |
642 |
- ewarn |
643 |
- ewarn "You must edit /etc/mail/aliases to suit your needs" |
644 |
- ewarn "and then run /usr/bin/newaliases. Postfix will not" |
645 |
- ewarn "work correctly without it." |
646 |
- ewarn |
647 |
- fi |
648 |
-} |
649 |
- |
650 |
-pkg_config() { |
651 |
- # configure tls |
652 |
- if use ssl ; then |
653 |
- if "${EROOT}"usr/sbin/postfix tls all-default-client ; then |
654 |
- elog "Configuring client side TLS settings" |
655 |
- "${EROOT}"usr/sbin/postfix tls enable-client |
656 |
- fi |
657 |
- if "${EROOT}"usr/sbin/postfix tls all-default-server ; then |
658 |
- elog "Configuring server side TLS settings" |
659 |
- "${EROOT}"usr/sbin/postfix tls enable-server |
660 |
- fi |
661 |
- fi |
662 |
-} |
663 |
|
664 |
diff --git a/mail-mta/postfix/postfix-3.1.2.ebuild b/mail-mta/postfix/postfix-3.1.2.ebuild |
665 |
deleted file mode 100644 |
666 |
index 4d958b6..00000000 |
667 |
--- a/mail-mta/postfix/postfix-3.1.2.ebuild |
668 |
+++ /dev/null |
669 |
@@ -1,308 +0,0 @@ |
670 |
-# Copyright 1999-2016 Gentoo Foundation |
671 |
-# Distributed under the terms of the GNU General Public License v2 |
672 |
-# $Id$ |
673 |
- |
674 |
-EAPI=6 |
675 |
-inherit flag-o-matic pam systemd toolchain-funcs user |
676 |
- |
677 |
-MY_PV="${PV/_rc/-RC}" |
678 |
-MY_SRC="${PN}-${MY_PV}" |
679 |
-MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/official" |
680 |
-RC_VER="2.7" |
681 |
- |
682 |
-DESCRIPTION="A fast and secure drop-in replacement for sendmail" |
683 |
-HOMEPAGE="http://www.postfix.org/" |
684 |
-SRC_URI="${MY_URI}/${MY_SRC}.tar.gz" |
685 |
- |
686 |
-LICENSE="IBM" |
687 |
-SLOT="0" |
688 |
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd" |
689 |
-IUSE="+berkdb cdb doc dovecot-sasl +eai hardened ldap ldap-bind libressl lmdb memcached mbox mysql nis pam postgres sasl selinux sqlite ssl" |
690 |
- |
691 |
-DEPEND=">=dev-libs/libpcre-3.4 |
692 |
- dev-lang/perl |
693 |
- berkdb? ( >=sys-libs/db-3.2:* ) |
694 |
- cdb? ( || ( >=dev-db/tinycdb-0.76 >=dev-db/cdb-0.75-r4 ) ) |
695 |
- eai? ( dev-libs/icu:= ) |
696 |
- ldap? ( net-nds/openldap ) |
697 |
- ldap-bind? ( net-nds/openldap[sasl] ) |
698 |
- lmdb? ( >=dev-db/lmdb-0.9.11 ) |
699 |
- mysql? ( virtual/mysql ) |
700 |
- pam? ( virtual/pam ) |
701 |
- postgres? ( dev-db/postgresql:* ) |
702 |
- sasl? ( >=dev-libs/cyrus-sasl-2 ) |
703 |
- sqlite? ( dev-db/sqlite:3 ) |
704 |
- ssl? ( |
705 |
- !libressl? ( dev-libs/openssl:0 ) |
706 |
- libressl? ( dev-libs/libressl ) |
707 |
- )" |
708 |
- |
709 |
-RDEPEND="${DEPEND} |
710 |
- dovecot-sasl? ( net-mail/dovecot ) |
711 |
- memcached? ( net-misc/memcached ) |
712 |
- net-mail/mailbase |
713 |
- !mail-mta/courier |
714 |
- !mail-mta/esmtp |
715 |
- !mail-mta/exim |
716 |
- !mail-mta/mini-qmail |
717 |
- !mail-mta/msmtp[mta] |
718 |
- !mail-mta/netqmail |
719 |
- !mail-mta/nullmailer |
720 |
- !mail-mta/qmail-ldap |
721 |
- !mail-mta/sendmail |
722 |
- !mail-mta/opensmtpd |
723 |
- !<mail-mta/ssmtp-2.64-r2 |
724 |
- !>=mail-mta/ssmtp-2.64-r2[mta] |
725 |
- !net-mail/fastforward |
726 |
- selinux? ( sec-policy/selinux-postfix )" |
727 |
- |
728 |
-REQUIRED_USE="ldap-bind? ( ldap sasl )" |
729 |
- |
730 |
-S="${WORKDIR}/${MY_SRC}" |
731 |
- |
732 |
-pkg_setup() { |
733 |
- # Add postfix, postdrop user/group (bug #77565) |
734 |
- enewgroup postfix 207 |
735 |
- enewgroup postdrop 208 |
736 |
- enewuser postfix 207 -1 /var/spool/postfix postfix,mail |
737 |
-} |
738 |
- |
739 |
-src_prepare() { |
740 |
- default |
741 |
- sed -i -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/mail/aliases|" \ |
742 |
- src/util/sys_defs.h || die "sed failed" |
743 |
- # change default paths to better comply with portage standard paths |
744 |
- sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || die "sed failed" |
745 |
- eapply -p0 "${FILESDIR}/${PN}-libressl.patch" |
746 |
-} |
747 |
- |
748 |
-src_configure() { |
749 |
- for name in CDB LDAP LMDB MYSQL PCRE PGSQL SDBM SQLITE |
750 |
- do |
751 |
- local AUXLIBS_${name}="" |
752 |
- done |
753 |
- |
754 |
- # Make sure LDFLAGS get passed down to the executables. |
755 |
- local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -ldl" |
756 |
- AUXLIBS_PCRE="$(pcre-config --libs)" |
757 |
- |
758 |
- use pam && mylibs="${mylibs} -lpam" |
759 |
- |
760 |
- if use ldap; then |
761 |
- mycc="${mycc} -DHAS_LDAP" |
762 |
- AUXLIBS_LDAP="-lldap -llber" |
763 |
- fi |
764 |
- |
765 |
- if use mysql; then |
766 |
- mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)" |
767 |
- AUXLIBS_MYSQL="$(mysql_config --libs)" |
768 |
- fi |
769 |
- |
770 |
- if use postgres; then |
771 |
- mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)" |
772 |
- AUXLIBS_PGSQL="-L$(pg_config --libdir) -lpq" |
773 |
- fi |
774 |
- |
775 |
- if use sqlite; then |
776 |
- mycc="${mycc} -DHAS_SQLITE" |
777 |
- AUXLIBS_SQLITE="-lsqlite3 -lpthread" |
778 |
- fi |
779 |
- |
780 |
- if use ssl; then |
781 |
- mycc="${mycc} -DUSE_TLS" |
782 |
- mylibs="${mylibs} -lssl -lcrypto" |
783 |
- fi |
784 |
- |
785 |
- if use lmdb; then |
786 |
- mycc="${mycc} -DHAS_LMDB" |
787 |
- AUXLIBS_LMDB="-llmdb -lpthread" |
788 |
- fi |
789 |
- |
790 |
- if ! use eai; then |
791 |
- mycc="${mycc} -DNO_EAI" |
792 |
- fi |
793 |
- |
794 |
- # broken. and "in other words, not supported" by upstream. |
795 |
- # Use inet_protocols setting in main.cf |
796 |
- #if ! use ipv6; then |
797 |
- # mycc="${mycc} -DNO_IPV6" |
798 |
- #fi |
799 |
- |
800 |
- if use sasl; then |
801 |
- if use dovecot-sasl; then |
802 |
- # Set dovecot as default. |
803 |
- mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\"" |
804 |
- fi |
805 |
- if use ldap-bind; then |
806 |
- mycc="${mycc} -DUSE_LDAP_SASL" |
807 |
- fi |
808 |
- mycc="${mycc} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl" |
809 |
- mylibs="${mylibs} -lsasl2" |
810 |
- elif use dovecot-sasl; then |
811 |
- mycc="${mycc} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\"" |
812 |
- fi |
813 |
- |
814 |
- if ! use nis; then |
815 |
- mycc="${mycc} -DNO_NIS" |
816 |
- fi |
817 |
- |
818 |
- if ! use berkdb; then |
819 |
- mycc="${mycc} -DNO_DB" |
820 |
- if use cdb; then |
821 |
- # change default hash format from Berkeley DB to cdb |
822 |
- mycc="${mycc} -DDEF_DB_TYPE=\\\"cdb\\\"" |
823 |
- fi |
824 |
- fi |
825 |
- |
826 |
- if use cdb; then |
827 |
- mycc="${mycc} -DHAS_CDB -I/usr/include/cdb" |
828 |
- # Tinycdb is preferred. |
829 |
- if has_version dev-db/tinycdb ; then |
830 |
- einfo "Building with dev-db/tinycdb" |
831 |
- AUXLIBS_CDB="-lcdb" |
832 |
- else |
833 |
- einfo "Building with dev-db/cdb" |
834 |
- CDB_PATH="/usr/$(get_libdir)" |
835 |
- for i in cdb.a alloc.a buffer.a unix.a byte.a ; do |
836 |
- AUXLIBS_CDB="${AUXLIBS_CDB} ${CDB_PATH}/${i}" |
837 |
- done |
838 |
- fi |
839 |
- fi |
840 |
- |
841 |
- # Robin H. Johnson <robbat2@g.o> 17/Nov/2006 |
842 |
- # Fix because infra boxes hit 2Gb .db files that fail a 32-bit fstat signed check. |
843 |
- mycc="${mycc} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE" |
844 |
- filter-lfs-flags |
845 |
- |
846 |
- # Workaround for bug #76512 |
847 |
- if use hardened; then |
848 |
- [[ "$(gcc-version)" == "3.4" ]] && replace-flags -O? -Os |
849 |
- fi |
850 |
- |
851 |
- # Remove annoying C++ comment style warnings - bug #378099 |
852 |
- append-flags -Wno-comment |
853 |
- |
854 |
- sed -i -e "/^RANLIB/s/ranlib/$(tc-getRANLIB)/g" "${S}"/makedefs |
855 |
- sed -i -e "/^AR/s/ar/$(tc-getAR)/g" "${S}"/makedefs |
856 |
- |
857 |
- emake makefiles shared=yes dynamicmaps=no pie=yes \ |
858 |
- shlib_directory="/usr/$(get_libdir)/postfix/MAIL_VERSION" \ |
859 |
- DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" \ |
860 |
- AUXLIBS_CDB="${AUXLIBS_CDB}" AUXLIBS_LDAP="${AUXLIBS_LDAP}" \ |
861 |
- AUXLIBS_LMDB="${AUXLIBS_LMDB}" AUXLIBS_MYSQL="${AUXLIBS_MYSQL}" \ |
862 |
- AUXLIBS_PCRE="${AUXLIBS_PCRE}" AUXLIBS_PGSQL="${AUXLIBS_PGSQL}" \ |
863 |
- AUXLIBS_SQLITE="${AUXLIBS_SQLITE}" |
864 |
-} |
865 |
- |
866 |
-src_install () { |
867 |
- local myconf |
868 |
- use doc && myconf="readme_directory=\"/usr/share/doc/${PF}/readme\" \ |
869 |
- html_directory=\"/usr/share/doc/${PF}/html\"" |
870 |
- |
871 |
- LD_LIBRARY_PATH="${S}/lib" \ |
872 |
- /bin/sh postfix-install \ |
873 |
- -non-interactive \ |
874 |
- install_root="${D}" \ |
875 |
- config_directory="/etc/postfix" \ |
876 |
- manpage_directory="/usr/share/man" \ |
877 |
- command_directory="/usr/sbin" \ |
878 |
- mailq_path="/usr/bin/mailq" \ |
879 |
- newaliases_path="/usr/bin/newaliases" \ |
880 |
- sendmail_path="/usr/sbin/sendmail" \ |
881 |
- ${myconf} \ |
882 |
- || die "postfix-install failed" |
883 |
- |
884 |
- # Fix spool removal on upgrade |
885 |
- rm -Rf "${D}"/var |
886 |
- keepdir /var/spool/postfix |
887 |
- |
888 |
- # Install rmail for UUCP, closes bug #19127 |
889 |
- dobin auxiliary/rmail/rmail |
890 |
- |
891 |
- # Provide another link for legacy FSH |
892 |
- dosym /usr/sbin/sendmail /usr/$(get_libdir)/sendmail |
893 |
- |
894 |
- # Install qshape and posttls-finger |
895 |
- dobin auxiliary/qshape/qshape.pl |
896 |
- doman man/man1/qshape.1 |
897 |
- dobin bin/posttls-finger |
898 |
- doman man/man1/posttls-finger.1 |
899 |
- |
900 |
- # Performance tuning tools and their manuals |
901 |
- dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink} |
902 |
- doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1 |
903 |
- |
904 |
- # Set proper permissions on required files/directories |
905 |
- dodir /var/lib/postfix |
906 |
- keepdir /var/lib/postfix |
907 |
- fowners -R postfix:postfix /var/lib/postfix |
908 |
- fperms 0750 /var/lib/postfix |
909 |
- fowners root:postdrop /usr/sbin/post{drop,queue} |
910 |
- fperms 02711 /usr/sbin/post{drop,queue} |
911 |
- |
912 |
- keepdir /etc/postfix |
913 |
- if use mbox; then |
914 |
- mypostconf="mail_spool_directory=/var/spool/mail" |
915 |
- else |
916 |
- mypostconf="home_mailbox=.maildir/" |
917 |
- fi |
918 |
- LD_LIBRARY_PATH="${S}/lib" \ |
919 |
- "${D}"/usr/sbin/postconf -c "${D}"/etc/postfix \ |
920 |
- -e ${mypostconf} || die "postconf failed" |
921 |
- |
922 |
- insinto /etc/postfix |
923 |
- newins "${FILESDIR}"/smtp.pass saslpass |
924 |
- fperms 600 /etc/postfix/saslpass |
925 |
- |
926 |
- newinitd "${FILESDIR}"/postfix.rc6.${RC_VER} postfix |
927 |
- # do not start mysql/postgres unnecessarily - bug #359913 |
928 |
- use mysql || sed -i -e "s/mysql //" "${D}/etc/init.d/postfix" |
929 |
- use postgres || sed -i -e "s/postgresql //" "${D}/etc/init.d/postfix" |
930 |
- |
931 |
- dodoc *README COMPATIBILITY HISTORY PORTING RELEASE_NOTES* |
932 |
- use doc && mv "${S}"/examples "${D}"/usr/share/doc/${PF}/ |
933 |
- |
934 |
- pamd_mimic_system smtp auth account |
935 |
- |
936 |
- if use sasl; then |
937 |
- insinto /etc/sasl2 |
938 |
- newins "${FILESDIR}"/smtp.sasl smtpd.conf |
939 |
- fi |
940 |
- |
941 |
- # header files |
942 |
- insinto /usr/include/postfix |
943 |
- doins include/*.h |
944 |
- |
945 |
- # Keep config_dir clean |
946 |
- rm -f "${D}"/etc/postfix/{*LICENSE,access,aliases,canonical,generic} |
947 |
- rm -f "${D}"/etc/postfix/{header_checks,relocated,transport,virtual} |
948 |
- |
949 |
- if has_version mail-mta/postfix; then |
950 |
- # let the sysadmin decide when to change the compatibility_level |
951 |
- sed -i -e /^compatibility_level/"s/^/#/" "${D}"/etc/postfix/main.cf || die |
952 |
- fi |
953 |
- |
954 |
- systemd_dounit "${FILESDIR}/${PN}.service" |
955 |
-} |
956 |
- |
957 |
-pkg_postinst() { |
958 |
- if [[ ! -e /etc/mail/aliases.db ]] ; then |
959 |
- ewarn |
960 |
- ewarn "You must edit /etc/mail/aliases to suit your needs" |
961 |
- ewarn "and then run /usr/bin/newaliases. Postfix will not" |
962 |
- ewarn "work correctly without it." |
963 |
- ewarn |
964 |
- fi |
965 |
- |
966 |
- # configure tls |
967 |
- if use ssl ; then |
968 |
- if "${EROOT}"/usr/sbin/postfix tls all-default-client; then |
969 |
- elog "To configure client side TLS settings:" |
970 |
- elog "${EROOT}"usr/sbin/postfix tls enable-client |
971 |
- fi |
972 |
- if "${EROOT}"/usr/sbin/postfix tls all-default-server; then |
973 |
- elog "To configure server side TLS settings:" |
974 |
- elog "${EROOT}"usr/sbin/postfix tls enable-server |
975 |
- fi |
976 |
- fi |
977 |
-} |