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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Mon Apr 20 21:27:45 2015 UTC (4 years ago) by blueness
Branch: MAIN
Version bump.

(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key 0xF52D4BBA)

1 blueness 1.1 # Copyright 1999-2015 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.15.ebuild,v 1.1 2015/04/17 11:59:05 blueness 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="ftp://ftp.stunnel.org/stunnel/archive/${PV%%.*}.x/${P}.tar.gz
12     http://www.usenix.org.uk/mirrors/stunnel/archive/${PV%%.*}.x/${P}.tar.gz
13     http://ftp.nluug.nl/pub/networking/stunnel/archive/${PV%%.*}.x/${P}.tar.gz
14     http://www.namesdir.com/mirrors/stunnel/archive/${PV%%.*}.x/${P}.tar.gz
15     http://stunnel.cybermirror.org/archive/${PV%%.*}.x/${P}.tar.gz
16     http://mirrors.zerg.biz/stunnel/archive/${PV%%.*}.x/${P}.tar.gz
17     ftp://mirrors.go-parts.com/stunnel/archive/${PV%%.*}.x/${P}.tar.gz"
18    
19     LICENSE="GPL-2"
20     SLOT="0"
21     KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x86-macos"
22     IUSE="ipv6 selinux tcpd"
23    
24     DEPEND="tcpd? ( sys-apps/tcp-wrappers )
25     dev-libs/openssl"
26     RDEPEND="${DEPEND}
27     selinux? ( sec-policy/selinux-stunnel )"
28    
29     pkg_setup() {
30     enewgroup stunnel
31     enewuser stunnel -1 -1 -1 stunnel
32     }
33    
34     src_prepare() {
35     # Hack away generation of certificate
36     sed -i -e "s/^install-data-local:/do-not-run-this:/" \
37     tools/Makefile.in || die "sed failed"
38     }
39    
40     src_configure() {
41     econf \
42     $(use_enable ipv6) \
43     $(use_enable tcpd libwrap) \
44     --with-ssl="${EPREFIX}"/usr \
45     --disable-fips
46     }
47    
48     src_install() {
49     emake DESTDIR="${D}" install
50     rm -rf "${ED}"/usr/share/doc/${PN}
51     rm -f "${ED}"/etc/stunnel/stunnel.conf-sample "${ED}"/usr/bin/stunnel3 \
52     "${ED}"/usr/share/man/man8/stunnel.{fr,pl}.8
53    
54     # The binary was moved to /usr/bin with 4.21,
55     # symlink for backwards compatibility
56     dosym ../bin/stunnel /usr/sbin/stunnel
57    
58     dodoc AUTHORS BUGS CREDITS PORTS README TODO ChangeLog
59     dohtml doc/stunnel.html doc/en/VNC_StunnelHOWTO.html tools/ca.html \
60     tools/importCA.html
61    
62     insinto /etc/stunnel
63     doins "${FILESDIR}"/stunnel.conf
64     doinitd "${FILESDIR}"/stunnel
65    
66     systemd_dounit "${S}/tools/stunnel.service"
67     systemd_newtmpfilesd "${FILESDIR}"/stunnel.tmpfiles.conf stunnel.conf
68     }
69    
70     pkg_postinst() {
71     if [ ! -f "${EROOT}"/etc/stunnel/stunnel.key ]; then
72     install_cert /etc/stunnel/stunnel
73     chown stunnel:stunnel "${EROOT}"/etc/stunnel/stunnel.{crt,csr,key,pem}
74     chmod 0640 "${EROOT}"/etc/stunnel/stunnel.{crt,csr,key,pem}
75     fi
76    
77     einfo "If you want to run multiple instances of stunnel, create a new config"
78     einfo "file ending with .conf in /etc/stunnel/. **Make sure** you change "
79     einfo "\'pid= \' with a unique filename."
80     }

  ViewVC Help
Powered by ViewVC 1.1.20