1 |
commit: 583870dcd2fb795e6fafb83f47a9bc5e96f175ea |
2 |
Author: Andrew Savchenko <bircoph <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Aug 23 02:26:07 2018 +0000 |
4 |
Commit: Andrew Savchenko <bircoph <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Aug 23 02:29:31 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=583870dc |
7 |
|
8 |
net-dialup/openl2tp: configure openl2tpd correctly |
9 |
|
10 |
- Pass configuration data properly to the emake. |
11 |
- Update to EAPI 7. |
12 |
|
13 |
Thanks Jako Kroon [jaco uls.co.za] for noticing the problem. |
14 |
|
15 |
Closes: https://bugs.gentoo.org/664266 |
16 |
Signed-off-by: Andrew Savchenko <bircoph <AT> gentoo.org> |
17 |
Package-Manager: Portage-2.3.48, Repoman-2.3.10 |
18 |
|
19 |
net-dialup/openl2tp/openl2tp-1.8-r1.ebuild | 126 +++++++++++++++++++++++++++++ |
20 |
1 file changed, 126 insertions(+) |
21 |
|
22 |
diff --git a/net-dialup/openl2tp/openl2tp-1.8-r1.ebuild b/net-dialup/openl2tp/openl2tp-1.8-r1.ebuild |
23 |
new file mode 100644 |
24 |
index 00000000000..fb5611675f4 |
25 |
--- /dev/null |
26 |
+++ b/net-dialup/openl2tp/openl2tp-1.8-r1.ebuild |
27 |
@@ -0,0 +1,126 @@ |
28 |
+# Copyright 1999-2018 Gentoo Foundation |
29 |
+# Distributed under the terms of the GNU General Public License v2 |
30 |
+ |
31 |
+EAPI=7 |
32 |
+ |
33 |
+inherit linux-info |
34 |
+ |
35 |
+DESCRIPTION="Userspace tools for kernel L2TP implementation" |
36 |
+HOMEPAGE="http://www.openl2tp.org/" |
37 |
+SRC_URI="mirror://sourceforge/openl2tp/${P}.tar.gz" |
38 |
+ |
39 |
+LICENSE="GPL-2" |
40 |
+SLOT="0" |
41 |
+KEYWORDS="~amd64 ~x86" |
42 |
+IUSE="+client debug dmalloc doc +examples rpc server stats" |
43 |
+ |
44 |
+REQUIRED_USE="|| ( client server )" |
45 |
+ |
46 |
+BDEPEND=" |
47 |
+ >=net-libs/rpcsvc-proto-1.3.1-r1 |
48 |
+ sys-devel/bison |
49 |
+ sys-devel/flex |
50 |
+" |
51 |
+DEPEND=" |
52 |
+ >=net-dialup/ppp-2.4.5 |
53 |
+ >=net-libs/libtirpc-1.0.3 |
54 |
+ sys-libs/readline:= |
55 |
+ dmalloc? ( dev-libs/dmalloc ) |
56 |
+" |
57 |
+RDEPEND="${DEPEND} |
58 |
+ rpc? ( net-nds/rpcbind ) |
59 |
+" |
60 |
+ |
61 |
+CONFIG_CHECK="~PPPOL2TP" |
62 |
+ |
63 |
+PATCHES=( |
64 |
+ "${FILESDIR}/${P}-werror.patch" |
65 |
+ "${FILESDIR}/${P}-ldflags.patch" |
66 |
+ "${FILESDIR}/${P}-pppd-2.patch" |
67 |
+ "${FILESDIR}/${P}-man.patch" |
68 |
+ "${FILESDIR}/${P}-l2tpconfig.patch" |
69 |
+ "${FILESDIR}/${P}-parallelbuild.patch" |
70 |
+ "${FILESDIR}/${P}-optionsfile.patch" |
71 |
+ "${FILESDIR}/${P}-clientip_as_ipparam.patch" |
72 |
+ "${FILESDIR}/${P}-setkey.patch" |
73 |
+ "${FILESDIR}/${P}-unused-var.patch" |
74 |
+ "${FILESDIR}/${P}-configure-Makefile.patch" |
75 |
+ "${FILESDIR}/${P}-cflags.patch" |
76 |
+ "${FILESDIR}/${P}-tirpc.patch" |
77 |
+) |
78 |
+ |
79 |
+src_prepare() { |
80 |
+ default |
81 |
+ sed -i 's/CFLAGS.optimize/CFLAGS_optimize/g' Makefile */Makefile || die "Makefile sed failed" |
82 |
+} |
83 |
+ |
84 |
+src_configure() { |
85 |
+ myconf= |
86 |
+ |
87 |
+ use client || myconf+=" L2TP_FEATURE_LAC_SUPPORT=n |
88 |
+ L2TP_FEATURE_LAIC_SUPPORT=n |
89 |
+ L2TP_FEATURE_LAOC_SUPPORT=n " |
90 |
+ |
91 |
+ use server || myconf+=" L2TP_FEATURE_LNS_SUPPORT=n |
92 |
+ L2TP_FEATURE_LNIC_SUPPORT=n |
93 |
+ L2TP_FEATURE_LNOC_SUPPORT=n " |
94 |
+ |
95 |
+ use rpc || myconf+=" L2TP_FEATURE_RPC_MANAGEMENT=n " |
96 |
+ |
97 |
+ use stats && myconf+=" L2TP_FEATURE_LOCAL_STAT_FILE=y " |
98 |
+ use debug && myconf+=" L2TP_DEBUG=y " |
99 |
+ use dmalloc && myconf+=" USE_DMALLOC=y " |
100 |
+ |
101 |
+ echo ${myconf} > "${T}/myconf" |
102 |
+} |
103 |
+ |
104 |
+src_compile() { |
105 |
+ emake $(cat "${T}/myconf") |
106 |
+} |
107 |
+ |
108 |
+src_install() { |
109 |
+ emake $(cat "${T}/myconf") DESTDIR="${D}" install |
110 |
+ |
111 |
+ if use examples; then |
112 |
+ docinto event_socket |
113 |
+ dodoc doc/{event_sock_example.c,README.event_sock} |
114 |
+ docinto |
115 |
+ dodoc -r "${FILESDIR}"/examples |
116 |
+ fi |
117 |
+ |
118 |
+ if use doc; then |
119 |
+ dodoc doc/*.txt |
120 |
+ newdoc plugins/README README.plugins |
121 |
+ dodoc -r ipsec |
122 |
+ fi |
123 |
+ |
124 |
+ newinitd "${FILESDIR}"/openl2tpd.initd openl2tpd |
125 |
+ # init.d script is quite different for RPC and non-RPC versions. |
126 |
+ use rpc || sed -i s/userpc=\"yes\"/userpc=\"no\"/ "${D}/etc/init.d/openl2tpd" || die "sed failed" |
127 |
+ newconfd "${FILESDIR}"/openl2tpd.confd openl2tpd |
128 |
+} |
129 |
+ |
130 |
+pkg_postinst() { |
131 |
+ if use rpc; then |
132 |
+ ewarn |
133 |
+ ewarn "RPC control does not provide any auth checks for control connection." |
134 |
+ ewarn "Unless you need this you should disable it, for reference:" |
135 |
+ ewarn "http://forums.openl2tp.org/viewtopic.php?f=4&t=41" |
136 |
+ ewarn |
137 |
+ ewarn "Therefore DO NOT USE RPC IN INSECURE ENVIRONMENTS!" |
138 |
+ else |
139 |
+ ewarn |
140 |
+ ewarn "Without RPC support you won't be able to use l2tpconfig." |
141 |
+ ewarn "Please read http://forums.openl2tp.org/viewtopic.php?f=4&t=41" |
142 |
+ ewarn "for more information about the security risk before enabling." |
143 |
+ ewarn |
144 |
+ ewarn "If you are using numerical strings (e.g. login name containing only" |
145 |
+ ewarn "digits) or special characters in password, please use double quotes" |
146 |
+ ewarn "to enclose them." |
147 |
+ fi |
148 |
+ if use stats; then |
149 |
+ ewarn |
150 |
+ ewarn "To enable status files openl2tpd must be started with -S option." |
151 |
+ ewarn "Upstream warns about runtime overhead with status files enabled." |
152 |
+ fi |
153 |
+} |