blob: 84f98388eeee9e29bc6a039a7766edf78f140318 (
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
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
|
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/cisco-vpnclient-3des/cisco-vpnclient-3des-4.6.02.0030.ebuild,v 1.13 2007/04/28 16:51:49 swegener Exp $
inherit eutils linux-mod
MY_PV=${PV}-k9
DESCRIPTION="Cisco VPN Client (3DES)"
HOMEPAGE="http://cco.cisco.com/en/US/products/sw/secursw/ps2308/index.html"
SRC_URI="vpnclient-linux-${MY_PV}.tar.gz"
LICENSE="cisco-vpn-client"
SLOT="0"
KEYWORDS="-* x86"
IUSE=""
RESTRICT="fetch strip" # stricter"
QA_TEXTRELS="opt/cisco-vpnclient/lib/libvpnapi.so"
QA_EXECSTACK="opt/cisco-vpnclient/lib/libvpnapi.so
opt/cisco-vpnclient/bin/vpnclient
opt/cisco-vpnclient/bin/cvpnd
opt/cisco-vpnclient/bin/cisco_cert_mgr
opt/cisco-vpnclient/bin/ipseclog"
S=${WORKDIR}/vpnclient
VPNDIR="/etc/opt/cisco-vpnclient/"
pkg_nofetch() {
einfo "Please visit:"
einfo " ${HOMEPAGE}"
einfo "and download ${A} to ${DISTDIR}"
}
src_unpack() {
unpack ${A}
cd ${S}
# Patch to allow use of alternate CC. Patch submitted to bug #33488 by
# Jesse Becker <jbecker@speakeasy.net>
epatch ${FILESDIR}/driver_build_CC.patch
# Patch submitted to bug #69870 by James Ward <jennyandjamesward@yahoo.com>
# fixed to work on 4.6.02.0030 <sfs@steflo.dk>
epatch ${FILESDIR}/${PV}-supported_device.patch
#Fix problems with the linux >=2.6.14 kernel.
if kernel_is 2 6 && [[ ${KV_PATCH} -ge 14 ]]
then
epatch ${FILESDIR}/${PV}-2.6.14.patch
fi
}
src_compile () {
unset ARCH
sh ./driver_build.sh ${KV_DIR}
[ ! -f ./cisco_ipsec -a ! -f ./cisco_ipsec.ko ] \
&& die "Failed to make module 'cisco_ipsec'"
sed -i "s#@VPNBINDIR@#/usr/bin#" vpnclient_init
sed -i "s#@VPNBINDIR@#/usr/bin#" vpnclient.ini
}
src_install() {
newinitd ${FILESDIR}/vpnclient.rc vpnclient
exeinto /opt/cisco-vpnclient/bin
exeopts -m0711
doexe vpnclient
exeopts -m4711
doexe cvpnd
into /opt/cisco-vpnclient/
dobin ipseclog cisco_cert_mgr
dolib.so libvpnapi.so
insinto /opt/cisco-vpnclient/include
doins vpnapi.h
dodir /usr/bin
dosym /opt/cisco-vpnclient/bin/vpnclient /usr/bin/vpnclient
insinto /lib/modules/${KV}/CiscoVPN
if kernel_is 2 6; then
doins cisco_ipsec.ko
else
doins cisco_ipsec
fi
insinto ${VPNDIR}
doins vpnclient.ini
insinto ${VPNDIR}/Profiles
doins *.pcf
dodir ${VPNDIR}/Certificates
}
pkg_postinst() {
linux-mod_pkg_postinst
einfo "You must run \`/etc/init.d/vpnclient start\` before using the client."
echo
ewarn "Configuration directory has moved to ${VPNDIR}!"
echo
ewarn "If you are experiencing problems keeping a connection alive, please"
ewarn "check bug #90693 for more information about disabling rp_filter."
echo
}
|