1 |
commit: eb4b908e3eff0b49141b5b9f0aa66f36b5d53c08 |
2 |
Author: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Nov 26 21:34:47 2011 +0000 |
4 |
Commit: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Nov 26 21:34:47 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/betagarden.git;a=commit;h=eb4b908e |
7 |
|
8 |
[net-dialup] Import from alexxy overlay |
9 |
|
10 |
(Portage version: 2.2.0_alpha78/git/Linux x86_64, signed Manifest commit with key F82F92E6) |
11 |
|
12 |
--- |
13 |
net-dialup/accel-pptp/accel-pptp-0.8.5.ebuild | 95 +++++++++++++++++++++++++ |
14 |
net-dialup/accel-pptp/files/README.gentoo | 13 ++++ |
15 |
net-dialup/accel-pptp/files/options.pptp | 32 ++++++++ |
16 |
net-dialup/accel-pptp/files/pptpd-confd | 5 ++ |
17 |
net-dialup/accel-pptp/files/pptpd-init | 24 ++++++ |
18 |
net-dialup/accel-pptp/metadata.xml | 8 ++ |
19 |
6 files changed, 177 insertions(+), 0 deletions(-) |
20 |
|
21 |
diff --git a/net-dialup/accel-pptp/accel-pptp-0.8.5.ebuild b/net-dialup/accel-pptp/accel-pptp-0.8.5.ebuild |
22 |
new file mode 100644 |
23 |
index 0000000..cfdee69 |
24 |
--- /dev/null |
25 |
+++ b/net-dialup/accel-pptp/accel-pptp-0.8.5.ebuild |
26 |
@@ -0,0 +1,95 @@ |
27 |
+# Copyright 1999-2011 Gentoo Foundation |
28 |
+# Distributed under the terms of the GNU General Public License v2 |
29 |
+# $Header: $ |
30 |
+ |
31 |
+EAPI="4" |
32 |
+ |
33 |
+inherit linux-mod eutils autotools multilib |
34 |
+ |
35 |
+DESCRIPTION="Point-to-Point Tunnelling Protocol Client/Server for Linux" |
36 |
+SRC_URI="mirror://sourceforge/accel-pptp/${P}.tar.bz2" |
37 |
+HOMEPAGE="http://accel-pptp.sourceforge.net/" |
38 |
+ |
39 |
+SLOT="0" |
40 |
+LICENSE="GPL-2" |
41 |
+KEYWORDS="~amd64 ~x86" |
42 |
+IUSE="tcpd server" |
43 |
+ |
44 |
+COMMON_DEPEND=">=net-dialup/ppp-2.4.2 |
45 |
+ server? ( !net-dialup/pptpd ) |
46 |
+ tcpd? ( sys-apps/tcp-wrappers )" |
47 |
+DEPEND="${COMMON_DEPEND} |
48 |
+ virtual/linux-sources" |
49 |
+RDEPEND="${COMMON_DEPEND}" |
50 |
+ |
51 |
+BUILD_TARGETS="all" |
52 |
+BUILD_PARAMS="KDIR=${KERNEL_DIR}" |
53 |
+CONFIG_CHECK="PPP PPPOE PPTP" |
54 |
+MODULESD_PPTP_ALIASES=("net-pf-24 pptp") |
55 |
+ |
56 |
+src_prepare() { |
57 |
+ use server && cd "${S}/pptpd-1.3.3" && eautoreconf |
58 |
+ cd "${S}/pppd_plugin" && eautoreconf |
59 |
+ |
60 |
+ #Match pptpd-logwtmp.so's version with pppd's version (#89895) |
61 |
+ local PPPD_VER=$(best_version net-dialup/ppp) |
62 |
+ PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR} |
63 |
+ PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision |
64 |
+ echo "#define VERSION \"${PPPD_VER}\"" > "${S}/pptpd-1.3.3/plugins/patchlevel.h" |
65 |
+ # Respect LDFLAGS |
66 |
+ sed -e "/^LDFLAGS/{s:=:+=:}" -i "${S}/pptpd-1.3.3/plugins/Makefile" |
67 |
+} |
68 |
+ |
69 |
+src_configure() { |
70 |
+ if use server; then |
71 |
+ cd "${S}/pptpd-1.3.3" |
72 |
+ # Define KDIR to build against userspace headers... |
73 |
+ KDIR='/usr' \ |
74 |
+ econf --enable-bcrelay \ |
75 |
+ $(use_with tcpd libwrap) |
76 |
+ fi |
77 |
+ |
78 |
+ cd "${S}/pppd_plugin" |
79 |
+ KDIR='/usr' econf |
80 |
+} |
81 |
+ |
82 |
+src_compile() { |
83 |
+ if use server; then |
84 |
+ cd "${S}/pptpd-1.3.3" |
85 |
+ emake COPTS="${CFLAGS}" || die "make failed" |
86 |
+ fi |
87 |
+ |
88 |
+ cd "${S}/pppd_plugin" |
89 |
+ emake COPTS="${CFLAGS}" || die "make failed" |
90 |
+} |
91 |
+ |
92 |
+src_install () { |
93 |
+ if use server; then |
94 |
+ cd "${S}/pptpd-1.3.3" |
95 |
+ einstall || die "make install failed" |
96 |
+ |
97 |
+ insinto /etc |
98 |
+ doins samples/pptpd.conf |
99 |
+ |
100 |
+ insinto /etc/ppp |
101 |
+ doins samples/options.pptpd |
102 |
+ |
103 |
+ exeinto /etc/init.d |
104 |
+ newexe "${FILESDIR}/pptpd-init" pptpd || die |
105 |
+ |
106 |
+ insinto /etc/conf.d |
107 |
+ newins "${FILESDIR}/pptpd-confd" pptpd || die |
108 |
+ fi |
109 |
+ |
110 |
+ cd "${S}/pppd_plugin/src/.libs" |
111 |
+ local PPPD_VER=$(best_version net-dialup/ppp) |
112 |
+ PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR} |
113 |
+ PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision |
114 |
+ insinto /usr/$(get_libdir)/pppd/${PPPD_VER} |
115 |
+ newins pptp.so.0.0.0 pptp.so || die |
116 |
+ doman "${S}"/pppd_plugin/src/pppd-pptp.8 || die |
117 |
+ |
118 |
+ cd "${S}" |
119 |
+ dodoc README || die |
120 |
+ cp -R example "${D}/usr/share/doc/${P}/example" |
121 |
+} |
122 |
|
123 |
diff --git a/net-dialup/accel-pptp/files/README.gentoo b/net-dialup/accel-pptp/files/README.gentoo |
124 |
new file mode 100644 |
125 |
index 0000000..68d6af2 |
126 |
--- /dev/null |
127 |
+++ b/net-dialup/accel-pptp/files/README.gentoo |
128 |
@@ -0,0 +1,13 @@ |
129 |
+link_ppp17="/dev/null" |
130 |
+username_ppp17='pva0xd' |
131 |
+password_ppp17='3149068110' |
132 |
+pppd_ppp17=" |
133 |
+plugin pptp.so |
134 |
+pptp_server 78.31.23.148 |
135 |
+file /etc/ppp/options.pptp |
136 |
+mtu 1436 |
137 |
+mru 1436 |
138 |
+lcp-echo-interval 20 |
139 |
+lcp-echo-failure 3 |
140 |
+" |
141 |
+ |
142 |
|
143 |
diff --git a/net-dialup/accel-pptp/files/options.pptp b/net-dialup/accel-pptp/files/options.pptp |
144 |
new file mode 100644 |
145 |
index 0000000..d61ab80 |
146 |
--- /dev/null |
147 |
+++ b/net-dialup/accel-pptp/files/options.pptp |
148 |
@@ -0,0 +1,32 @@ |
149 |
+# |
150 |
+# Lock the port |
151 |
+# |
152 |
+#lock |
153 |
+ |
154 |
+# |
155 |
+# We don't need the tunnel server to authenticate itself |
156 |
+# |
157 |
+noauth |
158 |
+ |
159 |
+# |
160 |
+# Turn off transmission protocols we know won't be used |
161 |
+# |
162 |
+nobsdcomp |
163 |
+nodeflate |
164 |
+ |
165 |
+# |
166 |
+# We want MPPE |
167 |
+# |
168 |
+require-mppe |
169 |
+ |
170 |
+# |
171 |
+# We want a sane mtu/mru |
172 |
+# |
173 |
+mtu 1437 |
174 |
+mru 1437 |
175 |
+ |
176 |
+# |
177 |
+# Time this thing out of it goes poof |
178 |
+# |
179 |
+lcp-echo-failure 10 |
180 |
+lcp-echo-interval 10 |
181 |
|
182 |
diff --git a/net-dialup/accel-pptp/files/pptpd-confd b/net-dialup/accel-pptp/files/pptpd-confd |
183 |
new file mode 100644 |
184 |
index 0000000..1169e57 |
185 |
--- /dev/null |
186 |
+++ b/net-dialup/accel-pptp/files/pptpd-confd |
187 |
@@ -0,0 +1,5 @@ |
188 |
+# Config file for /etc/init.d/pptpd |
189 |
+ |
190 |
+# Any extra options you want to pass to pptpd |
191 |
+# on start-up should be put here. |
192 |
+PPTPD_OPTS="" |
193 |
|
194 |
diff --git a/net-dialup/accel-pptp/files/pptpd-init b/net-dialup/accel-pptp/files/pptpd-init |
195 |
new file mode 100644 |
196 |
index 0000000..171e113 |
197 |
--- /dev/null |
198 |
+++ b/net-dialup/accel-pptp/files/pptpd-init |
199 |
@@ -0,0 +1,24 @@ |
200 |
+#!/sbin/runscript |
201 |
+# Copyright 1999-2009 Gentoo Foundation |
202 |
+# Distributed under the terms of the GNU General Public License, v2 or later |
203 |
+# $Header: $ |
204 |
+ |
205 |
+depend() { |
206 |
+ need net |
207 |
+} |
208 |
+ |
209 |
+start() { |
210 |
+ ebegin "Starting pptpd" |
211 |
+ modprobe pptp |
212 |
+ start-stop-daemon --start --quiet --exec /usr/sbin/pptpd -- ${PPTPD_OPTS} |
213 |
+ eend $? |
214 |
+} |
215 |
+ |
216 |
+stop() { |
217 |
+ ebegin "Stopping pptpd" |
218 |
+ start-stop-daemon --stop --quiet --pidfile /var/run/pptpd.pid |
219 |
+ result=$? |
220 |
+ start-stop-daemon --stop --quiet --oknodo --exec /usr/sbin/pptpctrl |
221 |
+ result=$(( $result + $? )) |
222 |
+ eend $result |
223 |
+} |
224 |
|
225 |
diff --git a/net-dialup/accel-pptp/metadata.xml b/net-dialup/accel-pptp/metadata.xml |
226 |
new file mode 100644 |
227 |
index 0000000..009a9d9 |
228 |
--- /dev/null |
229 |
+++ b/net-dialup/accel-pptp/metadata.xml |
230 |
@@ -0,0 +1,8 @@ |
231 |
+<?xml version="1.0" encoding="UTF-8"?> |
232 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
233 |
+<pkgmetadata> |
234 |
+ <herd>net-dialup</herd> |
235 |
+ <use> |
236 |
+ <flag name='server'>Enable pptpd</flag> |
237 |
+ </use> |
238 |
+</pkgmetadata> |