2 # Copyright (C) 2006-2015 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
9 include $(INCLUDE_DIR
)/kernel.mk
15 PKG_SOURCE_URL
:=https
://github.com
/paulusmack
/ppp
16 PKG_SOURCE_DATE
:=2020-03-21
17 PKG_SOURCE_VERSION
:=41a73232c16e9a063cfe3fad461c94af3f450f6c
18 PKG_MIRROR_HASH
:=cf284c312b0c90974d11f8aeece173bcac8475f5b810911f4feb2c5a4db263fe
19 PKG_MAINTAINER
:=Felix Fietkau
<nbd@nbd.name
>
20 PKG_LICENSE
:=BSD-4-Clause
21 PKG_CPE_ID
:=cpe
:/a
:samba
:ppp
23 PKG_RELEASE_VERSION
:=2.4.8
24 PKG_VERSION
:=$(PKG_RELEASE_VERSION
).git-
$(PKG_SOURCE_DATE
)
26 PKG_BUILD_DEPENDS
:=libpcap
28 PKG_ASLR_PIE_REGULAR
:=1
32 include $(INCLUDE_DIR
)/package.mk
34 define Package
/ppp
/Default
37 URL
:=https
://ppp.samba.org
/
41 $(call Package
/ppp
/Default
)
47 define Package
/ppp-multilink
48 $(call Package
/ppp
/Default
)
50 TITLE
:=PPP daemon
(with multilink support
)
54 define Package
/ppp
/description
55 This package contains the PPP
(Point-to-Point Protocol
) daemon.
58 define Package
/ppp
/conffiles
68 define Package
/ppp-mod-pppoa
69 $(call Package
/ppp
/Default
)
70 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
) +linux-atm
+kmod-pppoa
74 define Package
/ppp-mod-pppoa
/description
75 This package contains a PPPoA
(PPP over ATM
) plugin for ppp.
78 define Package
/ppp-mod-pppoe
79 $(call Package
/ppp
/Default
)
80 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
) +kmod-pppoe
84 define Package
/ppp-mod-pppoe
/description
85 This package contains a PPPoE
(PPP over Ethernet
) plugin for ppp.
88 define Package
/ppp-mod-radius
89 $(call Package
/ppp
/Default
)
90 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
)
94 define Package
/ppp-mod-radius
/description
95 This package contains a RADIUS
(Remote Authentication Dial-In User Service
)
99 define Package
/ppp-mod-radius
/conffiles
104 define Package
/ppp-mod-pppol2tp
105 $(call Package
/ppp
/Default
)
106 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
) +kmod-pppol2tp
107 TITLE
:=PPPoL2TP plugin
110 define Package
/ppp-mod-pppol2tp
/description
111 This package contains a PPPoL2TP
(PPP over L2TP
) plugin for ppp.
114 define Package
/ppp-mod-pptp
115 $(call Package
/ppp
/Default
)
116 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
) +kmod-pptp
+kmod-mppe
+resolveip
120 define Package
/ppp-mod-pptp
/description
121 This package contains a PPtP plugin for ppp.
124 define Package
/ppp-mod-passwordfd
125 $(call Package
/ppp
/Default
)
126 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
)
127 TITLE
:=pap
/chap secret from filedescriptor
130 define Package
/ppp-mod-passwordfd
/description
131 This package allows to pass the PAP
/CHAP secret from a filedescriptor.
132 Eliminates the need for a secrets file.
136 $(call Package
/ppp
/Default
)
137 TITLE
:=Establish conversation with a modem
140 define Package
/chat
/description
141 This package contains an utility to establish conversation with other PPP servers
145 define Package
/pppdump
146 $(call Package
/ppp
/Default
)
147 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
)
148 TITLE
:=Read PPP record file
151 define Package
/pppdump
/description
152 This package contains an utility to read PPP record file.
155 define Package
/pppstats
156 $(call Package
/ppp
/Default
)
157 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
)
158 TITLE
:=Report PPP statistics
161 define Package
/pppstats
/description
162 This package contains an utility to report PPP statistics.
165 define Package
/pppoe-discovery
166 $(call Package
/ppp
/Default
)
167 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
) +ppp-mod-pppoe
168 TITLE
:=Perform a PPPoE-discovery process
171 define Package
/pppoe-discovery
/description
172 This tool performs the same discovery process
as pppoe
, but does
173 not initiate a session. Can be useful to debug pppoe.
177 define Build
/Configure
178 $(call Build
/Configure
/Default
,, \
180 UNAME_R
="$(LINUX_VERSION)" \
183 mkdir
-p
$(PKG_BUILD_DIR
)/pppd
/plugins
/pppoatm
/linux
185 $(LINUX_DIR
)/include/linux
/compiler.h \
186 $(LINUX_DIR
)/include/$(LINUX_UAPI_DIR
)linux
/atm
*.h \
187 $(PKG_BUILD_DIR
)/pppd
/plugins
/pppoatm
/linux
/
189 # Kernel 4.14.9+ only, ignore the exit status of cp in case the file
191 -$(CP
) $(LINUX_DIR
)/include/linux
/compiler_types.h \
192 $(PKG_BUILD_DIR
)/pppd
/plugins
/pppoatm
/linux
/
195 TARGET_CFLAGS
+= -ffunction-sections
-fdata-sections
-flto
196 TARGET_LDFLAGS
+= -Wl
,--gc-sections
-flto
-fuse-linker-plugin
198 MAKE_FLAGS
+= COPTS
="$(TARGET_CFLAGS)" \
199 PRECOMPILED_FILTER
=1 \
200 STAGING_DIR
="$(STAGING_DIR)"
202 ifeq ($(BUILD_VARIANT
),multilink
)
203 MAKE_FLAGS
+= HAVE_MULTILINK
=y
205 MAKE_FLAGS
+= HAVE_MULTILINK
=
208 ifdef CONFIG_USE_MUSL
209 MAKE_FLAGS
+= USE_LIBUTIL
=
212 define Build
/InstallDev
213 $(INSTALL_DIR
) $(1)/usr
/include
214 $(CP
) $(PKG_INSTALL_DIR
)/include/pppd
$(1)/usr
/include/
217 define Package
/ppp
/script_install
220 define Package
/ppp
/install
221 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_RELEASE_VERSION
)
222 $(INSTALL_DIR
) $(1)/usr
/sbin
223 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/sbin
/pppd
$(1)/usr
/sbin
/
224 $(INSTALL_DIR
) $(1)/etc
/ppp
225 $(INSTALL_CONF
) .
/files
/etc
/ppp
/chap-secrets
$(1)/etc
/ppp
/
226 $(INSTALL_DATA
) .
/files
/etc
/ppp
/filter $(1)/etc
/ppp
/
227 $(INSTALL_DATA
) .
/files
/etc
/ppp
/options
$(1)/etc
/ppp
/
228 $(LN
) /tmp
/resolv.conf.ppp
$(1)/etc
/ppp
/resolv.conf
229 $(INSTALL_DIR
) $(1)/lib
/netifd
/proto
230 $(INSTALL_BIN
) .
/files
/ppp.sh
$(1)/lib
/netifd
/proto
/
231 $(INSTALL_BIN
) .
/files
/lib
/netifd
/ppp-up
$(1)/lib
/netifd
/
232 $(INSTALL_BIN
) .
/files
/lib
/netifd
/ppp6-up
$(1)/lib
/netifd
/
233 $(INSTALL_BIN
) .
/files
/lib
/netifd
/ppp-down
$(1)/lib
/netifd
/
235 Package
/ppp-multilink
/install=$(Package
/ppp
/install)
237 define Package
/ppp-mod-pppoa
/install
238 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_RELEASE_VERSION
)
239 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_RELEASE_VERSION
)/pppoatm.so \
240 $(1)/usr
/lib
/pppd
/$(PKG_RELEASE_VERSION
)/
243 define Package
/ppp-mod-pppoe
/install
244 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_RELEASE_VERSION
)
245 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_RELEASE_VERSION
)/rp-pppoe.so \
246 $(1)/usr
/lib
/pppd
/$(PKG_RELEASE_VERSION
)/
249 define Package
/ppp-mod-radius
/install
250 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_RELEASE_VERSION
)
251 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_RELEASE_VERSION
)/radius.so \
252 $(1)/usr
/lib
/pppd
/$(PKG_RELEASE_VERSION
)/
253 $(INSTALL_DIR
) $(1)/etc
/ppp
254 $(INSTALL_DATA
) .
/files
/etc
/ppp
/radius.conf
$(1)/etc
/ppp
/
255 $(INSTALL_DIR
) $(1)/etc
/ppp
/radius
256 $(INSTALL_DATA
) .
/files
/etc
/ppp
/radius
/dictionary
* \
258 $(INSTALL_CONF
) .
/files
/etc
/ppp
/radius
/servers \
262 define Package
/ppp-mod-pppol2tp
/install
263 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_RELEASE_VERSION
)
264 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_RELEASE_VERSION
)/pppol2tp.so \
265 $(1)/usr
/lib
/pppd
/$(PKG_RELEASE_VERSION
)/
268 define Package
/ppp-mod-pptp
/install
269 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_RELEASE_VERSION
)
270 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_RELEASE_VERSION
)/pptp.so \
271 $(1)/usr
/lib
/pppd
/$(PKG_RELEASE_VERSION
)/
272 $(INSTALL_DIR
) $(1)/etc
/ppp
273 $(INSTALL_DATA
) .
/files
/etc
/ppp
/options.pptp
$(1)/etc
/ppp
/
276 define Package
/ppp-mod-passwordfd
/install
277 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_RELEASE_VERSION
)
278 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_RELEASE_VERSION
)/passwordfd.so \
279 $(1)/usr
/lib
/pppd
/$(PKG_RELEASE_VERSION
)/
282 define Package
/chat
/install
283 $(INSTALL_DIR
) $(1)/usr
/sbin
284 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/sbin
/chat
$(1)/usr
/sbin
/
287 define Package
/pppdump
/install
288 $(INSTALL_DIR
) $(1)/usr
/sbin
289 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/sbin
/pppdump
$(1)/usr
/sbin
/
292 define Package
/pppstats
/install
293 $(INSTALL_DIR
) $(1)/usr
/sbin
294 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/sbin
/pppstats
$(1)/usr
/sbin
/
297 define Package
/pppoe-discovery
/install
298 $(INSTALL_DIR
) $(1)/usr
/sbin
299 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/sbin
/pppoe-discovery
$(1)/usr
/sbin
/
302 $(eval
$(call BuildPackage
,ppp
))
303 $(eval
$(call BuildPackage
,ppp-multilink
))
304 $(eval
$(call BuildPackage
,ppp-mod-pppoa
))
305 $(eval
$(call BuildPackage
,ppp-mod-pppoe
))
306 $(eval
$(call BuildPackage
,ppp-mod-radius
))
307 $(eval
$(call BuildPackage
,ppp-mod-pppol2tp
))
308 $(eval
$(call BuildPackage
,ppp-mod-pptp
))
309 $(eval
$(call BuildPackage
,ppp-mod-passwordfd
))
310 $(eval
$(call BuildPackage
,chat
))
311 $(eval
$(call BuildPackage
,pppdump
))
312 $(eval
$(call BuildPackage
,pppstats
))
313 $(eval
$(call BuildPackage
,pppoe-discovery
))