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_pre20111119.ebuild postfix-2.9_pre20111117.ebuild
Date: Sun, 20 Nov 2011 10:32:53
Message-Id: 20111120103242.B5C9E2004B@flycatcher.gentoo.org
1 eras 11/11/20 10:32:42
2
3 Modified: ChangeLog
4 Added: postfix-2.9_pre20111119.ebuild
5 Removed: postfix-2.9_pre20111117.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.302 mail-mta/postfix/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/ChangeLog?rev=1.302&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/ChangeLog?rev=1.302&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/ChangeLog?r1=1.301&r2=1.302
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v
21 retrieving revision 1.301
22 retrieving revision 1.302
23 diff -u -r1.301 -r1.302
24 --- ChangeLog 18 Nov 2011 07:16:31 -0000 1.301
25 +++ ChangeLog 20 Nov 2011 10:32:42 -0000 1.302
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.301 2011/11/18 07:16:31 eras Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v 1.302 2011/11/20 10:32:42 eras Exp $
31 +
32 +*postfix-2.9_pre20111119 (20 Nov 2011)
33 +
34 + 20 Nov 2011; Eray Aslan <eras@g.o> -postfix-2.9_pre20111117.ebuild,
35 + +postfix-2.9_pre20111119.ebuild:
36 + version bump
37
38 *postfix-2.9_pre20111117 (18 Nov 2011)
39
40
41
42
43 1.1 mail-mta/postfix/postfix-2.9_pre20111119.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/postfix-2.9_pre20111119.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/postfix-2.9_pre20111119.ebuild?rev=1.1&content-type=text/plain
47
48 Index: postfix-2.9_pre20111119.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_pre20111119.ebuild,v 1.1 2011/11/20 10:32:42 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
189 # Tinycdb is preferred.
190 if has_version dev-db/tinycdb ; then
191 einfo "Building with dev-db/tinycdb"
192 CDB_LIBS="-lcdb"
193 else
194 einfo "Building with dev-db/cdb"
195 CDB_PATH="/usr/$(get_libdir)"
196 for i in cdb.a alloc.a buffer.a unix.a byte.a ; do
197 CDB_LIBS="${CDB_LIBS} ${CDB_PATH}/${i}"
198 done
199 fi
200
201 mylibs="${mylibs} ${CDB_LIBS}"
202 fi
203
204 mycc="${mycc} -DDEF_DAEMON_DIR=\\\"/usr/$(get_libdir)/postfix\\\""
205 mycc="${mycc} -DDEF_CONFIG_DIR=\\\"/etc/postfix\\\""
206 mycc="${mycc} -DDEF_COMMAND_DIR=\\\"/usr/sbin\\\""
207 mycc="${mycc} -DDEF_SENDMAIL_PATH=\\\"/usr/sbin/sendmail\\\""
208 mycc="${mycc} -DDEF_NEWALIS_PATH=\\\"/usr/bin/newaliases\\\""
209 mycc="${mycc} -DDEF_MAILQ_PATH=\\\"/usr/bin/mailq\\\""
210 mycc="${mycc} -DDEF_MANPAGE_DIR=\\\"/usr/share/man\\\""
211 mycc="${mycc} -DDEF_README_DIR=\\\"/usr/share/doc/${PF}/readme\\\""
212 mycc="${mycc} -DDEF_HTML_DIR=\\\"/usr/share/doc/${PF}/html\\\""
213 mycc="${mycc} -DDEF_QUEUE_DIR=\\\"/var/spool/postfix\\\""
214 mycc="${mycc} -DDEF_DATA_DIR=\\\"/var/lib/postfix\\\""
215 mycc="${mycc} -DDEF_MAIL_OWNER=\\\"postfix\\\""
216 mycc="${mycc} -DDEF_SGID_GROUP=\\\"postdrop\\\""
217
218 # Robin H. Johnson <robbat2@g.o> 17/Nov/2006
219 # Fix because infra boxes hit 2Gb .db files that fail a 32-bit fstat signed check.
220 mycc="${mycc} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
221 filter-lfs-flags
222
223 # Workaround for bug #76512
224 if use hardened ; then
225 [[ "$(gcc-version)" == "3.4" ]] && replace-flags -O? -Os
226 fi
227
228 # Remove annoying C++ comment style warnings - bug #378099
229 append-flags -Wno-comment
230
231 emake DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" makefiles
232 }
233
234 src_install () {
235 /bin/sh postfix-install \
236 -non-interactive \
237 install_root="${D}" \
238 config_directory="/etc/postfix" \
239 manpage_directory="/usr/share/man" \
240 readme_directory="/usr/share/doc/${PF}/readme" \
241 html_directory="/usr/share/doc/${PF}/html" \
242 command_directory="/usr/sbin" \
243 daemon_directory="/usr/$(get_libdir)/postfix" \
244 mailq_path="/usr/bin/mailq" \
245 newaliases_path="/usr/bin/newaliases" \
246 sendmail_path="/usr/sbin/sendmail" \
247 || die "postfix-install failed"
248
249 # Fix spool removal on upgrade
250 rm -Rf "${D}"/var
251 keepdir /var/spool/postfix
252
253 # Install rmail for UUCP, closes bug #19127
254 dobin auxiliary/rmail/rmail
255
256 # Provide another link for legacy FSH
257 dosym /usr/sbin/sendmail /usr/$(get_libdir)/sendmail
258
259 # Install qshape tool
260 dobin auxiliary/qshape/qshape.pl
261 doman man/man1/qshape.1
262
263 # Performance tuning tools and their manuals
264 dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink}
265 doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1
266
267 # Set proper permissions on required files/directories
268 dodir /var/lib/postfix
269 keepdir /var/lib/postfix
270 fowners postfix:postfix /var/lib/postfix
271 fowners postfix:postfix /var/lib/postfix/.keep_${CATEGORY}_${PN}-${SLOT}
272 fperms 0750 /var/lib/postfix
273 fowners root:postdrop /usr/sbin/post{drop,queue}
274 fperms 02711 /usr/sbin/post{drop,queue}
275
276 keepdir /etc/postfix
277 if use mbox ; then
278 mypostconf="mail_spool_directory=/var/spool/mail"
279 else
280 mypostconf="home_mailbox=.maildir/"
281 fi
282 "${D}"/usr/sbin/postconf -c "${D}"/etc/postfix \
283 -e ${mypostconf} || die "postconf failed"
284
285 insinto /etc/postfix
286 newins "${FILESDIR}"/smtp.pass saslpass
287 fperms 600 /etc/postfix/saslpass
288
289 newinitd "${FILESDIR}"/postfix.rc6.${RC_VER} postfix
290 # bug #359913
291 use mysql || sed -i -e "s/mysql //" "${D}/etc/init.d/postfix"
292 use postgres || sed -i -e "s/postgresql //" "${D}/etc/init.d/postfix"
293
294 mv "${S}"/examples "${D}"/usr/share/doc/${PF}/
295 mv "${D}"/etc/postfix/{*.default,makedefs.out} "${D}"/usr/share/doc/${PF}/
296
297 dodoc *README COMPATIBILITY HISTORY INSTALL PORTING RELEASE_NOTES*
298
299 pamd_mimic_system smtp auth account
300
301 if use sasl ; then
302 insinto /etc/sasl2
303 newins "${FILESDIR}"/smtp.sasl smtpd.conf
304 fi
305
306 # header files
307 insinto /usr/include/postfix
308 doins include/*.h
309
310 # Remove unnecessary files
311 rm -f "${D}"/etc/postfix/{*LICENSE,access,aliases,canonical,generic}
312 rm -f "${D}"/etc/postfix/{header_checks,relocated,transport,virtual}
313 }
314
315 pkg_postinst() {
316 # Do not install server.{key,pem) SSL certificates if they already exist
317 if use ssl && [[ ! -f "${ROOT}"/etc/ssl/postfix/server.key \
318 && ! -f "${ROOT}"/etc/ssl/postfix/server.pem ]] ; then
319 SSL_ORGANIZATION="${SSL_ORGANIZATION:-Postfix SMTP Server}"
320 install_cert /etc/ssl/postfix/server
321 chown postfix:mail "${ROOT}"/etc/ssl/postfix/server.{key,pem}
322 fi
323
324 if [[ ! -e /etc/mail/aliases.db ]] ; then
325 ewarn
326 ewarn "You must edit /etc/mail/aliases to suit your needs"
327 ewarn "and then run /usr/bin/newaliases. Postfix will not"
328 ewarn "work correctly without it."
329 ewarn
330 fi
331
332 elog "See the RELEASE_NOTES file in /usr/share/doc/${PF}"
333 elog "for incompatibilities and other major changes between releases."
334
335 if [[ ${REPLACING_VERSIONS} < 2.9 ]]; then
336 elog "If you are using old style postfix instances by symlinking"
337 elog "startup scripts in ${ROOT}etc/init.d, please consider"
338 elog "upgrading your config for postmulti support. For more info:"
339 elog "http://www.postfix.org/MULTI_INSTANCE_README.html"
340 elog
341 fi
342 }