Gentoo Archives: gentoo-commits

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