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

Contents of /net-misc/stunnel/stunnel-4.21-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (show annotations) (download)
Thu Apr 30 21:55:13 2009 UTC (5 years, 5 months ago) by patrick
Branch: MAIN
CVS Tags: HEAD
Changes since 1.9: +1 -1 lines
FILE REMOVED
Remove old
(Portage version: 2.2_rc31/cvs/Linux x86_64)

1 # Copyright 1999-2008 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.21-r1.ebuild,v 1.9 2008/02/16 16:11:14 rbu Exp $
4
5 inherit autotools ssl-cert eutils
6
7 DESCRIPTION="TLS/SSL - Port Wrapper"
8 HOMEPAGE="http://stunnel.mirt.net/"
9 SRC_URI="http://www.stunnel.org/download/stunnel/src/${P}.tar.gz"
10
11 LICENSE="GPL-2"
12 SLOT="0"
13 KEYWORDS="alpha amd64 arm hppa ~ia64 ppc ppc64 sparc x86"
14 IUSE="ipv6 selinux tcpd"
15
16 DEPEND="tcpd? ( sys-apps/tcp-wrappers )
17 >=dev-libs/openssl-0.9.6j"
18 RDEPEND="${DEPEND}
19 selinux? ( sec-policy/selinux-stunnel )"
20
21 pkg_setup() {
22 enewgroup stunnel
23 enewuser stunnel -1 -1 -1 stunnel
24 }
25
26 src_unpack() {
27 unpack ${A}
28 cd "${S}"
29 epatch "${FILESDIR}/${P}-libwrap.patch"
30 epatch "${FILESDIR}/${P}-setuid.patch"
31 eautoreconf
32
33 # Hack away generation of certificate
34 sed -i -e "s/^install-data-local:/do-not-run-this:/" \
35 tools/Makefile.in || die "sed failed"
36 }
37
38 src_compile() {
39 econf $(use_enable ipv6) \
40 $(use_enable tcpd libwrap) || die "econf died"
41 emake || die "emake 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 doc/en/transproxy.txt
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.rc6 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 if [ ! -z "$(grep /etc/stunnel/stunnel.pid \
74 "${ROOT}"/etc/stunnel/stunnel.conf )" ] ; then
75
76 ewarn "As of stunnel-4.09, the pid file will be located in /var/run/stunnel."
77 ewarn "Please stop stunnel, etc-update, and start stunnel back up to ensure"
78 ewarn "the update takes place"
79 ewarn
80 ewarn "The new location will be /var/run/stunnel/stunnel.pid"
81 fi
82 }

  ViewVC Help
Powered by ViewVC 1.1.20