blob: 2e84f15fa900062ea80115c593d3f27da502ef13 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: (C) Bernhard Tittelbach$
inherit eutils toolchain-funcs autotools
DESCRIPTION="Anytun is an implementation of the Secure Anycast Tunneling
Protocol, intended to provide flexible and fault tolerant VPNs"
SRC_URI="http://anytun.org/~equinox/${P}.tar.gz"
HOMEPAGE="http://anytun.org/"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~x86-fbsd"
IUSE="gcrypt doc"
DEPEND=">=dev-libs/boost-1.35
gcrypt? ( dev-libs/libgcrypt )
!gcrypt? ( >=dev-libs/openssl-0.9.6 )
doc? ( <app-text/asciidoc-8.5.0 )" # asciidoc a2x <= 8.5.0 requires the -L switch
RDEPEND="${DEPEND}"
#pkg_setup() {
#}
src_unpack() {
unpack ${A}
cd "${S}/src"
if has_version ">=dev-libs/boost-1.37"; then
epatch "${FILESDIR}/${PN}-0.3.1-boost-mt.patch"
fi
#eautoreconf
}
src_compile() {
cd "${S}/src"
local myconf=""
if use gcrypt ; then
myconf="${myconf}"
else
myconf="${myconf} --use-ssl-crypto"
fi
#econf ${myconf} || die "configure failed"
./configure ${myconf} || die "configure failed"
emake || die "make failed"
if use doc ; then
einfo "Building manpages"
emake manpage
fi
}
src_install() {
cd "${S}/src"
dosbin anytun
use static && dosbin anytun-static
dobin anytun-config anytun-controld anytun-showtables anytun-nosync
newinitd "${FILESDIR}/${PN}-0.3.1.init" anytun
#insinto /etc/default/
#doins ${S}/etc/default/*
cd ${S}/etc/anytun/
find -type f -exec install -dm644 {} ${D}/etc/anytun/{}
insinto /usr/share/${P}/wireshark-lua/
doins ${S}/wireshark-lua/*
dodir /var/run/anytun
keepdir /var/run/anytun
dodir /var/run/anytun-controld
keepdir /var/run/anytun-controld
if use doc; then
cd ${S}
dodoc AUTHORS ChangeLog LICENSE README
cd ${S}/src/man/
doman anyrtpproxy.8 anytun-config.8 anytun-controld.8 anytun-showtables.8 anytun.8
prepalldocs
fi
}
pkg_postinst() {
enewgroup anytun
enewuser anytun -1 -1 /var/run/anytun anytun
einfo "Example configuration files have been installed in /etc/anytun"
einfo "tunnels get their own directory in /etc/anytun and should then"
einfo "be added to the /etc/anytun/autostart file"
einfo ""
einfo "Alternatively you can forget the autostart file and create"
einfo "gentoostyle anytun.{VPN} initrd scripts for each VPN"
einfo " ex: ln -s /etc/init.d/anytun /etc/init.d/anytun.client1"
einfo ""
einfo "Don't forget to "
einfo " rc-update add anytun default"
einfo "or"
einfo " rc-update add anytun.client1 default"
einfo ""
einfo "You can disect anytun traffic using wireshark by plugging the script"
einfo "/usr/share/${P}/wireshark-lua/satp.lua into wireshark"
}
|