Gentoo Archives: gentoo-commits

From: "Alin Nastac (mrness)" <mrness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in mail-mta/sendmail: ChangeLog sendmail-8.14.3-r1.ebuild
Date: Sat, 22 Aug 2009 21:41:25
Message-Id: E1MeyKx-0006DF-K0@stork.gentoo.org
1 mrness 09/08/22 21:41:23
2
3 Modified: ChangeLog
4 Added: sendmail-8.14.3-r1.ebuild
5 Log:
6 Migrate to EAPI 2.
7 Quote variables.
8 Install libmilter library in both forms, static and dynamic (#245950).
9 Add "use dns" to init script (#213656).
10 Fix QA pre-stripped binary warnings and honor LDFLAGS (#251946).
11 (Portage version: 2.1.6.13/cvs/Linux x86_64)
12
13 Revision Changes Path
14 1.82 mail-mta/sendmail/ChangeLog
15
16 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-mta/sendmail/ChangeLog?rev=1.82&view=markup
17 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-mta/sendmail/ChangeLog?rev=1.82&content-type=text/plain
18 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-mta/sendmail/ChangeLog?r1=1.81&r2=1.82
19
20 Index: ChangeLog
21 ===================================================================
22 RCS file: /var/cvsroot/gentoo-x86/mail-mta/sendmail/ChangeLog,v
23 retrieving revision 1.81
24 retrieving revision 1.82
25 diff -u -r1.81 -r1.82
26 --- ChangeLog 27 Jun 2009 16:06:47 -0000 1.81
27 +++ ChangeLog 22 Aug 2009 21:41:23 -0000 1.82
28 @@ -1,6 +1,15 @@
29 # ChangeLog for mail-mta/sendmail
30 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
31 -# $Header: /var/cvsroot/gentoo-x86/mail-mta/sendmail/ChangeLog,v 1.81 2009/06/27 16:06:47 patrick Exp $
32 +# $Header: /var/cvsroot/gentoo-x86/mail-mta/sendmail/ChangeLog,v 1.82 2009/08/22 21:41:23 mrness Exp $
33 +
34 +*sendmail-8.14.3-r1 (22 Aug 2009)
35 +
36 + 22 Aug 2009; Alin Năstac <mrness@g.o>
37 + +files/libmilter-sharedlib.patch, files/sendmail, files/site.config.m4,
38 + +sendmail-8.14.3-r1.ebuild:
39 + Migrate to EAPI 2. Quote variables. Install libmilter library in both forms,
40 + static and dynamic (#245950). Add "use dns" to init script (#213656). Fix QA
41 + pre-stripped binary warnings and honor LDFLAGS (#251946).
42
43 *sendmail-8.14.3 (27 Jun 2009)
44
45
46
47
48 1.1 mail-mta/sendmail/sendmail-8.14.3-r1.ebuild
49
50 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-mta/sendmail/sendmail-8.14.3-r1.ebuild?rev=1.1&view=markup
51 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-mta/sendmail/sendmail-8.14.3-r1.ebuild?rev=1.1&content-type=text/plain
52
53 Index: sendmail-8.14.3-r1.ebuild
54 ===================================================================
55 # Copyright 1999-2009 Gentoo Foundation
56 # Distributed under the terms of the GNU General Public License v2
57 # $Header: /var/cvsroot/gentoo-x86/mail-mta/sendmail/sendmail-8.14.3-r1.ebuild,v 1.1 2009/08/22 21:41:23 mrness Exp $
58
59 EAPI="2"
60
61 inherit eutils toolchain-funcs
62
63 DESCRIPTION="Widely-used Mail Transport Agent (MTA)"
64 HOMEPAGE="http://www.sendmail.org/"
65 SRC_URI="ftp://ftp.sendmail.org/pub/${PN}/${PN}.${PV}.tar.gz"
66
67 LICENSE="Sendmail"
68 SLOT="0"
69 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
70 IUSE="ssl ldap sasl tcpd mbox mailwrapper ipv6 nis sockets"
71
72 DEPEND="net-mail/mailbase
73 sys-devel/m4
74 sasl? ( >=dev-libs/cyrus-sasl-2.1.10 )
75 tcpd? ( sys-apps/tcp-wrappers )
76 ssl? ( dev-libs/openssl )
77 ldap? ( net-nds/openldap )
78 >=sys-libs/db-3.2
79 !net-mail/vacation
80 "
81 RDEPEND="${DEPEND}
82 >=net-mail/mailbase-0.00
83 !mailwrapper? ( !virtual/mta )
84 mailwrapper? ( >=net-mail/mailwrapper-0.2 )"
85 PDEPEND="!mbox? ( mail-filter/procmail )"
86 PROVIDE="virtual/mta"
87
88 # libmilter library is part of sendmail, but it does not share the version number with it.
89 # In order to find the right libmilter version number, check SMFI_VERSION definition
90 # that can be found in ${S}/include/libmilter/mfapi.h (see also SM_LM_VRS_* defines).
91 # For example, version 1.0.1 has a SMFI_VERSION of 0x01000001.
92 LIBMILTER_VER=1.0.1
93
94 pkg_setup() {
95 einfo "checking for smmsp group... create if missing."
96 enewgroup smmsp 209 || die "problem adding group smmsp"
97 einfo "checking for smmsp user... create if missing."
98 enewuser smmsp 209 -1 /var/spool/mqueue smmsp \
99 || die "problem adding user smmsp"
100 }
101
102 src_prepare() {
103 epatch "${FILESDIR}"/sendmail-delivered_hdr.patch
104 epatch "${FILESDIR}"/libmilter-sharedlib.patch
105
106 confCCOPTS="${CFLAGS}"
107 confLDOPTS="${LDFLAGS}"
108 confMAPDEF="-DMAP_REGEX"
109 conf_sendmail_LIBS=""
110 use sasl && confLIBS="${confLIBS} -lsasl2" \
111 && confENVDEF="${confENVDEF} -DSASL=2" \
112 && confCCOPTS="${confCCOPTS} -I/usr/include/sasl" \
113 && conf_sendmail_LIBS="${conf_sendmail_LIBS} -lsasl2"
114 use tcpd && confENVDEF="${confENVDEF} -DTCPWRAPPERS" \
115 && confLIBS="${confLIBS} -lwrap"
116 use ssl && confENVDEF="${confENVDEF} -DSTARTTLS -D_FFR_DEAL_WITH_ERROR_SSL" \
117 && confLIBS="${confLIBS} -lssl -lcrypto" \
118 && conf_sendmail_LIBS="${conf_sendmail_LIBS} -lssl -lcrypto"
119 use ldap && confMAPDEF="${confMAPDEF} -DLDAPMAP" \
120 && confLIBS="${confLIBS} -lldap -llber"
121 use ipv6 && confENVDEF="${confENVDEF} -DNETINET6"
122 use nis && confENVDEF="${confENVDEF} -DNIS"
123 use sockets && confENVDEF="${confENVDEF} -DSOCKETMAP"
124 sed -e "s:@@confCCOPTS@@:${confCCOPTS}:" \
125 -e "s/@@confLDOPTS@@/${confLDOPTS}/" \
126 -e "s/@@confMAPDEF@@/${confMAPDEF}/" \
127 -e "s/@@confENVDEF@@/${confENVDEF}/" \
128 -e "s/@@confLIBS@@/${confLIBS}/" \
129 -e "s/@@conf_sendmail_LIBS@@/${conf_sendmail_LIBS}/" \
130 "${FILESDIR}"/site.config.m4 > devtools/Site/site.config.m4
131 }
132
133 src_compile() {
134 sh Build CC="$(tc-getCC)"|| die "compilation failed in main Build script"
135 pushd libmilter
136 sh Build MILTER_SOVER=${LIBMILTER_VER} CC="$(tc-getCC)"|| die "libmilter compilation failed"
137 popd
138 }
139
140 src_install () {
141 local MY_LIBDIR=/usr/$(get_libdir)
142 local MY_OBJDIR="obj.`uname -s`.`uname -r`.`uname -m`"
143 dodir /usr/bin ${MY_LIBDIR} /usr/include/libmilter
144 dodir /usr/share/man/man{1,5,8} /usr/sbin /var/log /usr/share/sendmail-cf
145 dodir /var/spool/{mqueue,clientmqueue} /etc/conf.d
146 keepdir /var/spool/{clientmqueue,mqueue}
147 for dir in libsmutil sendmail mailstats praliases smrsh makemap vacation editmap
148 do
149 make DESTDIR="${D}" LIBDIR="${MY_LIBDIR}" MANROOT=/usr/share/man/man \
150 SBINOWN=root SBINGRP=root UBINOWN=root UBINGRP=root \
151 MANOWN=root MANGRP=root INCOWN=root INCGRP=root \
152 LIBOWN=root LIBGRP=root GBINOWN=root GBINGRP=root \
153 MSPQOWN=root CFOWN=root CFGRP=root \
154 install -C "${MY_OBJDIR}/${dir}" \
155 || die "install failed"
156 done
157 for dir in rmail mail.local
158 do
159 make DESTDIR="${D}" LIBDIR="${MY_LIBDIR}" MANROOT=/usr/share/man/man \
160 SBINOWN=root SBINGRP=root UBINOWN=root UBINGRP=root \
161 MANOWN=root MANGRP=root INCOWN=root INCGRP=root \
162 LIBOWN=root LIBGRP=root GBINOWN=root GBINGRP=root \
163 MSPQOWN=root CFOWN=root CFGRP=root \
164 force-install -C "${MY_OBJDIR}/${dir}" \
165 || die "install failed"
166 done
167
168 make DESTDIR="${D}" LIBDIR="${MY_LIBDIR}" MANROOT=/usr/share/man/man \
169 SBINOWN=root SBINGRP=root UBINOWN=root UBINGRP=root \
170 MANOWN=root MANGRP=root INCOWN=root INCGRP=root \
171 LIBOWN=root LIBGRP=root GBINOWN=root GBINGRP=root \
172 MSPQOWN=root CFOWN=root CFGRP=root \
173 MILTER_SOVER=${LIBMILTER_VER} \
174 install -C "${MY_OBJDIR}/libmilter" \
175 || die "install failed"
176
177 fowners root:smmsp /usr/sbin/sendmail
178 fperms 2555 /usr/sbin/sendmail
179 fowners smmsp:smmsp /var/spool/clientmqueue
180 fperms 770 /var/spool/clientmqueue
181 fperms 700 /var/spool/mqueue
182 dosym /usr/sbin/makemap /usr/bin/makemap
183 dodoc FAQ KNOWNBUGS README RELEASE_NOTES doc/op/op.ps
184 newdoc sendmail/README README.sendmail
185 newdoc sendmail/SECURITY SECURITY
186 newdoc sendmail/TUNING TUNING
187 newdoc smrsh/README README.smrsh
188 newdoc libmilter/README README.libmilter
189
190 newdoc cf/README README.cf
191 newdoc cf/cf/README README.install-cf
192 cp -pPR cf/* "${D}"/usr/share/sendmail-cf
193 insinto /etc/mail
194 if use mbox
195 then
196 doins "${FILESDIR}"/sendmail.mc
197 else
198 newins "${FILESDIR}"/sendmail-procmail.mc sendmail.mc
199 fi
200 m4 "${D}"/usr/share/sendmail-cf/m4/cf.m4 "${D}"/etc/mail/sendmail.mc \
201 > "${D}"/etc/mail/sendmail.cf
202 echo "include(\`/usr/share/sendmail-cf/m4/cf.m4')dnl" \
203 > "${D}"/etc/mail/submit.mc
204 cat "${D}"/usr/share/sendmail-cf/cf/submit.mc >> "${D}"/etc/mail/submit.mc
205 echo "# local-host-names - include all aliases for your machine here" \
206 > "${D}"/etc/mail/local-host-names
207 cat <<- EOF > "${D}"/etc/mail/trusted-users
208 # trusted-users - users that can send mail as others without a warning
209 # apache, mailman, majordomo, uucp are good candidates
210 EOF
211 cat <<- EOF > "${D}"/etc/mail/access
212 # Check the /usr/share/doc/sendmail/README.cf file for a description
213 # of the format of this file. (search for access_db in that file)
214 # The /usr/share/doc/sendmail/README.cf is part of the sendmail-doc
215 # package.
216 #
217
218 EOF
219 cat <<- EOF > "${D}"/etc/conf.d/sendmail
220 # Config file for /etc/init.d/sendmail
221 # add start-up options here
222 SENDMAIL_OPTS="-bd -q30m -L sm-mta" # default daemon mode
223 CLIENTMQUEUE_OPTS="-Ac -q30m -L sm-cm" # clientmqueue
224 KILL_OPTS="" # add -9/-15/your favorite evil SIG level here
225
226 EOF
227 doinitd "${FILESDIR}"/sendmail
228 keepdir /usr/adm/sm.bin
229
230 if use mailwrapper
231 then
232 mv "${D}"/usr/sbin/sendmail "${D}"/usr/sbin/sendmail.sendmail
233 insinto /etc/mail
234 doins "${FILESDIR}"/mailer.conf
235 rm "${D}"/usr/bin/mailq
236 rm "${D}"/usr/bin/newaliases
237 mv "${D}"/usr/share/man/man8/sendmail.8 \
238 "${D}"/usr/share/man/man8/sendmail-sendmail.8
239 mv "${D}"/usr/share/man/man1/mailq.1 \
240 "${D}"/usr/share/man/man1/mailq-sendmail.1
241 mv "${D}"/usr/share/man/man1/newaliases.1 \
242 "${D}"/usr/share/man/man1/newaliases-sendmail.1
243 mv "${D}"/usr/share/man/man5/aliases.5 \
244 "${D}"/usr/share/man/man5/aliases-sendmail.5
245 dosed 's/} sendmail/} sendmail.sendmail/' /etc/init.d/sendmail
246 dosed 's/sbin\/sendmail/sbin\/sendmail.sendmail/' /etc/init.d/sendmail
247 fi
248
249 }
250
251 pkg_postinst() {
252 if ! use mailwrapper && [[ -e /etc/mailer.conf ]]
253 then
254 elog
255 elog "Since you emerged sendmail without mailwrapper in USE,"
256 elog "you probably want to 'emerge -C mailwrapper' now."
257 elog
258 fi
259 }