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.7.6.ebuild
Date: Mon, 05 Sep 2011 05:39:29
Message-Id: 20110905053919.8E65E20051@flycatcher.gentoo.org
1 eras 11/09/05 05:39:19
2
3 Modified: ChangeLog
4 Added: postfix-2.7.6.ebuild
5 Log:
6 version bump
7
8 (Portage version: 2.1.10.13/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.284 mail-mta/postfix/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/ChangeLog?rev=1.284&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/ChangeLog?rev=1.284&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/ChangeLog?r1=1.283&r2=1.284
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v
20 retrieving revision 1.283
21 retrieving revision 1.284
22 diff -u -r1.283 -r1.284
23 --- ChangeLog 4 Sep 2011 04:27:03 -0000 1.283
24 +++ ChangeLog 5 Sep 2011 05:39:19 -0000 1.284
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.283 2011/09/04 04:27:03 radhermit Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v 1.284 2011/09/05 05:39:19 eras Exp $
30 +
31 +*postfix-2.7.6 (05 Sep 2011)
32 +
33 + 05 Sep 2011; Eray Aslan <eras@g.o> +postfix-2.7.6.ebuild:
34 + version bump
35
36 *postfix-2.8.5 (04 Sep 2011)
37
38
39
40
41 1.1 mail-mta/postfix/postfix-2.7.6.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/postfix-2.7.6.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/postfix-2.7.6.ebuild?rev=1.1&content-type=text/plain
45
46 Index: postfix-2.7.6.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.7.6.ebuild,v 1.1 2011/09/05 05:39:19 eras Exp $
51
52 EAPI=3
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.7.2"
60 VDA_P="${PN}-vda-${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 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
71 IUSE="cdb doc dovecot-sasl examples hardened ipv6 ldap mbox mysql nis pam postgres sasl selinux ssl vda"
72
73 DEPEND=">=sys-libs/db-3.2
74 >=dev-libs/libpcre-3.4
75 cdb? ( || ( >=dev-db/cdb-0.75-r1 >=dev-db/tinycdb-0.76 ) )
76 ldap? ( >=net-nds/openldap-1.2 )
77 mysql? ( virtual/mysql )
78 pam? ( virtual/pam )
79 postgres? ( dev-db/postgresql-base )
80 sasl? ( >=dev-libs/cyrus-sasl-2 )
81 ssl? ( >=dev-libs/openssl-0.9.6g )"
82
83 RDEPEND="${DEPEND}
84 net-mail/mailbase
85 selinux? ( sec-policy/selinux-postfix )
86 !mail-mta/courier
87 !mail-mta/esmtp
88 !mail-mta/exim
89 !mail-mta/mini-qmail
90 !mail-mta/msmtp[mta]
91 !mail-mta/nbsmtp
92 !mail-mta/netqmail
93 !mail-mta/nullmailer
94 !mail-mta/qmail-ldap
95 !mail-mta/sendmail
96 !<mail-mta/ssmtp-2.64-r2
97 !>=mail-mta/ssmtp-2.64-r2[mta]
98 !net-mail/fastforward"
99
100 S="${WORKDIR}/${MY_SRC}"
101
102 group_user_check() {
103 einfo "Checking for postfix group ..."
104 enewgroup postfix 207
105 einfo "Checking for postdrop group ..."
106 enewgroup postdrop 208
107 einfo "Checking for postfix user ..."
108 enewuser postfix 207 -1 /var/spool/postfix postfix,mail
109 }
110
111 pkg_setup() {
112 # Add postfix, postdrop user/group (bug #77565)
113 group_user_check || die "Failed to check/add needed user/group"
114 }
115
116 src_prepare() {
117 if use vda ; then
118 epatch "${DISTDIR}"/${VDA_P}.patch
119 fi
120
121 sed -i -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/mail/aliases|" \
122 src/util/sys_defs.h || die "sed failed"
123
124 # change default paths to better comply with portage standard paths
125 sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || die "sed failed"
126 }
127
128 src_configure() {
129 # Make sure LDFLAGS get passed down to the executables.
130 local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -lpcre -lcrypt -lpthread"
131
132 use pam && mylibs="${mylibs} -lpam"
133
134 if use ldap ; then
135 mycc="${mycc} -DHAS_LDAP"
136 mylibs="${mylibs} -lldap -llber"
137 fi
138
139 if use mysql ; then
140 mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)"
141 mylibs="${mylibs} $(mysql_config --libs)"
142 fi
143
144 if use postgres ; then
145 mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)"
146 mylibs="${mylibs} -lpq -L$(pg_config --libdir)"
147 fi
148
149 if use ssl ; then
150 mycc="${mycc} -DUSE_TLS"
151 mylibs="${mylibs} -lssl -lcrypto"
152 fi
153
154 if use sasl ; then
155 if use dovecot-sasl ; then
156 # Set dovecot as default.
157 mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\""
158 fi
159 mycc="${mycc} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl"
160 mylibs="${mylibs} -lsasl2"
161 elif use dovecot-sasl ; then
162 mycc="${mycc} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\""
163 fi
164
165 if ! use nis ; then
166 sed -i -e "s|#define HAS_NIS|//#define HAS_NIS|g" \
167 src/util/sys_defs.h || die "sed failed"
168 fi
169
170 if use cdb ; then
171 mycc="${mycc} -DHAS_CDB -I/usr/include/cdb"
172 CDB_LIBS=""
173
174 # Tinycdb is preferred.
175 if has_version dev-db/tinycdb ; then
176 einfo "Building with dev-db/tinycdb"
177 CDB_LIBS="-lcdb"
178 else
179 einfo "Building with dev-db/cdb"
180 CDB_PATH="/usr/$(get_libdir)"
181 for i in cdb.a alloc.a buffer.a unix.a byte.a ; do
182 CDB_LIBS="${CDB_LIBS} ${CDB_PATH}/${i}"
183 done
184 fi
185
186 mylibs="${mylibs} ${CDB_LIBS}"
187 fi
188
189 mycc="${mycc} -DDEF_DAEMON_DIR=\\\"/usr/$(get_libdir)/postfix\\\""
190
191 # Robin H. Johnson <robbat2@g.o> 17/Nov/2006
192 # Fix because infra boxes hit 2Gb .db files that fail a 32-bit fstat signed check.
193 mycc="${mycc} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
194 filter-lfs-flags
195
196 # Workaround for bug #76512
197 if use hardened ; then
198 [[ "$(gcc-version)" == "3.4" ]] && replace-flags -O? -Os
199 fi
200
201 emake DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" \
202 makefiles || die "configure problem"
203 }
204
205 src_install () {
206 local myconf
207 use doc && myconf="readme_directory=\"/usr/share/doc/${PF}/readme\" \
208 html_directory=\"/usr/share/doc/${PF}/html\""
209
210 /bin/sh postfix-install \
211 -non-interactive \
212 install_root="${D}" \
213 config_directory="/usr/share/doc/${PF}/defaults" \
214 manpage_directory="/usr/share/man" \
215 ${myconf} \
216 || die "postfix-install failed"
217
218 # Fix spool removal on upgrade
219 rm -Rf "${D}"/var
220 keepdir /var/spool/postfix
221
222 # Install rmail for UUCP, closes bug #19127
223 dobin auxiliary/rmail/rmail
224
225 # Provide another link for legacy FSH
226 dosym /usr/sbin/sendmail /usr/$(get_libdir)/sendmail
227
228 # Install qshape tool
229 dobin auxiliary/qshape/qshape.pl
230 doman man/man1/qshape.1
231
232 # Performance tuning tools and their manuals
233 dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink}
234 doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1
235
236 # Set proper permissions on required files/directories
237 dodir /var/lib/postfix
238 keepdir /var/lib/postfix
239 fowners postfix:postfix /var/lib/postfix
240 fowners postfix:postfix /var/lib/postfix/.keep_${CATEGORY}_${PN}-${SLOT}
241 fperms 0750 /var/lib/postfix
242 fowners root:postdrop /usr/sbin/post{drop,queue}
243 fperms 02711 /usr/sbin/post{drop,queue}
244
245 keepdir /etc/postfix
246 mv "${D}"/usr/share/doc/${PF}/defaults/*.cf "${D}"/etc/postfix
247 if use mbox ; then
248 mypostconf="mail_spool_directory=/var/spool/mail"
249 else
250 mypostconf="home_mailbox=.maildir/"
251 fi
252 "${D}"/usr/sbin/postconf -c "${D}"/etc/postfix \
253 -e ${mypostconf} || die "postconf failed"
254
255 insinto /etc/postfix
256 newins "${FILESDIR}"/smtp.pass saslpass
257 fperms 600 /etc/postfix/saslpass
258
259 newinitd "${FILESDIR}"/postfix.rc6.${RC_VER} postfix || die "newinitd failed"
260
261 use examples && mv "${S}"/examples "${D}"/usr/share/doc/${PF}/
262
263 dodoc *README COMPATIBILITY HISTORY INSTALL PORTING RELEASE_NOTES*
264
265 pamd_mimic_system smtp auth account
266
267 if use sasl ; then
268 insinto /etc/sasl2
269 newins "${FILESDIR}"/smtp.sasl smtpd.conf
270 fi
271
272 # Remove unnecessary files
273 rm -f "${D}"/usr/$(get_libdir)/postfix/*.cf
274 }
275
276 pkg_postinst() {
277 # Add postfix, postdrop user/group (bug #77565)
278 group_user_check || die "Failed to check/add needed user/group"
279
280 # Do not install server.{key,pem) SSL certificates if they already exist
281 if use ssl && [[ ! -f "${ROOT}"/etc/ssl/postfix/server.key \
282 && ! -f "${ROOT}"/etc/ssl/postfix/server.pem ]] ; then
283 SSL_ORGANIZATION="${SSL_ORGANIZATION:-Postfix SMTP Server}"
284 install_cert /etc/ssl/postfix/server
285 chown postfix:mail "${ROOT}"/etc/ssl/postfix/server.{key,pem}
286 fi
287
288 ebegin "Fixing queue directories and permissions"
289 "${ROOT}"/usr/$(get_libdir)/postfix/post-install upgrade-permissions \
290 daemon_directory="${ROOT}/usr/$(get_libdir)/postfix"
291
292 if [[ ! -e /etc/mail/aliases.db ]] ; then
293 ewarn
294 ewarn "You must edit /etc/mail/aliases to suit your needs"
295 ewarn "and then run /usr/bin/newaliases. Postfix will not"
296 ewarn "work correctly without it."
297 ewarn
298 fi
299
300 if [[ -e /etc/mailer.conf ]] ; then
301 einfo
302 einfo "mailwrapper support is discontinued."
303 einfo "You may want to 'emerge -C mailwrapper' now."
304 einfo
305 fi
306
307 elog
308 elog "See the RELEASE_NOTES file in /usr/share/doc/${PF}"
309 elog "for incompatibilities and other major changes between releases."
310 elog
311 }