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_pre20111129.ebuild postfix-2.9_pre20111127.ebuild
Date: Wed, 30 Nov 2011 07:31:15
Message-Id: 20111130073104.EEBD72004B@flycatcher.gentoo.org
1 eras 11/11/30 07:31:04
2
3 Modified: ChangeLog
4 Added: postfix-2.9_pre20111129.ebuild
5 Removed: postfix-2.9_pre20111127.ebuild
6 Log:
7 version bump
8
9 (Portage version: 2.1.10.39/cvs/Linux x86_64)
10
11 Revision Changes Path
12 1.310 mail-mta/postfix/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/ChangeLog?rev=1.310&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/ChangeLog?rev=1.310&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/ChangeLog?r1=1.309&r2=1.310
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v
21 retrieving revision 1.309
22 retrieving revision 1.310
23 diff -u -r1.309 -r1.310
24 --- ChangeLog 28 Nov 2011 12:00:11 -0000 1.309
25 +++ ChangeLog 30 Nov 2011 07:31:04 -0000 1.310
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.309 2011/11/28 12:00:11 eras Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v 1.310 2011/11/30 07:31:04 eras Exp $
31 +
32 +*postfix-2.9_pre20111129 (30 Nov 2011)
33 +
34 + 30 Nov 2011; Eray Aslan <eras@g.o> -postfix-2.9_pre20111127.ebuild,
35 + +postfix-2.9_pre20111129.ebuild:
36 + version bump
37
38 28 Nov 2011; Eray Aslan <eras@g.o> -postfix-2.9_pre20111126.ebuild,
39 +postfix-2.9_pre20111127.ebuild:
40
41
42
43 1.1 mail-mta/postfix/postfix-2.9_pre20111129.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/postfix-2.9_pre20111129.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/postfix-2.9_pre20111129.ebuild?rev=1.1&content-type=text/plain
47
48 Index: postfix-2.9_pre20111129.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_pre20111129.ebuild,v 1.1 2011/11/30 07:31:04 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 ~s390 ~sh ~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 sed -i -e "s|#define HAS_DB$|//#define HAS_DB|g" \
181 src/util/sys_defs.h || die
182 if use cdb; then
183 # change default hash format from Berkeley DB to cdb
184 sed -i -e "s/hash/cdb/" src/util/sys_defs.h || die
185 fi
186 fi
187
188 if use cdb; then
189 mycc="${mycc} -DHAS_CDB -I/usr/include/cdb"
190 CDB_LIBS=""
191 # Tinycdb is preferred.
192 if has_version dev-db/tinycdb ; then
193 einfo "Building with dev-db/tinycdb"
194 CDB_LIBS="-lcdb"
195 else
196 einfo "Building with dev-db/cdb"
197 CDB_PATH="/usr/$(get_libdir)"
198 for i in cdb.a alloc.a buffer.a unix.a byte.a ; do
199 CDB_LIBS="${CDB_LIBS} ${CDB_PATH}/${i}"
200 done
201 fi
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 # do not start mysql/postgres unnecessarily - 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 "See the RELEASE_NOTES file in /usr/share/doc/${PF}"
334 elog "for incompatibilities and other major changes between releases."
335
336 if [[ ${REPLACING_VERSIONS} < 2.9 ]]; then
337 elog "If you are using old style postfix instances by symlinking"
338 elog "startup scripts in ${ROOT}etc/init.d, please consider"
339 elog "upgrading your config for postmulti support. For more info:"
340 elog "http://www.postfix.org/MULTI_INSTANCE_README.html"
341 elog
342 fi
343 }