/[gentoo-x86]/mail-mta/sendmail/sendmail-8.14.5-r1.ebuild
Gentoo

Contents of /mail-mta/sendmail/sendmail-8.14.5-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Wed Jan 29 04:09:57 2014 UTC (10 months, 3 weeks ago) by radhermit
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
FILE REMOVED
Remove old.

(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 4AB3E85B4F064CA3)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/mail-mta/sendmail/sendmail-8.14.5-r1.ebuild,v 1.5 2013/02/28 17:54:43 zx2c4 Exp $
4
5 EAPI="2"
6
7 inherit eutils multilib toolchain-funcs user
8
9 DESCRIPTION="Widely-used Mail Transport Agent (MTA)"
10 HOMEPAGE="http://www.sendmail.org/"
11 SRC_URI="ftp://ftp.sendmail.org/pub/${PN}/${PN}.${PV}.tar.gz"
12
13 LICENSE="Sendmail"
14 SLOT="0"
15 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
16 IUSE="ssl ldap sasl tcpd mbox ipv6 nis sockets"
17
18 DEPEND="net-mail/mailbase
19 sys-devel/m4
20 sasl? ( >=dev-libs/cyrus-sasl-2.1.10 )
21 tcpd? ( sys-apps/tcp-wrappers )
22 ssl? ( dev-libs/openssl )
23 ldap? ( net-nds/openldap )
24 >=sys-libs/db-3.2
25 !net-mail/vacation
26 "
27 RDEPEND="${DEPEND}
28 >=net-mail/mailbase-0.00
29 !mail-mta/courier
30 !mail-mta/esmtp
31 !mail-mta/exim
32 !mail-mta/mini-qmail
33 !mail-mta/msmtp[mta]
34 !mail-mta/netqmail
35 !mail-mta/nullmailer
36 !mail-mta/postfix
37 !mail-mta/opensmtpd
38 !mail-mta/qmail-ldap
39 !<mail-mta/ssmtp-2.64-r2
40 !>=mail-mta/ssmtp-2.64-r2[mta]"
41
42 PDEPEND="!mbox? ( mail-filter/procmail )"
43
44 # libmilter library is part of sendmail, but it does not share the version number with it.
45 # In order to find the right libmilter version number, check SMFI_VERSION definition
46 # that can be found in ${S}/include/libmilter/mfapi.h (see also SM_LM_VRS_* defines).
47 # For example, version 1.0.1 has a SMFI_VERSION of 0x01000001.
48 LIBMILTER_VER=1.0.2
49
50 pkg_setup() {
51 enewgroup smmsp 209
52 enewuser smmsp 209 -1 /var/spool/mqueue smmsp
53 }
54
55 src_prepare() {
56 epatch "${FILESDIR}"/sendmail-build-system.patch
57 epatch "${FILESDIR}"/sendmail-delivered_hdr.patch
58 epatch "${FILESDIR}"/libmilter-sharedlib.patch
59 epatch "${FILESDIR}"/${P}+db-5.0.patch
60
61 local confCC="$(tc-getCC)"
62 local confCCOPTS="${CFLAGS}"
63 local confLDOPTS="${LDFLAGS}"
64 local confMAPDEF="-DMAP_REGEX"
65 local conf_sendmail_LIBS=""
66 use sasl && confLIBS="${confLIBS} -lsasl2" \
67 && confENVDEF="${confENVDEF} -DSASL=2" \
68 && confCCOPTS="${confCCOPTS} -I/usr/include/sasl" \
69 && conf_sendmail_LIBS="${conf_sendmail_LIBS} -lsasl2"
70 use tcpd && confENVDEF="${confENVDEF} -DTCPWRAPPERS" \
71 && confLIBS="${confLIBS} -lwrap"
72 use ssl && confENVDEF="${confENVDEF} -DSTARTTLS -D_FFR_DEAL_WITH_ERROR_SSL" \
73 && confENVDEF="${confENVDEF} -D_FFR_TLS_1" \
74 && confLIBS="${confLIBS} -lssl -lcrypto" \
75 && conf_sendmail_LIBS="${conf_sendmail_LIBS} -lssl -lcrypto"
76 use ldap && confMAPDEF="${confMAPDEF} -DLDAPMAP" \
77 && confLIBS="${confLIBS} -lldap -llber"
78 use ipv6 && confENVDEF="${confENVDEF} -DNETINET6"
79 use nis && confENVDEF="${confENVDEF} -DNIS"
80 use sockets && confENVDEF="${confENVDEF} -DSOCKETMAP"
81 sed -e "s:@@confCCOPTS@@:${confCCOPTS}:" \
82 -e "s/@@confLDOPTS@@/${confLDOPTS}/" \
83 -e "s/@@confCC@@/${confCC}/" \
84 -e "s/@@confMAPDEF@@/${confMAPDEF}/" \
85 -e "s/@@confENVDEF@@/${confENVDEF}/" \
86 -e "s/@@confLIBS@@/${confLIBS}/" \
87 -e "s/@@conf_sendmail_LIBS@@/${conf_sendmail_LIBS}/" \
88 "${FILESDIR}"/site.config.m4 > devtools/Site/site.config.m4
89 }
90
91 src_compile() {
92 sh Build || die "compilation failed in main Build script"
93 pushd libmilter
94 sh Build MILTER_SOVER=${LIBMILTER_VER} || die "libmilter compilation failed"
95 popd
96 }
97
98 src_install () {
99 local MY_LIBDIR=/usr/$(get_libdir)
100 local MY_OBJDIR="obj.`uname -s`.`uname -r`.`uname -m`"
101 dodir /usr/bin ${MY_LIBDIR} /usr/include/libmilter
102 dodir /usr/share/man/man{1,5,8} /usr/sbin /var/log /usr/share/sendmail-cf
103 dodir /var/spool/{mqueue,clientmqueue} /etc/conf.d
104 keepdir /var/spool/{clientmqueue,mqueue}
105 for dir in libsmutil sendmail mailstats praliases smrsh makemap vacation editmap
106 do
107 make DESTDIR="${D}" LIBDIR="${MY_LIBDIR}" MANROOT=/usr/share/man/man \
108 SBINOWN=root SBINGRP=root UBINOWN=root UBINGRP=root \
109 MANOWN=root MANGRP=root INCOWN=root INCGRP=root \
110 LIBOWN=root LIBGRP=root GBINOWN=root GBINGRP=root \
111 MSPQOWN=root CFOWN=root CFGRP=root \
112 install -C "${MY_OBJDIR}/${dir}" \
113 || die "install failed"
114 done
115 for dir in rmail mail.local
116 do
117 make DESTDIR="${D}" LIBDIR="${MY_LIBDIR}" MANROOT=/usr/share/man/man \
118 SBINOWN=root SBINGRP=root UBINOWN=root UBINGRP=root \
119 MANOWN=root MANGRP=root INCOWN=root INCGRP=root \
120 LIBOWN=root LIBGRP=root GBINOWN=root GBINGRP=root \
121 MSPQOWN=root CFOWN=root CFGRP=root \
122 force-install -C "${MY_OBJDIR}/${dir}" \
123 || die "install failed"
124 done
125
126 make DESTDIR="${D}" LIBDIR="${MY_LIBDIR}" MANROOT=/usr/share/man/man \
127 SBINOWN=root SBINGRP=root UBINOWN=root UBINGRP=root \
128 MANOWN=root MANGRP=root INCOWN=root INCGRP=root \
129 LIBOWN=root LIBGRP=root GBINOWN=root GBINGRP=root \
130 MSPQOWN=root CFOWN=root CFGRP=root \
131 MILTER_SOVER=${LIBMILTER_VER} \
132 install -C "${MY_OBJDIR}/libmilter" \
133 || die "install failed"
134
135 fowners root:smmsp /usr/sbin/sendmail
136 fperms 2555 /usr/sbin/sendmail
137 fowners smmsp:smmsp /var/spool/clientmqueue
138 fperms 770 /var/spool/clientmqueue
139 fperms 700 /var/spool/mqueue
140 dosym /usr/sbin/makemap /usr/bin/makemap
141 dodoc FAQ KNOWNBUGS README RELEASE_NOTES doc/op/op.ps
142 newdoc sendmail/README README.sendmail
143 newdoc sendmail/SECURITY SECURITY
144 newdoc sendmail/TUNING TUNING
145 newdoc smrsh/README README.smrsh
146 newdoc libmilter/README README.libmilter
147
148 newdoc cf/README README.cf
149 newdoc cf/cf/README README.install-cf
150 cp -pPR cf/* "${D}"/usr/share/sendmail-cf
151 insinto /etc/mail
152 if use mbox
153 then
154 doins "${FILESDIR}"/sendmail.mc
155 else
156 newins "${FILESDIR}"/sendmail-procmail.mc sendmail.mc
157 fi
158 m4 "${D}"/usr/share/sendmail-cf/m4/cf.m4 "${D}"/etc/mail/sendmail.mc \
159 > "${D}"/etc/mail/sendmail.cf
160 echo "include(\`/usr/share/sendmail-cf/m4/cf.m4')dnl" \
161 > "${D}"/etc/mail/submit.mc
162 cat "${D}"/usr/share/sendmail-cf/cf/submit.mc >> "${D}"/etc/mail/submit.mc
163 echo "# local-host-names - include all aliases for your machine here" \
164 > "${D}"/etc/mail/local-host-names
165 cat <<- EOF > "${D}"/etc/mail/trusted-users
166 # trusted-users - users that can send mail as others without a warning
167 # apache, mailman, majordomo, uucp are good candidates
168 EOF
169 cat <<- EOF > "${D}"/etc/mail/access
170 # Check the /usr/share/doc/sendmail/README.cf file for a description
171 # of the format of this file. (search for access_db in that file)
172 # The /usr/share/doc/sendmail/README.cf is part of the sendmail-doc
173 # package.
174 #
175
176 EOF
177 cat <<- EOF > "${D}"/etc/conf.d/sendmail
178 # Config file for /etc/init.d/sendmail
179 # add start-up options here
180 SENDMAIL_OPTS="-bd -q30m -L sm-mta" # default daemon mode
181 CLIENTMQUEUE_OPTS="-Ac -q30m -L sm-cm" # clientmqueue
182 KILL_OPTS="" # add -9/-15/your favorite evil SIG level here
183
184 EOF
185 doinitd "${FILESDIR}"/sendmail
186 keepdir /usr/adm/sm.bin
187
188 }

  ViewVC Help
Powered by ViewVC 1.1.20