/[gentoo-x86]/mail-mta/ssmtp/ssmtp-2.64-r2.ebuild
Gentoo

Contents of /mail-mta/ssmtp/ssmtp-2.64-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.13 - (show annotations) (download)
Sun Jul 15 11:44:43 2012 UTC (2 years, 5 months ago) by flameeyes
Branch: MAIN
Changes since 1.12: +14 -9 lines
Update 2.64 patchset to include the Solaris patch instead of having it in $FILESDIR; simplify prefix handling by not doing any permission handling there (it would otherwise create a security issue); rename configure.in for compatibility with future autoconf.  Remove old version and its patches.

(Portage version: 2.2.0_alpha117/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/mail-mta/ssmtp/ssmtp-2.64-r2.ebuild,v 1.12 2012/06/04 21:13:39 zmedico Exp $
4
5 EAPI="4"
6
7 PATCHSET=3
8
9 WANT_AUTOMAKE=none
10
11 inherit eutils autotools user
12
13 DESCRIPTION="Extremely simple MTA to get mail off the system to a Mailhub"
14 HOMEPAGE="ftp://ftp.debian.org/debian/pool/main/s/ssmtp/"
15 SRC_URI="mirror://debian/pool/main/s/ssmtp/${P/-/_}.orig.tar.bz2
16 http://dev.gentoo.org/~flameeyes/ssmtp/${P}-patches-${PATCHSET}.tar.bz2"
17
18 LICENSE="GPL-2"
19 SLOT="0"
20 KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
21 IUSE="ipv6 +ssl gnutls +mta"
22
23 DEPEND="ssl? (
24 !gnutls? ( dev-libs/openssl )
25 gnutls? ( net-libs/gnutls )
26 )"
27 RDEPEND="${DEPEND}
28 net-mail/mailbase
29 mta? (
30 !net-mail/mailwrapper
31 !mail-mta/courier
32 !mail-mta/esmtp
33 !mail-mta/exim
34 !mail-mta/mini-qmail
35 !mail-mta/msmtp[mta]
36 !mail-mta/nbsmtp
37 !mail-mta/netqmail
38 !mail-mta/nullmailer
39 !mail-mta/postfix
40 !mail-mta/qmail-ldap
41 !mail-mta/sendmail
42 )"
43
44 REQUIRED_USE="gnutls? ( ssl )"
45
46 pkg_setup() {
47 if ! use prefix; then
48 enewgroup ssmtp
49 fi
50 }
51
52 src_prepare() {
53 EPATCH_SUFFIX="patch" EPATCH_SOURCE="${WORKDIR}/patches" \
54 epatch
55
56 # let's start by not using configure.in anymore as future autoconf
57 # versions will not support it.
58 mv configure.in configure.ac || die
59
60 eautoconf
61 }
62
63 src_configure() {
64 econf \
65 --sysconfdir="${EPREFIX}"/etc/ssmtp \
66 $(use_enable ssl) $(use_with gnutls) \
67 $(use_enable ipv6 inet6) \
68 --enable-md5auth
69 }
70
71 src_compile() {
72 emake etcdir="${EPREFIX}"/etc || die
73 }
74
75 src_install() {
76 dosbin ssmtp
77
78 doman ssmtp.8 ssmtp.conf.5
79 dodoc ChangeLog CHANGELOG_OLD INSTALL README TLS
80 newdoc ssmtp.lsm DESC
81
82 insinto /etc/ssmtp
83 doins ssmtp.conf revaliases
84
85 local conffile="${ED}etc/ssmtp/ssmtp.conf"
86
87 # Sorry about the weird indentation, I couldn't figure out a cleverer way
88 # to do this without having horribly >80 char lines.
89 sed -i -e "s:^hostname=:\n# Gentoo bug #47562\\
90 # Commenting the following line will force ssmtp to figure\\
91 # out the hostname itself.\n\\
92 # hostname=:" \
93 "${conffile}" || die "sed failed"
94
95 # Comment rewriteDomain (bug #243364)
96 sed -i -e "s:^rewriteDomain=:#rewriteDomain=:" "${conffile}"
97
98 # Set restrictive perms on ssmtp.conf as per #187841, #239197
99 # Protect the ssmtp configfile from being readable by regular users as it
100 # may contain login/password data to auth against a the mailhub used.
101 if ! use prefix; then
102 fowners root:ssmtp /etc/ssmtp/ssmtp.conf
103 fperms 640 /etc/ssmtp/ssmtp.conf
104 fowners root:ssmtp /usr/sbin/ssmtp
105 fperms 2711 /usr/sbin/ssmtp
106 fi
107
108 if use mta; then
109 dosym ../sbin/ssmtp /usr/lib/sendmail
110 dosym ../sbin/ssmtp /usr/bin/sendmail
111 dosym ssmtp /usr/sbin/sendmail
112 dosym ../sbin/ssmtp /usr/bin/mailq
113 dosym ../sbin/ssmtp /usr/bin/newaliases
114 fi
115 }

  ViewVC Help
Powered by ViewVC 1.1.20