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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.14 - (hide annotations) (download)
Sat Feb 16 16:38:26 2008 UTC (10 years, 6 months ago) by ulm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.13: +1 -1 lines
FILE REMOVED
Remove old.
(Portage version: 2.1.4.4)

1 agriffis 1.1 # Copyright 1999-2007 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 ulm 1.14 # $Header: /var/cvsroot/gentoo-x86/net-misc/stunnel/stunnel-4.20.ebuild,v 1.13 2007/12/08 10:38:25 ulm Exp $
4 agriffis 1.1
5     inherit ssl-cert eutils flag-o-matic
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 drac 1.12 KEYWORDS="alpha amd64 arm hppa ~ia64 ppc ppc64 sparc x86"
14 agriffis 1.1 IUSE="ipv6 selinux tcpd"
15    
16 agriffis 1.2 DEPEND="tcpd? ( sys-apps/tcp-wrappers )
17 agriffis 1.1 >=dev-libs/openssl-0.9.6j"
18 agriffis 1.2 RDEPEND="${DEPEND}
19 agriffis 1.1 selinux? ( sec-policy/selinux-stunnel )"
20    
21     src_unpack() {
22     unpack ${A}
23     # Hack away generation of certificate
24     sed -i s/^install-data-local:/do-not-run-this:/ "${S}"/tools/Makefile.in
25     }
26    
27     src_compile() {
28     local myconf=""
29     # Don't shoot me for doing this! The stunnel configure script is broke and
30     # doesn't honor --disable-foo
31     if use ipv6 ; then
32     myconf="${myconf} --enable-ipv6"
33     fi
34     if ! use tcpd ; then
35     myconf="${myconf} --disable-libwrap"
36     fi
37     econf ${myconf} || die "econf died"
38     emake || die "emake died"
39     }
40    
41     src_install() {
42 ulm 1.13 make DESTDIR="${D}" install || die "make install failed"
43     rm -rf "${D}"/usr/share/doc/${PN}
44     rm -f "${D}"/{etc/stunnel/stunnel.conf-sample,usr/sbin/stunnel3}
45     rm -f "${D}"/usr/share/man/man8/{stunnel.fr.8,stunnel.pl.8}
46 agriffis 1.1
47     dodoc AUTHORS BUGS CREDITS INSTALL NEWS PORTS README TODO ChangeLog \
48     doc/en/transproxy.txt
49     dohtml doc/stunnel.html doc/en/VNC_StunnelHOWTO.html tools/ca.html \
50     tools/importCA.html
51    
52     insinto /etc/stunnel
53 ulm 1.13 doins "${FILESDIR}"/stunnel.conf
54     newinitd "${FILESDIR}"/stunnel.rc6.${PV} stunnel
55 agriffis 1.1 # Check if there's currently an cert already there
56     if [ ! -f /etc/stunnel/stunnel.key ]; then
57     docert stunnel
58     fi
59    
60     keepdir /var/run/stunnel
61     }
62    
63     pkg_postinst() {
64     enewgroup stunnel
65     enewuser stunnel -1 -1 -1 stunnel
66    
67 ulm 1.13 chown stunnel:stunnel "${ROOT}"/var/run/stunnel
68     chown stunnel:stunnel "${ROOT}"/etc/stunnel/stunnel.{conf,crt,csr,key,pem}
69     chmod 0640 "${ROOT}"/etc/stunnel/stunnel.{conf,crt,csr,key,pem}
70 agriffis 1.1
71     if [ ! -z "$(egrep '/etc/stunnel/stunnel.pid' \
72 ulm 1.13 "${ROOT}"/etc/stunnel/stunnel.conf )" ] ; then
73 agriffis 1.1
74     ewarn "As of stunnel-4.09, the pid file will be located in /var/run/stunnel."
75     ewarn "Please stop stunnel, etc-update, and start stunnel back up to ensure"
76     ewarn "the update takes place"
77     ewarn ""
78     ewarn "The new location will be /var/run/stunnel/stunnel.pid"
79     ebeep 3
80     epause 3
81     fi
82     }

  ViewVC Help
Powered by ViewVC 1.1.20