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
:=2021-01-04
17 PKG_SOURCE_VERSION
:=4fb319056f168bb8379865b91b4fd3e1ada73f1e
18 PKG_MIRROR_HASH
:=a6a31f71e46c7170b94e53723515f7d6f8ec512a84aa3003f20d393d8bd97347
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.9
24 PKG_VERSION
:=$(PKG_RELEASE_VERSION
)_git
$(subst -,,$(PKG_SOURCE_DATE
))
26 PKG_BUILD_DEPENDS
:=libpcap
28 PKG_ASLR_PIE_REGULAR
:=1
29 PKG_BUILD_FLAGS
:=gc-sections lto
33 include $(INCLUDE_DIR
)/package.mk
35 define Package
/ppp
/Default
38 URL
:=https
://ppp.samba.org
/
42 $(call Package
/ppp
/Default
)
48 define Package
/ppp-multilink
49 $(call Package
/ppp
/Default
)
51 TITLE
:=PPP daemon
(with multilink support
)
55 define Package
/ppp
/description
56 This package contains the PPP
(Point-to-Point Protocol
) daemon.
59 define Package
/ppp
/conffiles
69 define Package
/ppp-mod-pppoa
70 $(call Package
/ppp
/Default
)
71 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
) +linux-atm
+kmod-pppoa
75 define Package
/ppp-mod-pppoa
/description
76 This package contains a PPPoA
(PPP over ATM
) plugin for ppp.
79 define Package
/ppp-mod-pppoe
80 $(call Package
/ppp
/Default
)
81 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
) +kmod-pppoe
85 define Package
/ppp-mod-pppoe
/description
86 This package contains a PPPoE
(PPP over Ethernet
) plugin for ppp.
89 define Package
/ppp-mod-radius
90 $(call Package
/ppp
/Default
)
91 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
)
95 define Package
/ppp-mod-radius
/description
96 This package contains a RADIUS
(Remote Authentication Dial-In User Service
)
100 define Package
/ppp-mod-radius
/conffiles
105 define Package
/ppp-mod-pppol2tp
106 $(call Package
/ppp
/Default
)
107 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
) +kmod-pppol2tp
108 TITLE
:=PPPoL2TP plugin
111 define Package
/ppp-mod-pppol2tp
/description
112 This package contains a PPPoL2TP
(PPP over L2TP
) plugin for ppp.
115 define Package
/ppp-mod-pptp
116 $(call Package
/ppp
/Default
)
117 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
) +kmod-pptp
+kmod-mppe
+resolveip
121 define Package
/ppp-mod-pptp
/description
122 This package contains a PPtP plugin for ppp.
125 define Package
/ppp-mod-passwordfd
126 $(call Package
/ppp
/Default
)
127 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
)
128 TITLE
:=pap
/chap secret from filedescriptor
131 define Package
/ppp-mod-passwordfd
/description
132 This package allows to pass the PAP
/CHAP secret from a filedescriptor.
133 Eliminates the need for a secrets file.
137 $(call Package
/ppp
/Default
)
138 TITLE
:=Establish conversation with a modem
141 define Package
/chat
/description
142 This package contains an utility to establish conversation with other PPP servers
146 define Package
/pppdump
147 $(call Package
/ppp
/Default
)
148 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
)
149 TITLE
:=Read PPP record file
152 define Package
/pppdump
/description
153 This package contains an utility to read PPP record file.
156 define Package
/pppstats
157 $(call Package
/ppp
/Default
)
158 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
)
159 TITLE
:=Report PPP statistics
162 define Package
/pppstats
/description
163 This package contains an utility to report PPP statistics.
166 define Package
/pppoe-discovery
167 $(call Package
/ppp
/Default
)
168 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
) +ppp-mod-pppoe
169 TITLE
:=Perform a PPPoE-discovery process
172 define Package
/pppoe-discovery
/description
173 This tool performs the same discovery process
as pppoe
, but does
174 not initiate a session. Can be useful to debug pppoe.
178 define Build
/Configure
179 $(call Build
/Configure
/Default
,, \
181 UNAME_R
="$(LINUX_VERSION)" \
184 mkdir
-p
$(PKG_BUILD_DIR
)/pppd
/plugins
/pppoatm
/linux
186 $(LINUX_DIR
)/include/linux
/compiler.h \
187 $(LINUX_DIR
)/include/$(LINUX_UAPI_DIR
)linux
/atm
*.h \
188 $(PKG_BUILD_DIR
)/pppd
/plugins
/pppoatm
/linux
/
190 # Kernel 4.14.9+ only, ignore the exit status of cp in case the file
192 -$(CP
) $(LINUX_DIR
)/include/linux
/compiler_types.h \
193 $(PKG_BUILD_DIR
)/pppd
/plugins
/pppoatm
/linux
/
196 MAKE_FLAGS
+= COPTS
="$(TARGET_CFLAGS)" \
197 PRECOMPILED_FILTER
=1 \
198 STAGING_DIR
="$(STAGING_DIR)"
200 ifeq ($(BUILD_VARIANT
),multilink
)
201 MAKE_FLAGS
+= HAVE_MULTILINK
=y
203 MAKE_FLAGS
+= HAVE_MULTILINK
=
206 ifdef CONFIG_USE_MUSL
207 MAKE_FLAGS
+= USE_LIBUTIL
=
210 define Build
/InstallDev
211 $(INSTALL_DIR
) $(1)/usr
/include
212 $(CP
) $(PKG_INSTALL_DIR
)/include/pppd
$(1)/usr
/include/
215 define Package
/ppp
/script_install
218 define Package
/ppp
/install
219 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_RELEASE_VERSION
)
220 $(INSTALL_DIR
) $(1)/usr
/sbin
221 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/sbin
/pppd
$(1)/usr
/sbin
/
222 $(INSTALL_DIR
) $(1)/etc
/ppp
223 $(INSTALL_CONF
) .
/files
/etc
/ppp
/chap-secrets
$(1)/etc
/ppp
/
224 $(INSTALL_DATA
) .
/files
/etc
/ppp
/filter $(1)/etc
/ppp
/
225 $(INSTALL_DATA
) .
/files
/etc
/ppp
/options
$(1)/etc
/ppp
/
226 $(LN
) /tmp
/resolv.conf.ppp
$(1)/etc
/ppp
/resolv.conf
227 $(INSTALL_DIR
) $(1)/lib
/netifd
/proto
228 $(INSTALL_BIN
) .
/files
/ppp.sh
$(1)/lib
/netifd
/proto
/
229 $(INSTALL_BIN
) .
/files
/lib
/netifd
/ppp-up
$(1)/lib
/netifd
/
230 $(INSTALL_BIN
) .
/files
/lib
/netifd
/ppp6-up
$(1)/lib
/netifd
/
231 $(INSTALL_BIN
) .
/files
/lib
/netifd
/ppp-down
$(1)/lib
/netifd
/
233 Package
/ppp-multilink
/install=$(Package
/ppp
/install)
235 define Package
/ppp-mod-pppoa
/install
236 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_RELEASE_VERSION
)
237 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_RELEASE_VERSION
)/pppoatm.so \
238 $(1)/usr
/lib
/pppd
/$(PKG_RELEASE_VERSION
)/
241 define Package
/ppp-mod-pppoe
/install
242 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_RELEASE_VERSION
)
243 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_RELEASE_VERSION
)/pppoe.so \
244 $(1)/usr
/lib
/pppd
/$(PKG_RELEASE_VERSION
)/
247 define Package
/ppp-mod-radius
/install
248 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_RELEASE_VERSION
)
249 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_RELEASE_VERSION
)/radius.so \
250 $(1)/usr
/lib
/pppd
/$(PKG_RELEASE_VERSION
)/
251 $(INSTALL_DIR
) $(1)/etc
/ppp
252 $(INSTALL_DATA
) .
/files
/etc
/ppp
/radius.conf
$(1)/etc
/ppp
/
253 $(INSTALL_DIR
) $(1)/etc
/ppp
/radius
254 $(INSTALL_DATA
) .
/files
/etc
/ppp
/radius
/dictionary
* \
256 $(INSTALL_CONF
) .
/files
/etc
/ppp
/radius
/servers \
260 define Package
/ppp-mod-pppol2tp
/install
261 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_RELEASE_VERSION
)
262 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_RELEASE_VERSION
)/pppol2tp.so \
263 $(1)/usr
/lib
/pppd
/$(PKG_RELEASE_VERSION
)/
266 define Package
/ppp-mod-pptp
/install
267 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_RELEASE_VERSION
)
268 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_RELEASE_VERSION
)/pptp.so \
269 $(1)/usr
/lib
/pppd
/$(PKG_RELEASE_VERSION
)/
270 $(INSTALL_DIR
) $(1)/etc
/ppp
271 $(INSTALL_DATA
) .
/files
/etc
/ppp
/options.pptp
$(1)/etc
/ppp
/
274 define Package
/ppp-mod-passwordfd
/install
275 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_RELEASE_VERSION
)
276 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_RELEASE_VERSION
)/passwordfd.so \
277 $(1)/usr
/lib
/pppd
/$(PKG_RELEASE_VERSION
)/
280 define Package
/chat
/install
281 $(INSTALL_DIR
) $(1)/usr
/sbin
282 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/sbin
/chat
$(1)/usr
/sbin
/
285 define Package
/pppdump
/install
286 $(INSTALL_DIR
) $(1)/usr
/sbin
287 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/sbin
/pppdump
$(1)/usr
/sbin
/
290 define Package
/pppstats
/install
291 $(INSTALL_DIR
) $(1)/usr
/sbin
292 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/sbin
/pppstats
$(1)/usr
/sbin
/
295 define Package
/pppoe-discovery
/install
296 $(INSTALL_DIR
) $(1)/usr
/sbin
297 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/sbin
/pppoe-discovery
$(1)/usr
/sbin
/
300 $(eval
$(call BuildPackage
,ppp
))
301 $(eval
$(call BuildPackage
,ppp-multilink
))
302 $(eval
$(call BuildPackage
,ppp-mod-pppoa
))
303 $(eval
$(call BuildPackage
,ppp-mod-pppoe
))
304 $(eval
$(call BuildPackage
,ppp-mod-radius
))
305 $(eval
$(call BuildPackage
,ppp-mod-pppol2tp
))
306 $(eval
$(call BuildPackage
,ppp-mod-pptp
))
307 $(eval
$(call BuildPackage
,ppp-mod-passwordfd
))
308 $(eval
$(call BuildPackage
,chat
))
309 $(eval
$(call BuildPackage
,pppdump
))
310 $(eval
$(call BuildPackage
,pppstats
))
311 $(eval
$(call BuildPackage
,pppoe-discovery
))