blob: 1bbb0cb310224fe6a2926f84d5b18866abb788aa (
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
|
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-dialup/l2tpd/l2tpd-0.69-r1.ebuild,v 1.3 2004/04/27 21:38:37 agriffis Exp $
inherit eutils
DESCRIPTION="Layer 2 Tunnelling Protocol Daemon"
HOMEPAGE="http://www.l2tpd.org/"
MY_P="freeswan-l2tp-8jdl"
SRC_URI="http://www.jacco2.dds.nl/networking/tarballs/${MY_P}.tgz"
DEPEND="virtual/glibc
>=sys-apps/sed-4"
LICENSE="GPL-2"
KEYWORDS="x86"
SLOT="0"
IUSE=""
S="${WORKDIR}/${MY_P}/${P}"
src_unpack() {
unpack ${MY_P}.tgz || die
cd ${MY_P} || die
tar xzf ${P}.tar.gz || die
cd ${S} || die
epatch ../${PN}-pty.patch2.bz2
epatch ../${PN}-pty-noecho.patch.bz2
epatch ../${PN}-close.patch.bz2
epatch ../${PN}-cfgpath.patch.bz2
epatch ../${PN}-warnings.patch.bz2
epatch ../${PN}-listenaddr.patch.bz2
epatch ../${PN}-MSL2TP-hostname.patch.bz2
sed -i.orig -e "s|-g -O2|${CFLAGS}|" Makefile
#-e "s|^#\(OSFLAGS+= -DUSE_KERNEL\)|\1|" \
#^wants an #include <linux/l2tp>
# gentoo file paths
sed -i.orig \
-e 's|\(#define DEFAULT_AUTH_FILE \).*|\1"/etc/l2tpd/l2tp-secrets"|' \
-e 's|\(#define DEFAULT_CONFIG_FILE \).*|\1"/etc/l2tpd/l2tpd.conf"|' \
-e 's|\(#define DEFAULT_PID_FILE \).*|\1"/var/run/l2tpd.pid"|' \
file.h
}
src_compile() {
emake || die
}
src_install() {
dosbin l2tpd
doman doc/*.[85]
dodoc BUGS CHANGELOG LICENSE CREDITS README TODO \
doc/rfc2661.txt doc/*.sample
cd ..
insinto /etc/l2tpd
newins l2tpd-chapsecrets.sample l2tp-secrets
doins l2tpd.conf
insinto /etc/ppp
newins l2tpd-options.l2tpd options-l2tp
insinto /etc/ipsec
doins l2tpd-L2TP-CERT-orgWIN2KXP.conf
doins l2tpd-L2TP-CERT.conf
doins l2tpd-L2TP-PSK-orgWIN2KXP.conf
doins l2tpd-L2TP-PSK.conf
exeinto /etc/init.d
newexe ${FILESDIR}/l2tpd-init l2tpd
}
|