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