1 |
hanno 08/04/21 12:05:22 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: courier-0.59.0.ebuild |
5 |
Log: |
6 |
courier version bump, proxy-maintained ebuild |
7 |
(Portage version: 2.1.5_rc5) |
8 |
|
9 |
Revision Changes Path |
10 |
1.100 mail-mta/courier/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-mta/courier/ChangeLog?rev=1.100&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-mta/courier/ChangeLog?rev=1.100&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-mta/courier/ChangeLog?r1=1.99&r2=1.100 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/mail-mta/courier/ChangeLog,v |
19 |
retrieving revision 1.99 |
20 |
retrieving revision 1.100 |
21 |
diff -u -r1.99 -r1.100 |
22 |
--- ChangeLog 20 Apr 2008 12:11:16 -0000 1.99 |
23 |
+++ ChangeLog 21 Apr 2008 12:05:22 -0000 1.100 |
24 |
@@ -1,6 +1,12 @@ |
25 |
# ChangeLog for mail-mta/courier |
26 |
# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/mail-mta/courier/ChangeLog,v 1.99 2008/04/20 12:11:16 hanno Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/courier/ChangeLog,v 1.100 2008/04/21 12:05:22 hanno Exp $ |
29 |
+ |
30 |
+*courier-0.59.0 (21 Apr 2008) |
31 |
+ |
32 |
+ 21 Apr 2008; Hanno Boeck <hanno@g.o> |
33 |
+ +files/remove-sysconftool.patch, +courier-0.59.0.ebuild: |
34 |
+ Version bump, proxy-maintained user ebuild by Bernd Wurst. |
35 |
|
36 |
20 Apr 2008; Hanno Boeck <hanno@g.o> courier-0.55.1-r1.ebuild: |
37 |
Fix quoting. |
38 |
|
39 |
|
40 |
|
41 |
1.1 mail-mta/courier/courier-0.59.0.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-mta/courier/courier-0.59.0.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-mta/courier/courier-0.59.0.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: courier-0.59.0.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2008 Gentoo Foundation |
49 |
# Distributed under the terms of the GNU General Public License v2 |
50 |
# $Header: /var/cvsroot/gentoo-x86/mail-mta/courier/courier-0.59.0.ebuild,v 1.1 2008/04/21 12:05:22 hanno Exp $ |
51 |
|
52 |
WANT_AUTOCONF="latest" |
53 |
WANT_AUTOMAKE="latest" |
54 |
|
55 |
inherit eutils flag-o-matic autotools |
56 |
|
57 |
DESCRIPTION="An MTA designed specifically for maildirs" |
58 |
[ -z "${PV/?.??/}" ] && SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2" |
59 |
[ -z "${PV/?.??.?/}" ] && SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2" |
60 |
[ -z "${SRC_URI}" ] && SRC_URI="http://www.courier-mta.org/beta/courier/${P%%_pre}.tar.bz2" |
61 |
HOMEPAGE="http://www.courier-mta.org/" |
62 |
S="${WORKDIR}/${P%%_pre}" |
63 |
|
64 |
SLOT="0" |
65 |
LICENSE="GPL-2" |
66 |
# not in keywords due to missing dependencies: ~arm ~s390 ~ppc64 |
67 |
KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~sparc ~x86" |
68 |
IUSE="postgres ldap mysql pam nls ipv6 spell fax crypt norewrite mailwrapper \ |
69 |
fam web webmail" |
70 |
|
71 |
PROVIDE="virtual/mta |
72 |
virtual/mda |
73 |
virtual/imapd" |
74 |
|
75 |
DEPEND=" |
76 |
>=net-libs/courier-authlib-0.59 |
77 |
>=dev-libs/openssl-0.9.6 |
78 |
>=sys-libs/gdbm-1.8.0 |
79 |
dev-libs/libpcre |
80 |
app-misc/mime-types |
81 |
fax? ( >=media-libs/netpbm-9.12 virtual/ghostscript >=net-dialup/mgetty-1.1.28 ) |
82 |
pam? ( virtual/pam ) |
83 |
mysql? ( virtual/mysql ) |
84 |
ldap? ( >=net-nds/openldap-1.2.11 ) |
85 |
postgres? ( >=dev-db/postgresql-7.1.3 ) |
86 |
spell? ( virtual/aspell-dict ) |
87 |
fam? ( virtual/fam ) |
88 |
!mailwrapper? ( !virtual/mta ) |
89 |
!virtual/imapd |
90 |
!mail-filter/maildrop" |
91 |
|
92 |
RDEPEND="${DEPEND} |
93 |
dev-lang/perl |
94 |
sys-process/procps" |
95 |
|
96 |
PDEPEND="mailwrapper? ( >=net-mail/mailwrapper-0.2 ) |
97 |
pam? ( net-mail/mailbase ) |
98 |
crypt? ( >=app-crypt/gnupg-1.0.4 )" |
99 |
|
100 |
filter-flags '-fomit-frame-pointer' |
101 |
|
102 |
src_unpack() { |
103 |
use fam || ( |
104 |
ewarn "File Alteration Monitor (FAM) is disabled" |
105 |
ewarn "courier-imap will fall back to 60 second polls." |
106 |
ewarn 'add "fam" to your USE flags to build as usual' |
107 |
ebeep 4 |
108 |
epause 4 ) |
109 |
unpack ${A} |
110 |
cd "${S}" |
111 |
use norewrite && epatch "${FILESDIR}/norewrite.patch" |
112 |
use elibc_uclibc && sed -i -e 's:linux-gnu\*:linux-gnu\*\ \|\ linux-uclibc:' config.sub |
113 |
|
114 |
epatch "${FILESDIR}/remove-sysconftool.patch" |
115 |
|
116 |
# some libtool version mismatch |
117 |
_elibtoolize --copy --force || die |
118 |
} |
119 |
|
120 |
src_compile() { |
121 |
local myconf |
122 |
myconf="`use_with ipv6` \ |
123 |
`use_with ldap ldapaliasd` `use_enable ldap maildropldap`" |
124 |
|
125 |
use ldap && myconf="${myconf} --with-ldapconfig=/etc/courier/maildropldap.conf" |
126 |
use spell || myconf="${myconf} --without-ispell" |
127 |
|
128 |
myconf="${myconf} --enable-mimetypes=/etc/mime.types" |
129 |
|
130 |
myconf="${myconf} $(use_with fam)" |
131 |
|
132 |
einfo "Configuring courier: $(echo ${myconf} | xargs echo)" |
133 |
|
134 |
econf \ |
135 |
--prefix=/usr \ |
136 |
--disable-root-check \ |
137 |
--mandir=/usr/share/man \ |
138 |
--sysconfdir=/etc/courier \ |
139 |
--libexecdir=/usr/$(get_libdir)/courier \ |
140 |
--datadir=/usr/share/courier \ |
141 |
--sharedstatedir=/var/lib/courier/com \ |
142 |
--localstatedir=/var/lib/courier \ |
143 |
--with-piddir=/var/run/courier \ |
144 |
--with-authdaemonvar=/var/lib/courier/authdaemon \ |
145 |
--with-mailuser=mail \ |
146 |
--with-mailgroup=mail \ |
147 |
--with-paranoid-smtpext \ |
148 |
--with-db=gdbm \ |
149 |
--disable-autorenamesent \ |
150 |
--cache-file="${S}/configuring.cache" \ |
151 |
--host="${CHOST}" ${myconf} debug=true || die "./configure" |
152 |
sed -e'/^install-perms-local:/a\ sed -e\"s|^|'"${D}"'|g\" -i permissions.dat' -i Makefile |
153 |
emake || die "Compile problem" |
154 |
} |
155 |
|
156 |
etc_courier() { |
157 |
# Import existing /etc/courier/file if it exists. |
158 |
# Add option only if it was not already set or even commented out |
159 |
file="${1}" ; word="`echo \"${2}\" | sed -e\"s|=.*$||\" -e\"s|^.*opt ||\"`" |
160 |
[ ! -e "${D}/etc/courier/${file}" ] && [ -e "/etc/courier/${file}" ] && \ |
161 |
cp "/etc/courier/${file}" "${D}/etc/courier/${file}" |
162 |
grep -q "${word}" "${D}/etc/courier/${file}" || \ |
163 |
echo "${2}" >> "${D}/etc/courier/${file}" |
164 |
} |
165 |
|
166 |
etc_courier_chg() { |
167 |
file="${1}" ; key="${2}" ; value="${3}" ; section="${4}" |
168 |
[ -z "${section}" ] && section="${2}" |
169 |
grep -q "${key}" "${file}" && elog "Changing ${file}: ${key} to ${value}" |
170 |
sed -i -e"/\#\#NAME: ${section}/,+30 s|${key}=.*|${key}=\"${value}\"|g" ${file} |
171 |
} |
172 |
|
173 |
|
174 |
src_install() { |
175 |
local f |
176 |
diropts -o mail -g mail |
177 |
keepdir /var/run/courier |
178 |
keepdir /var/lib/courier/tmp |
179 |
keepdir /var/lib/courier/msgs |
180 |
make install DESTDIR="${D}" || die "install" |
181 |
make install-configure || die "install-configure" |
182 |
|
183 |
# Get rid of files we dont want |
184 |
if ! use webmail ; then |
185 |
cd "${D}" |
186 |
cat "${FILESDIR}/webmail_files" | xargs rm -rf |
187 |
fi |
188 |
|
189 |
if ! use web ; then |
190 |
cd "${D}" |
191 |
cat "${FILESDIR}/webadmin_files" | xargs rm -rf |
192 |
fi |
193 |
|
194 |
for dir2keep in $(cd "${D}" && find ./var/lib/courier -type d) ; do |
195 |
keepdir "$dir2keep" || die "failed running keepdir: $dir2keep" |
196 |
done |
197 |
|
198 |
newinitd "${FILESDIR}/courier-init-r1" "courier" |
199 |
use fam || sed -i -e's|^.*use famd$||g' "${D}/etc/init.d/courier" |
200 |
|
201 |
cd "${D}/etc/courier" |
202 |
if use webmail ; then |
203 |
insinto /etc/courier |
204 |
newins "${FILESDIR}/apache-sqwebmail.inc" apache-sqwebmail.inc |
205 |
fi |
206 |
|
207 |
for f in *.dist ; do cp "${f}" "${f%%.dist}" ; done |
208 |
if use ldap ; then |
209 |
[ -e ldapaliasrc ] && ( chown root:0 ldapaliasrc ; chmod 400 ldapaliasrc ) |
210 |
else |
211 |
rm -f ldapaliasrc |
212 |
fi |
213 |
|
214 |
( [ -e /etc/courier/sizelimit ] && cat /etc/courier/sizelimit || echo 0 ) \ |
215 |
> "${D}/etc/courier/sizelimit" |
216 |
etc_courier maildroprc "" |
217 |
etc_courier esmtproutes "" |
218 |
etc_courier backuprelay "" |
219 |
etc_courier locallowercase "" |
220 |
etc_courier bofh "opt BOFHBADMIME=accept" |
221 |
etc_courier bofh "opt BOFHSPFTRUSTME=1" |
222 |
etc_courier bofh "opt BOFHSPFHELO=pass,neutral,unknown,none,error,softfail,fail" |
223 |
etc_courier bofh "opt BOFHSPFHELO=pass,neutral,unknown,none" |
224 |
etc_courier bofh "opt BOFHSPFFROM=all" |
225 |
etc_courier bofh "opt BOFHSPFMAILFROM=all" |
226 |
etc_courier bofh "#opt BOFHSPFHARDERROR=fail" |
227 |
etc_courier esmtpd "BOFHBADMIME=accept" |
228 |
etc_courier esmtpd-ssl "BOFHBADMIME=accept" |
229 |
etc_courier esmtpd-msa "BOFHBADMIME=accept" |
230 |
|
231 |
use fam && etc_courier_chg imapd IMAP_CAPABILITY "IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA AUTH=CRAM-MD5 AUTH=CRAM-SHA1 AUTH=CRAM-SHA256 IDLE" |
232 |
use fam || etc_courier_chg imapd IMAP_CAPABILITY "IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA AUTH=CRAM-MD5 AUTH=CRAM-SHA1 AUTH=CRAM-SHA256" |
233 |
|
234 |
# Fix for a sandbox violation on subsequential merges |
235 |
# - ticho@g.o, 2005-07-10 |
236 |
rm "${D}"/usr/sbin/{pop3d,imapd}{,-ssl} |
237 |
dosym /usr/share/courier/pop3d /usr/sbin/courier-pop3d |
238 |
dosym /usr/share/courier/pop3d-ssl /usr/sbin/courier-pop3d-ssl |
239 |
dosym /usr/share/courier/imapd /usr/sbin/courier-imapd |
240 |
dosym /usr/share/courier/imapd-ssl /usr/sbin/courier-imapd-ssl |
241 |
|
242 |
cd "${S}" |
243 |
cp imap/README README.imap |
244 |
use nls && cp unicode/README README.unicode |
245 |
dodoc AUTHORS BENCHMARKS COPYING* ChangeLog* INSTALL NEWS README* TODO courier/doc/*.txt |
246 |
dodoc tcpd/README.couriertls |
247 |
mv "${D}/usr/share/courier/htmldoc" "${D}/usr/share/doc/${P}/html" |
248 |
|
249 |
if use webmail ; then |
250 |
insinto /usr/$(get_libdir)/courier/courier |
251 |
insopts -m 755 -o mail -g mail |
252 |
doins "${S}/courier/webmaild" |
253 |
fi |
254 |
|
255 |
if use web ; then |
256 |
insinto /etc/courier/webadmin |
257 |
insopts -m 400 -o mail -g mail |
258 |
doins "${FILESDIR}/password.dist" |
259 |
fi |
260 |
|
261 |
# avoid name collisions in /usr/sbin, make webadmin match |
262 |
cd "${D}/usr/sbin" |
263 |
for f in imapd imapd-ssl pop3d pop3d-ssl ; do mv "${f}" "courier-${f}" ; done |
264 |
if use web ; then |
265 |
sed -i -e 's:\$sbindir\/imapd:\$sbindir\/courier-imapd:g' \ |
266 |
-e 's:\$sbindir\/imapd-ssl:\$sbindir\/courier-imapd-ssl:g' \ |
267 |
"${D}/usr/share/courier/courierwebadmin/admin-40imap.pl" \ |
268 |
|| ewarn "failed to fix webadmin" |
269 |
sed -i -e 's:\$sbindir\/pop3d:\$sbindir\/courier-pop3d:g' \ |
270 |
-e 's:\$sbindir\/pop3d-ssl:\$sbindir\/courier-pop3d-ssl:g' \ |
271 |
"${D}/usr/share/courier/courierwebadmin/admin-45pop3.pl" \ |
272 |
|| ewarn "failed to fix webadmin" |
273 |
fi |
274 |
|
275 |
# users should be able to send mail. Could be restricted with suictl. |
276 |
chmod u+s "${D}/usr/bin/sendmail" |
277 |
|
278 |
if use mailwrapper ; then |
279 |
mv "${D}/usr/bin/sendmail" "${D}/usr/bin/sendmail.courier" |
280 |
mv "${D}/usr/bin/rmail" "${D}/usr/bin/rmail.courier" |
281 |
mv "${D}/usr/bin/mailq" "${D}/usr/bin/mailq.courier" |
282 |
|
283 |
mv "${D}/usr/share/man/man1/sendmail.1" \ |
284 |
"${D}/usr/share/man/man1/sendmail-courier.1" |
285 |
mv "${D}/usr/share/man/man1/mailq.1" \ |
286 |
"${D}/usr/share/man/man1/mailq-courier.1" |
287 |
mv "${D}/usr/share/man/man1/rmail.1" \ |
288 |
"${D}/usr/share/man/man1/rmail-courier.1" |
289 |
|
290 |
insopts -m 444 -o mail -g mail |
291 |
insinto /etc/mail |
292 |
doins "${FILESDIR}/mailer.conf" |
293 |
else |
294 |
dosym /usr/bin/sendmail /usr/sbin/sendmail |
295 |
fi |
296 |
} |
297 |
|
298 |
src_test() { |
299 |
addpredict / |
300 |
vecho ">>> Test phase [check]: ${CATEGORY}/${PF}" |
301 |
if hasq userpriv "${FEATURES}" ; then |
302 |
if ! emake -j1 check; then |
303 |
hasq test "${FEATURES}" && die "Make check failed. See above for details." |
304 |
hasq test "${FEATURES}" || eerror "Make check failed. See above for details." |
305 |
fi |
306 |
else |
307 |
hasq test "${FEATURES}" && eerror "Make check needs FEATURES="userpriv" to work." |
308 |
fi |
309 |
SANDBOX_PREDICT="${SANDBOX_PREDICT%:/}" |
310 |
} |
311 |
|
312 |
pkg_postinst() { |
313 |
use fam && elog "fam daemon is needed for courier-imapd" \ |
314 |
|| ewarn "courier was built without fam support" |
315 |
} |
316 |
|
317 |
pkg_config() { |
318 |
mailhost="$(hostname)" |
319 |
export mailhost |
320 |
|
321 |
domainname="$(domainname)" |
322 |
if [ "x$domainname" = "x(none)" ] ; then |
323 |
domainname="$(echo ${mailhost} | sed -e "s/[^\.]*\.\(.*\)/\1/")" |
324 |
fi |
325 |
export domainname |
326 |
|
327 |
if [ "${ROOT}" = "/" ] ; then |
328 |
file="${ROOT}/etc/courier/locals" |
329 |
if [ ! -f "${file}" ] ; then |
330 |
echo "localhost" > "${file}"; |
331 |
echo "${domainname}" >> "${file}"; |
332 |
fi |
333 |
file="${ROOT}/etc/courier/esmtpacceptmailfor.dir/${domainname}" |
334 |
if [ ! -f "${file}" ] ; then |
335 |
echo "${domainname}" > "${file}" |
336 |
/usr/sbin/makeacceptmailfor |
337 |
fi |
338 |
|
339 |
file="${ROOT}/etc/courier/smtpaccess/${domainname}" |
340 |
if [ ! -f "${file}" ] |
341 |
then |
342 |
netstat -nr | grep "^[1-9]" | while read network gateway netmask rest |
343 |
do |
344 |
i=1 |
345 |
net="" |
346 |
TIFS="${IFS}" |
347 |
IFS="." |
348 |
for o in "${netmask}" |
349 |
do |
350 |
if [ "${o}" == "255" ] |
351 |
then |
352 |
[ "_${net}" == "_" ] || net="${net}." |
353 |
t="$(echo "${network}" | cut -d " " -f ${i})" |
354 |
net="${net}${t}" |
355 |
fi |
356 |
i="$((${i} + 1))" |
357 |
done |
358 |
IFS="${TIFS}" |
359 |
echo "doing configuration - relay control for the network ${net} !" |
360 |
echo "${net} allow,RELAYCLIENT" >> ${file} |
361 |
done |
362 |
/usr/sbin/makesmtpaccess |
363 |
fi |
364 |
fi |
365 |
|
366 |
echo "creating cert for esmtpd-ssl:" |
367 |
/usr/sbin/mkesmtpdcert |
368 |
echo "creating cert for imapd-ssl:" |
369 |
/usr/sbin/mkpop3dcert |
370 |
echo "creating cert for pop3d-ssl:" |
371 |
/usr/sbin/mkimapdcert |
372 |
} |
373 |
|
374 |
|
375 |
|
376 |
-- |
377 |
gentoo-commits@l.g.o mailing list |