/[gentoo-x86]/net-misc/stunnel/stunnel-4.35.ebuild
Gentoo

Contents of /net-misc/stunnel/stunnel-4.35.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Sun May 13 21:13:57 2012 UTC (2 years, 3 months ago) by ramereth
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
FILE REMOVED
Ebuild cleanup; fixes #373713

(Portage version: 2.1.10.49/cvs/Linux x86_64)

1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/stunnel/stunnel-4.35.ebuild,v 1.5 2011/05/28 16:49:54 armin76 Exp $
4
5 EAPI="2"
6
7 inherit autotools ssl-cert eutils
8
9 DESCRIPTION="TLS/SSL - Port Wrapper"
10 HOMEPAGE="http://stunnel.mirt.net/"
11 SRC_URI="ftp://ftp.stunnel.org/stunnel/${P}.tar.gz"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 ~s390 sparc x86"
16 IUSE="ipv6 selinux tcpd xforward listen-queue"
17
18 DEPEND="tcpd? ( sys-apps/tcp-wrappers )
19 >=dev-libs/openssl-0.9.8k"
20 RDEPEND="${DEPEND}
21 selinux? ( sec-policy/selinux-stunnel )"
22
23 pkg_setup() {
24 enewgroup stunnel
25 enewuser stunnel -1 -1 -1 stunnel
26 }
27
28 src_prepare() {
29 epatch "${FILESDIR}/${PN}-4.35-libwrap.patch"
30 use xforward && epatch "${FILESDIR}/stunnel-4.35-xforwarded-for.diff"
31 use listen-queue && epatch "${FILESDIR}/stunnel-4.34-listen-queue.diff"
32 eautoreconf
33
34 # Hack away generation of certificate
35 sed -i -e "s/^install-data-local:/do-not-run-this:/" \
36 tools/Makefile.in || die "sed failed"
37 }
38
39 src_configure() {
40 econf $(use_enable ipv6) \
41 $(use_enable tcpd libwrap) || die "econf died"
42 }
43
44 src_install() {
45 emake DESTDIR="${D}" install || die "emake install failed"
46 rm -rf "${D}"/usr/share/doc/${PN}
47 rm -f "${D}"/etc/stunnel/stunnel.conf-sample "${D}"/usr/bin/stunnel3 \
48 "${D}"/usr/share/man/man8/stunnel.{fr,pl}.8
49
50 # The binary was moved to /usr/bin with 4.21,
51 # symlink for backwards compatibility
52 dosym ../bin/stunnel /usr/sbin/stunnel
53
54 dodoc AUTHORS BUGS CREDITS PORTS README TODO ChangeLog
55 dohtml doc/stunnel.html doc/en/VNC_StunnelHOWTO.html tools/ca.html \
56 tools/importCA.html
57
58 insinto /etc/stunnel
59 doins "${FILESDIR}"/stunnel.conf
60 newinitd "${FILESDIR}"/stunnel.initd stunnel
61
62 keepdir /var/run/stunnel
63 fowners stunnel:stunnel /var/run/stunnel
64 }
65
66 pkg_postinst() {
67 if [ ! -f "${ROOT}"/etc/stunnel/stunnel.key ]; then
68 install_cert /etc/stunnel/stunnel
69 chown stunnel:stunnel "${ROOT}"/etc/stunnel/stunnel.{crt,csr,key,pem}
70 chmod 0640 "${ROOT}"/etc/stunnel/stunnel.{crt,csr,key,pem}
71 fi
72
73 einfo "If you want to run multiple instances of stunnel, create a new config"
74 einfo "file ending with .conf in /etc/stunnel/. **Make sure** you change "
75 einfo "\'pid= \' with a unique filename."
76 }

  ViewVC Help
Powered by ViewVC 1.1.20