/[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.14 - (show annotations) (download)
Thu Feb 28 17:46:26 2013 UTC (2 months, 2 weeks ago) by zx2c4
Branch: MAIN
CVS Tags: HEAD
Changes since 1.13: +3 -2 lines
Block opensmtpd.

(Portage version: 2.2.0_alpha163/cvs/Linux x86_64, signed Manifest commit with key A5DE03AE)

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/ssmtp/ssmtp-2.64-r2.ebuild,v 1.13 2012/07/15 11:44:43 flameeyes 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 !mail-mta/opensmtpd
43 )"
44
45 REQUIRED_USE="gnutls? ( ssl )"
46
47 pkg_setup() {
48 if ! use prefix; then
49 enewgroup ssmtp
50 fi
51 }
52
53 src_prepare() {
54 EPATCH_SUFFIX="patch" EPATCH_SOURCE="${WORKDIR}/patches" \
55 epatch
56
57 # let's start by not using configure.in anymore as future autoconf
58 # versions will not support it.
59 mv configure.in configure.ac || die
60
61 eautoconf
62 }
63
64 src_configure() {
65 econf \
66 --sysconfdir="${EPREFIX}"/etc/ssmtp \
67 $(use_enable ssl) $(use_with gnutls) \
68 $(use_enable ipv6 inet6) \
69 --enable-md5auth
70 }
71
72 src_compile() {
73 emake etcdir="${EPREFIX}"/etc || die
74 }
75
76 src_install() {
77 dosbin ssmtp
78
79 doman ssmtp.8 ssmtp.conf.5
80 dodoc ChangeLog CHANGELOG_OLD INSTALL README TLS
81 newdoc ssmtp.lsm DESC
82
83 insinto /etc/ssmtp
84 doins ssmtp.conf revaliases
85
86 local conffile="${ED}etc/ssmtp/ssmtp.conf"
87
88 # Sorry about the weird indentation, I couldn't figure out a cleverer way
89 # to do this without having horribly >80 char lines.
90 sed -i -e "s:^hostname=:\n# Gentoo bug #47562\\
91 # Commenting the following line will force ssmtp to figure\\
92 # out the hostname itself.\n\\
93 # hostname=:" \
94 "${conffile}" || die "sed failed"
95
96 # Comment rewriteDomain (bug #243364)
97 sed -i -e "s:^rewriteDomain=:#rewriteDomain=:" "${conffile}"
98
99 # Set restrictive perms on ssmtp.conf as per #187841, #239197
100 # Protect the ssmtp configfile from being readable by regular users as it
101 # may contain login/password data to auth against a the mailhub used.
102 if ! use prefix; then
103 fowners root:ssmtp /etc/ssmtp/ssmtp.conf
104 fperms 640 /etc/ssmtp/ssmtp.conf
105 fowners root:ssmtp /usr/sbin/ssmtp
106 fperms 2711 /usr/sbin/ssmtp
107 fi
108
109 if use mta; then
110 dosym ../sbin/ssmtp /usr/lib/sendmail
111 dosym ../sbin/ssmtp /usr/bin/sendmail
112 dosym ssmtp /usr/sbin/sendmail
113 dosym ../sbin/ssmtp /usr/bin/mailq
114 dosym ../sbin/ssmtp /usr/bin/newaliases
115 fi
116 }

  ViewVC Help
Powered by ViewVC 1.1.13