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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Tue Jun 17 10:41:19 2014 UTC (3 months ago) by klausman
Branch: MAIN
Changes since 1.6: +2 -2 lines
Stable on alpha, bug #503506

(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key CE5D54E8)

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/stunnel/stunnel-5.02.ebuild,v 1.6 2014/06/13 21:45:20 ago Exp $
4
5 EAPI="5"
6
7 inherit ssl-cert eutils systemd user
8
9 DESCRIPTION="TLS/SSL - Port Wrapper"
10 HOMEPAGE="http://www.stunnel.org/index.html"
11 SRC_URI="http://www.stunnel.org/downloads/${P}.tar.gz"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="alpha amd64 arm hppa ~ia64 ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x86-macos"
16 IUSE="ipv6 selinux tcpd"
17
18 DEPEND="tcpd? ( sys-apps/tcp-wrappers )
19 dev-libs/openssl"
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 # Hack away generation of certificate
30 sed -i -e "s/^install-data-local:/do-not-run-this:/" \
31 tools/Makefile.in || die "sed failed"
32 }
33
34 src_configure() {
35 econf \
36 $(use_enable ipv6) \
37 $(use_enable tcpd libwrap) \
38 --with-ssl="${EPREFIX}"/usr \
39 --disable-fips
40 }
41
42 src_install() {
43 emake DESTDIR="${D}" install
44 rm -rf "${ED}"/usr/share/doc/${PN}
45 rm -f "${ED}"/etc/stunnel/stunnel.conf-sample "${ED}"/usr/bin/stunnel3 \
46 "${ED}"/usr/share/man/man8/stunnel.{fr,pl}.8
47
48 # The binary was moved to /usr/bin with 4.21,
49 # symlink for backwards compatibility
50 dosym ../bin/stunnel /usr/sbin/stunnel
51
52 dodoc AUTHORS BUGS CREDITS PORTS README TODO ChangeLog
53 dohtml doc/stunnel.html doc/en/VNC_StunnelHOWTO.html tools/ca.html \
54 tools/importCA.html
55
56 insinto /etc/stunnel
57 newins "${FILESDIR}"/stunnel.conf-r1 stunnel.conf
58 newinitd "${FILESDIR}"/stunnel.rc7 stunnel
59
60 systemd_dounit "${S}/tools/stunnel.service"
61 systemd_newtmpfilesd "${FILESDIR}"/stunnel.tmpfiles.conf-r1 stunnel.conf
62 }
63
64 pkg_postinst() {
65 if [ ! -f "${EROOT}"/etc/stunnel/stunnel.key ]; then
66 install_cert /etc/stunnel/stunnel
67 chown stunnel:stunnel "${EROOT}"/etc/stunnel/stunnel.{crt,csr,key,pem}
68 chmod 0640 "${EROOT}"/etc/stunnel/stunnel.{crt,csr,key,pem}
69 fi
70
71 einfo "If you want to run multiple instances of stunnel, create a new config"
72 einfo "file ending with .conf in /etc/stunnel/. **Make sure** you change "
73 einfo "\'pid= \' with a unique filename."
74 }

  ViewVC Help
Powered by ViewVC 1.1.20