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_pre20111120.ebuild postfix-2.9_pre20111119.ebuild
Date: Mon, 21 Nov 2011 07:47:22
Message-Id: 20111121074701.412F52004B@flycatcher.gentoo.org
1 eras 11/11/21 07:47:01
2
3 Modified: ChangeLog
4 Added: postfix-2.9_pre20111120.ebuild
5 Removed: postfix-2.9_pre20111119.ebuild
6 Log:
7 version bump
8
9 (Portage version: 2.1.10.36/cvs/Linux x86_64)
10
11 Revision Changes Path
12 1.303 mail-mta/postfix/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/ChangeLog?rev=1.303&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/ChangeLog?rev=1.303&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/ChangeLog?r1=1.302&r2=1.303
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v
21 retrieving revision 1.302
22 retrieving revision 1.303
23 diff -u -r1.302 -r1.303
24 --- ChangeLog 20 Nov 2011 10:32:42 -0000 1.302
25 +++ ChangeLog 21 Nov 2011 07:47:01 -0000 1.303
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.302 2011/11/20 10:32:42 eras Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v 1.303 2011/11/21 07:47:01 eras Exp $
31 +
32 +*postfix-2.9_pre20111120 (21 Nov 2011)
33 +
34 + 21 Nov 2011; Eray Aslan <eras@g.o> -postfix-2.9_pre20111119.ebuild,
35 + +postfix-2.9_pre20111120.ebuild:
36 + version bump
37
38 *postfix-2.9_pre20111119 (20 Nov 2011)
39
40
41
42
43 1.1 mail-mta/postfix/postfix-2.9_pre20111120.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/postfix-2.9_pre20111120.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/postfix-2.9_pre20111120.ebuild?rev=1.1&content-type=text/plain
47
48 Index: postfix-2.9_pre20111120.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_pre20111120.ebuild,v 1.1 2011/11/21 07:47:01 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.5"
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="+berkdb cdb doc dovecot-sasl hardened ipv6 ldap ldap-bind mbox mysql nis pam postgres sasl selinux sqlite ssl vda"
74
75 DEPEND=">=dev-libs/libpcre-3.4
76 dev-lang/perl
77 berkdb? ( >=sys-libs/db-3.2 )
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 pkg_setup() {
111 # Add postfix, postdrop user/group (bug #77565)
112 enewgroup postfix 207
113 enewgroup postdrop 208
114 enewuser postfix 207 -1 /var/spool/postfix postfix,mail
115 }
116
117 src_prepare() {
118 if use vda ; then
119 epatch "${DISTDIR}"/${VDA_P}.patch
120 fi
121
122 sed -i -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/mail/aliases|" \
123 src/util/sys_defs.h || die "sed failed"
124
125 # change default paths to better comply with portage standard paths
126 sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || die "sed failed"
127 }
128
129 src_configure() {
130 # Make sure LDFLAGS get passed down to the executables.
131 local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -lpcre -lcrypt -lpthread"
132
133 use pam && mylibs="${mylibs} -lpam"
134
135 if use ldap ; then
136 mycc="${mycc} -DHAS_LDAP"
137 mylibs="${mylibs} -lldap -llber"
138 fi
139
140 if use mysql ; then
141 mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)"
142 mylibs="${mylibs} $(mysql_config --libs)"
143 fi
144
145 if use postgres ; then
146 mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)"
147 mylibs="${mylibs} -lpq -L$(pg_config --libdir)"
148 fi
149
150 if use sqlite ; then
151 mycc="${mycc} -DHAS_SQLITE"
152 mylibs="${mylibs} -lsqlite3"
153 fi
154
155 if use ssl ; then
156 mycc="${mycc} -DUSE_TLS"
157 mylibs="${mylibs} -lssl -lcrypto"
158 fi
159
160 if use sasl ; then
161 if use dovecot-sasl ; then
162 # Set dovecot as default.
163 mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\""
164 fi
165 if use ldap-bind ; then
166 mycc="${mycc} -DUSE_LDAP_SASL"
167 fi
168 mycc="${mycc} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl"
169 mylibs="${mylibs} -lsasl2"
170 elif use dovecot-sasl ; then
171 mycc="${mycc} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\""
172 fi
173
174 if ! use nis ; then
175 sed -i -e "s|#define HAS_NIS|//#define HAS_NIS|g" \
176 src/util/sys_defs.h || die "sed failed"
177 fi
178
179 if ! use berkdb; then
180 # change default hash format from Berkeley DB to cdb
181 sed -i -e "s|#define HAS_DB$|//#define HAS_DB|g" -e "s/hash/cdb/" \
182 src/util/sys_defs.h || die
183 fi
184
185 if use cdb ; then
186 mycc="${mycc} -DHAS_CDB -I/usr/include/cdb"
187 CDB_LIBS=""
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 mylibs="${mylibs} ${CDB_LIBS}"
200 fi
201
202 mycc="${mycc} -DDEF_DAEMON_DIR=\\\"/usr/$(get_libdir)/postfix\\\""
203 mycc="${mycc} -DDEF_CONFIG_DIR=\\\"/etc/postfix\\\""
204 mycc="${mycc} -DDEF_COMMAND_DIR=\\\"/usr/sbin\\\""
205 mycc="${mycc} -DDEF_SENDMAIL_PATH=\\\"/usr/sbin/sendmail\\\""
206 mycc="${mycc} -DDEF_NEWALIS_PATH=\\\"/usr/bin/newaliases\\\""
207 mycc="${mycc} -DDEF_MAILQ_PATH=\\\"/usr/bin/mailq\\\""
208 mycc="${mycc} -DDEF_MANPAGE_DIR=\\\"/usr/share/man\\\""
209 mycc="${mycc} -DDEF_README_DIR=\\\"/usr/share/doc/${PF}/readme\\\""
210 mycc="${mycc} -DDEF_HTML_DIR=\\\"/usr/share/doc/${PF}/html\\\""
211 mycc="${mycc} -DDEF_QUEUE_DIR=\\\"/var/spool/postfix\\\""
212 mycc="${mycc} -DDEF_DATA_DIR=\\\"/var/lib/postfix\\\""
213 mycc="${mycc} -DDEF_MAIL_OWNER=\\\"postfix\\\""
214 mycc="${mycc} -DDEF_SGID_GROUP=\\\"postdrop\\\""
215
216 # Robin H. Johnson <robbat2@g.o> 17/Nov/2006
217 # Fix because infra boxes hit 2Gb .db files that fail a 32-bit fstat signed check.
218 mycc="${mycc} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
219 filter-lfs-flags
220
221 # Workaround for bug #76512
222 if use hardened ; then
223 [[ "$(gcc-version)" == "3.4" ]] && replace-flags -O? -Os
224 fi
225
226 # Remove annoying C++ comment style warnings - bug #378099
227 append-flags -Wno-comment
228
229 emake DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" makefiles
230 }
231
232 src_install () {
233 /bin/sh postfix-install \
234 -non-interactive \
235 install_root="${D}" \
236 config_directory="/etc/postfix" \
237 manpage_directory="/usr/share/man" \
238 readme_directory="/usr/share/doc/${PF}/readme" \
239 html_directory="/usr/share/doc/${PF}/html" \
240 command_directory="/usr/sbin" \
241 daemon_directory="/usr/$(get_libdir)/postfix" \
242 mailq_path="/usr/bin/mailq" \
243 newaliases_path="/usr/bin/newaliases" \
244 sendmail_path="/usr/sbin/sendmail" \
245 || die "postfix-install failed"
246
247 # Fix spool removal on upgrade
248 rm -Rf "${D}"/var
249 keepdir /var/spool/postfix
250
251 # Install rmail for UUCP, closes bug #19127
252 dobin auxiliary/rmail/rmail
253
254 # Provide another link for legacy FSH
255 dosym /usr/sbin/sendmail /usr/$(get_libdir)/sendmail
256
257 # Install qshape tool
258 dobin auxiliary/qshape/qshape.pl
259 doman man/man1/qshape.1
260
261 # Performance tuning tools and their manuals
262 dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink}
263 doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1
264
265 # Set proper permissions on required files/directories
266 dodir /var/lib/postfix
267 keepdir /var/lib/postfix
268 fowners postfix:postfix /var/lib/postfix
269 fowners postfix:postfix /var/lib/postfix/.keep_${CATEGORY}_${PN}-${SLOT}
270 fperms 0750 /var/lib/postfix
271 fowners root:postdrop /usr/sbin/post{drop,queue}
272 fperms 02711 /usr/sbin/post{drop,queue}
273
274 keepdir /etc/postfix
275 if use mbox ; then
276 mypostconf="mail_spool_directory=/var/spool/mail"
277 else
278 mypostconf="home_mailbox=.maildir/"
279 fi
280 "${D}"/usr/sbin/postconf -c "${D}"/etc/postfix \
281 -e ${mypostconf} || die "postconf failed"
282
283 insinto /etc/postfix
284 newins "${FILESDIR}"/smtp.pass saslpass
285 fperms 600 /etc/postfix/saslpass
286
287 newinitd "${FILESDIR}"/postfix.rc6.${RC_VER} postfix
288 # do not start mysql/postgres unnecessarily - bug #359913
289 use mysql || sed -i -e "s/mysql //" "${D}/etc/init.d/postfix"
290 use postgres || sed -i -e "s/postgresql //" "${D}/etc/init.d/postfix"
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 dodoc *README COMPATIBILITY HISTORY INSTALL PORTING RELEASE_NOTES*
296
297 pamd_mimic_system smtp auth account
298
299 if use sasl ; then
300 insinto /etc/sasl2
301 newins "${FILESDIR}"/smtp.sasl smtpd.conf
302 fi
303
304 # header files
305 insinto /usr/include/postfix
306 doins include/*.h
307
308 # Remove unnecessary files
309 rm -f "${D}"/etc/postfix/{*LICENSE,access,aliases,canonical,generic}
310 rm -f "${D}"/etc/postfix/{header_checks,relocated,transport,virtual}
311 }
312
313 pkg_postinst() {
314 # Do not install server.{key,pem) SSL certificates if they already exist
315 if use ssl && [[ ! -f "${ROOT}"/etc/ssl/postfix/server.key \
316 && ! -f "${ROOT}"/etc/ssl/postfix/server.pem ]] ; then
317 SSL_ORGANIZATION="${SSL_ORGANIZATION:-Postfix SMTP Server}"
318 install_cert /etc/ssl/postfix/server
319 chown postfix:mail "${ROOT}"/etc/ssl/postfix/server.{key,pem}
320 fi
321
322 if [[ ! -e /etc/mail/aliases.db ]] ; then
323 ewarn
324 ewarn "You must edit /etc/mail/aliases to suit your needs"
325 ewarn "and then run /usr/bin/newaliases. Postfix will not"
326 ewarn "work correctly without it."
327 ewarn
328 fi
329
330 elog "See the RELEASE_NOTES file in /usr/share/doc/${PF}"
331 elog "for incompatibilities and other major changes between releases."
332
333 if [[ ${REPLACING_VERSIONS} < 2.9 ]]; then
334 elog "If you are using old style postfix instances by symlinking"
335 elog "startup scripts in ${ROOT}etc/init.d, please consider"
336 elog "upgrading your config for postmulti support. For more info:"
337 elog "http://www.postfix.org/MULTI_INSTANCE_README.html"
338 elog
339 fi
340 }