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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Wed Jun 17 11:34:17 2015 UTC (3 years, 5 months ago) by blueness
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Remove older versions.

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

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.16-r1.ebuild,v 1.2 2015/04/27 02:50:36 blueness Exp $
4
5 EAPI="5"
6
7 inherit ssl-cert eutils multilib 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 ~mips ~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 echo "CONFIG_PROTECT=\"/etc/stunnel/stunnel.conf\"" > "${T}"/20stunnel
40 }
41
42 src_configure() {
43 econf \
44 --libdir="${EPREFIX}/usr/$(get_libdir)" \
45 $(use_enable ipv6) \
46 $(use_enable tcpd libwrap) \
47 --with-ssl="${EPREFIX}"/usr \
48 --disable-fips
49 }
50
51 src_install() {
52 emake DESTDIR="${D}" install
53 rm -rf "${ED}"/usr/share/doc/${PN}
54 rm -f "${ED}"/etc/stunnel/stunnel.conf-sample "${ED}"/usr/bin/stunnel3 \
55 "${ED}"/usr/share/man/man8/stunnel.{fr,pl}.8
56
57 # The binary was moved to /usr/bin with 4.21,
58 # symlink for backwards compatibility
59 dosym ../bin/stunnel /usr/sbin/stunnel
60
61 dodoc AUTHORS BUGS CREDITS PORTS README TODO ChangeLog
62 dohtml doc/stunnel.html doc/en/VNC_StunnelHOWTO.html tools/ca.html \
63 tools/importCA.html
64
65 insinto /etc/stunnel
66 doins "${FILESDIR}"/stunnel.conf
67 doinitd "${FILESDIR}"/stunnel
68
69 doenvd "${T}"/20stunnel
70
71 systemd_dounit "${S}/tools/stunnel.service"
72 systemd_newtmpfilesd "${FILESDIR}"/stunnel.tmpfiles.conf stunnel.conf
73 }
74
75 pkg_postinst() {
76 if [ ! -f "${EROOT}"/etc/stunnel/stunnel.key ]; then
77 install_cert /etc/stunnel/stunnel
78 chown stunnel:stunnel "${EROOT}"/etc/stunnel/stunnel.{crt,csr,key,pem}
79 chmod 0640 "${EROOT}"/etc/stunnel/stunnel.{crt,csr,key,pem}
80 fi
81
82 einfo "If you want to run multiple instances of stunnel, create a new config"
83 einfo "file ending with .conf in /etc/stunnel/. **Make sure** you change "
84 einfo "\'pid= \' with a unique filename."
85 }

  ViewVC Help
Powered by ViewVC 1.1.20