blob: fb10d99cea7ee988b163fe2d2ad972fc44a24b2e (
plain)
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
|
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/openconnect/openconnect-3.11.ebuild,v 1.1 2011/08/16 09:15:47 dagger Exp $
EAPI=4
inherit eutils linux-info
DESCRIPTION="Free client for Cisco AnyConnect SSL VPN software"
HOMEPAGE="http://www.infradead.org/openconnect.html"
SRC_URI="ftp://ftp.infradead.org/pub/${PN}/${P}.tar.gz
http://dev.gentoo.org/~dagger/files/openconnect-script"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="static-libs"
DEPEND="dev-libs/openssl
dev-libs/libxml2
net-libs/libproxy"
RDEPEND="${DEPEND}
sys-apps/iproute2"
tun_tap_check() {
ebegin "Checking for TUN/TAP support"
if { ! linux_chkconfig_present TUN; }; then
eerror "Please enable TUN/TAP support in your kernel config, found at:"
eerror
eerror " Device Drivers --->"
eerror " [*] Network device support --->"
eerror " <*> Universal TUN/TAP device driver support"
eerror
eerror "and recompile your kernel ..."
die "no CONFIG_TUN support detected!"
fi
eend $?
}
pkg_setup() {
if use kernel_linux; then
get_version
if linux_config_exists; then
tun_tap_check
else
ewarn "Was unable to determine your kernel .config"
ewarn "Please note that OpenConnect requires CONFIG_TUN to be set in your kernel .config, Without it, it will not work correctly."
## We don't die here, so it's possible to compile this package without kernel sources available. Required for cross-compilation.
fi
fi
}
src_configure() {
ECONF="$(use_enable static-libs static)"
econf ${ECONF}
}
src_install() {
emake DESTDIR="${D}" install || die "Faild to install"
dodoc AUTHORS TODO
dohtml ${PN}.html
newinitd "${FILESDIR}"/openconnect.init.in openconnect
dodir "/etc/openconnect"
insinto "/etc/openconnect"
newconfd "${FILESDIR}"/openconnect.conf.in openconnect
exeinto "/etc/openconnect"
newexe "${DISTDIR}/"openconnect-script openconnect.sh
# Remove useless .la files
find "${D}" -name '*.la' -exec rm -f {} + || die "la file removal failed"
}
|