Gentoo Archives: gentoo-commits

From: "Tim Harder (radhermit)" <radhermit@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in mail-mta/postfix: ChangeLog postfix-2.8.5.ebuild
Date: Sun, 04 Sep 2011 04:27:26
Message-Id: 20110904042703.E61BD20051@flycatcher.gentoo.org
1 radhermit 11/09/04 04:27:03
2
3 Modified: ChangeLog
4 Added: postfix-2.8.5.ebuild
5 Log:
6 Version bump.
7
8 (Portage version: 2.2.0_alpha51/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.283 mail-mta/postfix/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/ChangeLog?rev=1.283&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/ChangeLog?rev=1.283&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/ChangeLog?r1=1.282&r2=1.283
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v
20 retrieving revision 1.282
21 retrieving revision 1.283
22 diff -u -r1.282 -r1.283
23 --- ChangeLog 28 Aug 2011 13:10:22 -0000 1.282
24 +++ ChangeLog 4 Sep 2011 04:27:03 -0000 1.283
25 @@ -1,6 +1,11 @@
26 # ChangeLog for mail-mta/postfix
27 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v 1.282 2011/08/28 13:10:22 maekke Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v 1.283 2011/09/04 04:27:03 radhermit Exp $
30 +
31 +*postfix-2.8.5 (04 Sep 2011)
32 +
33 + 04 Sep 2011; Tim Harder <radhermit@g.o> +postfix-2.8.5.ebuild:
34 + Version bump.
35
36 28 Aug 2011; Markus Meier <maekke@g.o> postfix-2.8.4.ebuild:
37 arm stable, bug #378373
38
39
40
41 1.1 mail-mta/postfix/postfix-2.8.5.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/postfix-2.8.5.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/postfix-2.8.5.ebuild?rev=1.1&content-type=text/plain
45
46 Index: postfix-2.8.5.ebuild
47 ===================================================================
48 # Copyright 1999-2011 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/postfix-2.8.5.ebuild,v 1.1 2011/09/04 04:27:03 radhermit Exp $
51
52 EAPI=4
53
54 inherit eutils multilib ssl-cert toolchain-funcs flag-o-matic pam
55
56 MY_PV="${PV/_rc/-RC}"
57 MY_SRC="${PN}-${MY_PV}"
58 MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/official"
59 VDA_PV="2.8.3"
60 VDA_P="${PN}-vda-v10-${VDA_PV}"
61 RC_VER="2.5"
62
63 DESCRIPTION="A fast and secure drop-in replacement for sendmail."
64 HOMEPAGE="http://www.postfix.org/"
65 SRC_URI="${MY_URI}/${MY_SRC}.tar.gz
66 vda? ( http://vda.sourceforge.net/VDA/${VDA_P}.patch ) "
67
68 LICENSE="IBM"
69 SLOT="0"
70 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
71 IUSE="cdb doc dovecot-sasl hardened ipv6 ldap ldap-bind mbox mysql nis pam postgres sasl selinux sqlite ssl vda"
72
73 DEPEND=">=sys-libs/db-3.2
74 >=dev-libs/libpcre-3.4
75 dev-lang/perl
76 cdb? ( || ( >=dev-db/tinycdb-0.76 >=dev-db/cdb-0.75-r1 ) )
77 ldap? ( net-nds/openldap )
78 ldap-bind? ( net-nds/openldap[sasl] )
79 mysql? ( virtual/mysql )
80 pam? ( virtual/pam )
81 postgres? ( dev-db/postgresql-base )
82 sasl? ( >=dev-libs/cyrus-sasl-2 )
83 sqlite? ( dev-db/sqlite:3 )
84 ssl? ( >=dev-libs/openssl-0.9.6g )"
85
86 RDEPEND="${DEPEND}
87 dovecot-sasl? ( net-mail/dovecot )
88 net-mail/mailbase
89 selinux? ( sec-policy/selinux-postfix )
90 !mail-mta/courier
91 !mail-mta/esmtp
92 !mail-mta/exim
93 !mail-mta/mini-qmail
94 !mail-mta/msmtp[mta]
95 !mail-mta/nbsmtp
96 !mail-mta/netqmail
97 !mail-mta/nullmailer
98 !mail-mta/qmail-ldap
99 !mail-mta/sendmail
100 !<mail-mta/ssmtp-2.64-r2
101 !>=mail-mta/ssmtp-2.64-r2[mta]
102 !net-mail/fastforward"
103
104 REQUIRED_USE="ldap-bind? ( ldap sasl )"
105
106 S="${WORKDIR}/${MY_SRC}"
107
108 group_user_check() {
109 einfo "Checking for postfix group ..."
110 enewgroup postfix 207
111 einfo "Checking for postdrop group ..."
112 enewgroup postdrop 208
113 einfo "Checking for postfix user ..."
114 enewuser postfix 207 -1 /var/spool/postfix postfix,mail
115 }
116
117 pkg_setup() {
118 # Add postfix, postdrop user/group (bug #77565)
119 group_user_check || die "Failed to check/add needed user/group"
120 }
121
122 src_prepare() {
123 if use vda ; then
124 epatch "${DISTDIR}"/${VDA_P}.patch
125 fi
126
127 sed -i -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/mail/aliases|" \
128 src/util/sys_defs.h || die "sed failed"
129
130 # change default paths to better comply with portage standard paths
131 sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || die "sed failed"
132 }
133
134 src_configure() {
135 # Make sure LDFLAGS get passed down to the executables.
136 local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -lpcre -lcrypt -lpthread"
137
138 use pam && mylibs="${mylibs} -lpam"
139
140 if use ldap ; then
141 mycc="${mycc} -DHAS_LDAP"
142 mylibs="${mylibs} -lldap -llber"
143 fi
144
145 if use mysql ; then
146 mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)"
147 mylibs="${mylibs} $(mysql_config --libs)"
148 fi
149
150 if use postgres ; then
151 mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)"
152 mylibs="${mylibs} -lpq -L$(pg_config --libdir)"
153 fi
154
155 if use sqlite ; then
156 mycc="${mycc} -DHAS_SQLITE"
157 mylibs="${mylibs} -lsqlite3"
158 fi
159
160 if use ssl ; then
161 mycc="${mycc} -DUSE_TLS"
162 mylibs="${mylibs} -lssl -lcrypto"
163 fi
164
165 if use sasl ; then
166 if use dovecot-sasl ; then
167 # Set dovecot as default.
168 mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\""
169 fi
170 if use ldap-bind ; then
171 mycc="${mycc} -DUSE_LDAP_SASL"
172 fi
173 mycc="${mycc} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl"
174 mylibs="${mylibs} -lsasl2"
175 elif use dovecot-sasl ; then
176 mycc="${mycc} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\""
177 fi
178
179 if ! use nis ; then
180 sed -i -e "s|#define HAS_NIS|//#define HAS_NIS|g" \
181 src/util/sys_defs.h || die "sed failed"
182 fi
183
184 if use cdb ; then
185 mycc="${mycc} -DHAS_CDB -I/usr/include/cdb"
186 CDB_LIBS=""
187
188 # Tinycdb is preferred.
189 if has_version dev-db/tinycdb ; then
190 einfo "Building with dev-db/tinycdb"
191 CDB_LIBS="-lcdb"
192 else
193 einfo "Building with dev-db/cdb"
194 CDB_PATH="/usr/$(get_libdir)"
195 for i in cdb.a alloc.a buffer.a unix.a byte.a ; do
196 CDB_LIBS="${CDB_LIBS} ${CDB_PATH}/${i}"
197 done
198 fi
199
200 mylibs="${mylibs} ${CDB_LIBS}"
201 fi
202
203 mycc="${mycc} -DDEF_DAEMON_DIR=\\\"/usr/$(get_libdir)/postfix\\\""
204 mycc="${mycc} -DDEF_CONFIG_DIR=\\\"/etc/postfix\\\""
205 mycc="${mycc} -DDEF_COMMAND_DIR=\\\"/usr/sbin\\\""
206 mycc="${mycc} -DDEF_SENDMAIL_PATH=\\\"/usr/sbin/sendmail\\\""
207 mycc="${mycc} -DDEF_NEWALIS_PATH=\\\"/usr/bin/newaliases\\\""
208 mycc="${mycc} -DDEF_MAILQ_PATH=\\\"/usr/bin/mailq\\\""
209 mycc="${mycc} -DDEF_MANPAGE_DIR=\\\"/usr/share/man\\\""
210 mycc="${mycc} -DDEF_README_DIR=\\\"/usr/share/doc/${PF}/readme\\\""
211 mycc="${mycc} -DDEF_HTML_DIR=\\\"/usr/share/doc/${PF}/html\\\""
212 mycc="${mycc} -DDEF_QUEUE_DIR=\\\"/var/spool/postfix\\\""
213 mycc="${mycc} -DDEF_DATA_DIR=\\\"/var/lib/postfix\\\""
214 mycc="${mycc} -DDEF_MAIL_OWNER=\\\"postfix\\\""
215 mycc="${mycc} -DDEF_SGID_GROUP=\\\"postdrop\\\""
216
217 # Robin H. Johnson <robbat2@g.o> 17/Nov/2006
218 # Fix because infra boxes hit 2Gb .db files that fail a 32-bit fstat signed check.
219 mycc="${mycc} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
220 filter-lfs-flags
221
222 # Workaround for bug #76512
223 if use hardened ; then
224 [[ "$(gcc-version)" == "3.4" ]] && replace-flags -O? -Os
225 fi
226
227 emake DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" makefiles
228 }
229
230 src_install () {
231 /bin/sh postfix-install \
232 -non-interactive \
233 install_root="${D}" \
234 config_directory="/etc/postfix" \
235 manpage_directory="/usr/share/man" \
236 readme_directory="/usr/share/doc/${PF}/readme" \
237 html_directory="/usr/share/doc/${PF}/html" \
238 command_directory="/usr/sbin" \
239 daemon_directory="/usr/$(get_libdir)/postfix" \
240 mailq_path="/usr/bin/mailq" \
241 newaliases_path="/usr/bin/newaliases" \
242 sendmail_path="/usr/sbin/sendmail" \
243 || die "postfix-install failed"
244
245 # Fix spool removal on upgrade
246 rm -Rf "${D}"/var
247 keepdir /var/spool/postfix
248
249 # Install rmail for UUCP, closes bug #19127
250 dobin auxiliary/rmail/rmail
251
252 # Provide another link for legacy FSH
253 dosym /usr/sbin/sendmail /usr/$(get_libdir)/sendmail
254
255 # Install qshape tool
256 dobin auxiliary/qshape/qshape.pl
257 doman man/man1/qshape.1
258
259 # Performance tuning tools and their manuals
260 dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink}
261 doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1
262
263 # Set proper permissions on required files/directories
264 dodir /var/lib/postfix
265 keepdir /var/lib/postfix
266 fowners postfix:postfix /var/lib/postfix
267 fowners postfix:postfix /var/lib/postfix/.keep_${CATEGORY}_${PN}-${SLOT}
268 fperms 0750 /var/lib/postfix
269 fowners root:postdrop /usr/sbin/post{drop,queue}
270 fperms 02711 /usr/sbin/post{drop,queue}
271
272 keepdir /etc/postfix
273 if use mbox ; then
274 mypostconf="mail_spool_directory=/var/spool/mail"
275 else
276 mypostconf="home_mailbox=.maildir/"
277 fi
278 "${D}"/usr/sbin/postconf -c "${D}"/etc/postfix \
279 -e ${mypostconf} || die "postconf failed"
280
281 insinto /etc/postfix
282 newins "${FILESDIR}"/smtp.pass saslpass
283 fperms 600 /etc/postfix/saslpass
284
285 newinitd "${FILESDIR}"/postfix.rc6.${RC_VER} postfix
286 # bug #359913
287 use mysql || sed -i -e "s/mysql //" "${D}/etc/init.d/postfix"
288 use postgres || sed -i -e "s/postgresql //" "${D}/etc/init.d/postfix"
289
290 dodoc *README COMPATIBILITY HISTORY INSTALL PORTING RELEASE_NOTES*
291
292 mv "${S}"/examples "${D}"/usr/share/doc/${PF}/
293 mv "${D}"/etc/postfix/{*.default,makedefs.out} "${D}"/usr/share/doc/${PF}/
294
295 pamd_mimic_system smtp auth account
296
297 if use sasl ; then
298 insinto /etc/sasl2
299 newins "${FILESDIR}"/smtp.sasl smtpd.conf
300 fi
301
302 # Remove unnecessary files
303 rm -f "${D}"/etc/postfix/{*LICENSE,access,aliases,canonical,generic}
304 rm -f "${D}"/etc/postfix/{header_checks,relocated,transport,virtual}
305 }
306
307 pkg_postinst() {
308 # Do not install server.{key,pem) SSL certificates if they already exist
309 if use ssl && [[ ! -f "${ROOT}"/etc/ssl/postfix/server.key \
310 && ! -f "${ROOT}"/etc/ssl/postfix/server.pem ]] ; then
311 SSL_ORGANIZATION="${SSL_ORGANIZATION:-Postfix SMTP Server}"
312 install_cert /etc/ssl/postfix/server
313 chown postfix:mail "${ROOT}"/etc/ssl/postfix/server.{key,pem}
314 fi
315
316 if [[ ! -e /etc/mail/aliases.db ]] ; then
317 ewarn
318 ewarn "You must edit /etc/mail/aliases to suit your needs"
319 ewarn "and then run /usr/bin/newaliases. Postfix will not"
320 ewarn "work correctly without it."
321 ewarn
322 fi
323
324 elog
325 elog "See the RELEASE_NOTES file in /usr/share/doc/${PF}"
326 elog "for incompatibilities and other major changes between releases."
327 elog
328 }