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/tinc/tinc-1.1_pre11.ebuild,v 1.2 2015/03/03 09:36:50 dlan Exp $ |
4 |
|
5 |
EAPI="5" |
6 |
|
7 |
MY_PV=${PV/_/} |
8 |
MY_P=${PN}-${MY_PV} |
9 |
|
10 |
PYTHON_COMPAT=( python2_7 ) |
11 |
inherit eutils systemd python-any-r1 |
12 |
|
13 |
DESCRIPTION="tinc is an easy to configure VPN implementation" |
14 |
HOMEPAGE="http://www.tinc-vpn.org/" |
15 |
SRC_URI="http://www.tinc-vpn.org/packages/${MY_P}.tar.gz" |
16 |
|
17 |
LICENSE="GPL-2" |
18 |
SLOT="0" |
19 |
KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" |
20 |
IUSE="+lzo +ncurses +openssl gcrypt gui +readline uml vde +zlib" |
21 |
|
22 |
DEPEND="dev-libs/openssl:= |
23 |
lzo? ( dev-libs/lzo:2 ) |
24 |
ncurses? ( sys-libs/ncurses ) |
25 |
readline? ( sys-libs/readline:= ) |
26 |
zlib? ( sys-libs/zlib )" |
27 |
RDEPEND="${DEPEND} |
28 |
vde? ( net-misc/vde ) |
29 |
${PYTHON_DEPS} |
30 |
gui? ( $(python_gen_any_dep ' |
31 |
dev-python/wxpython[${PYTHON_USEDEP}] |
32 |
') )" |
33 |
|
34 |
REQUIRED_USE="^^ ( openssl gcrypt )" |
35 |
|
36 |
S="${WORKDIR}/${MY_P}" |
37 |
|
38 |
src_configure() { |
39 |
econf \ |
40 |
--enable-jumbograms \ |
41 |
--disable-tunemu \ |
42 |
--with-windows2000 \ |
43 |
--disable-silent-rules \ |
44 |
$(use_enable lzo) \ |
45 |
$(use_enable ncurses curses) \ |
46 |
$(use_enable readline) \ |
47 |
$(use_enable uml) \ |
48 |
$(use_enable vde) \ |
49 |
$(use_enable zlib) \ |
50 |
$(use_with openssl) \ |
51 |
# $(use_with gcrypt libgcrypt), upstream not ready |
52 |
} |
53 |
|
54 |
src_install() { |
55 |
emake DESTDIR="${D}" install |
56 |
dodir /etc/tinc |
57 |
dodoc AUTHORS NEWS README THANKS |
58 |
doconfd "${FILESDIR}"/tinc.networks |
59 |
newconfd "${FILESDIR}"/tincd.conf tincd |
60 |
newinitd "${FILESDIR}"/tincd-r1 tincd |
61 |
systemd_newunit "${FILESDIR}"/tincd_at.service "tincd@.service" |
62 |
|
63 |
if use gui; then |
64 |
python_fix_shebang "${ED}"/usr/bin/tinc-gui |
65 |
else |
66 |
rm -f "${ED}"/usr/bin/tinc-gui || die |
67 |
fi |
68 |
} |
69 |
|
70 |
pkg_postinst() { |
71 |
elog "This package requires the tun/tap kernel device." |
72 |
elog "Look at http://www.tinc-vpn.org/ for how to configure tinc" |
73 |
} |