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_VERSION
:=78cd384ce0f48bb5edb84e4fe9a574eab4a4ad14
17 PKG_MIRROR_HASH
:=cf284c312b0c90974d11f8aeece173bcac8475f5b810911f4feb2c5a4db263fe
18 PKG_MAINTAINER
:=Felix Fietkau
<nbd@nbd.name
>
19 PKG_LICENSE
:=BSD-4-Clause
20 PKG_CPE_ID
:=cpe
:/a
:samba
:ppp
22 PKG_RELEASE_VERSION
:=2.4.8
23 PKG_VERSION
:=$(PKG_RELEASE_VERSION
)
25 PKG_BUILD_DEPENDS
:=libpcap
27 PKG_ASLR_PIE_REGULAR
:=1
31 include $(INCLUDE_DIR
)/package.mk
33 define Package
/ppp
/Default
36 URL
:=https
://ppp.samba.org
/
40 $(call Package
/ppp
/Default
)
46 define Package
/ppp-multilink
47 $(call Package
/ppp
/Default
)
49 TITLE
:=PPP daemon
(with multilink support
)
53 define Package
/ppp
/description
54 This package contains the PPP
(Point-to-Point Protocol
) daemon.
57 define Package
/ppp
/conffiles
67 define Package
/ppp-mod-pppoa
68 $(call Package
/ppp
/Default
)
69 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
) +linux-atm
+kmod-pppoa
73 define Package
/ppp-mod-pppoa
/description
74 This package contains a PPPoA
(PPP over ATM
) plugin for ppp.
77 define Package
/ppp-mod-pppoe
78 $(call Package
/ppp
/Default
)
79 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
) +kmod-pppoe
83 define Package
/ppp-mod-pppoe
/description
84 This package contains a PPPoE
(PPP over Ethernet
) plugin for ppp.
87 define Package
/ppp-mod-radius
88 $(call Package
/ppp
/Default
)
89 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
)
93 define Package
/ppp-mod-radius
/description
94 This package contains a RADIUS
(Remote Authentication Dial-In User Service
)
98 define Package
/ppp-mod-radius
/conffiles
103 define Package
/ppp-mod-pppol2tp
104 $(call Package
/ppp
/Default
)
105 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
) +kmod-pppol2tp
106 TITLE
:=PPPoL2TP plugin
109 define Package
/ppp-mod-pppol2tp
/description
110 This package contains a PPPoL2TP
(PPP over L2TP
) plugin for ppp.
113 define Package
/ppp-mod-pptp
114 $(call Package
/ppp
/Default
)
115 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
) +kmod-pptp
+kmod-mppe
+resolveip
119 define Package
/ppp-mod-pptp
/description
120 This package contains a PPtP plugin for ppp.
123 define Package
/ppp-mod-passwordfd
124 $(call Package
/ppp
/Default
)
125 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
)
126 TITLE
:=pap
/chap secret from filedescriptor
129 define Package
/ppp-mod-passwordfd
/description
130 This package allows to pass the PAP
/CHAP secret from a filedescriptor.
131 Eliminates the need for a secrets file.
135 $(call Package
/ppp
/Default
)
136 TITLE
:=Establish conversation with a modem
139 define Package
/chat
/description
140 This package contains an utility to establish conversation with other PPP servers
144 define Package
/pppdump
145 $(call Package
/ppp
/Default
)
146 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
)
147 TITLE
:=Read PPP record file
150 define Package
/pppdump
/description
151 This package contains an utility to read PPP record file.
154 define Package
/pppstats
155 $(call Package
/ppp
/Default
)
156 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
)
157 TITLE
:=Report PPP statistics
160 define Package
/pppstats
/description
161 This package contains an utility to report PPP statistics.
164 define Package
/pppoe-discovery
165 $(call Package
/ppp
/Default
)
166 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
) +ppp-mod-pppoe
167 TITLE
:=Perform a PPPoE-discovery process
170 define Package
/pppoe-discovery
/description
171 This tool performs the same discovery process
as pppoe
, but does
172 not initiate a session. Can be useful to debug pppoe.
176 define Build
/Configure
177 $(call Build
/Configure
/Default
,, \
179 UNAME_R
="$(LINUX_VERSION)" \
182 mkdir
-p
$(PKG_BUILD_DIR
)/pppd
/plugins
/pppoatm
/linux
184 $(LINUX_DIR
)/include/linux
/compiler.h \
185 $(LINUX_DIR
)/include/$(LINUX_UAPI_DIR
)linux
/atm
*.h \
186 $(PKG_BUILD_DIR
)/pppd
/plugins
/pppoatm
/linux
/
188 # Kernel 4.14.9+ only, ignore the exit status of cp in case the file
190 -$(CP
) $(LINUX_DIR
)/include/linux
/compiler_types.h \
191 $(PKG_BUILD_DIR
)/pppd
/plugins
/pppoatm
/linux
/
194 TARGET_CFLAGS
+= -ffunction-sections
-fdata-sections
-flto
195 TARGET_LDFLAGS
+= -Wl
,--gc-sections
-flto
-fuse-linker-plugin
197 MAKE_FLAGS
+= COPTS
="$(TARGET_CFLAGS)" \
198 PRECOMPILED_FILTER
=1 \
199 STAGING_DIR
="$(STAGING_DIR)"
201 ifeq ($(BUILD_VARIANT
),multilink
)
202 MAKE_FLAGS
+= HAVE_MULTILINK
=y
204 MAKE_FLAGS
+= HAVE_MULTILINK
=
207 ifdef CONFIG_USE_MUSL
208 MAKE_FLAGS
+= USE_LIBUTIL
=
211 define Build
/InstallDev
212 $(INSTALL_DIR
) $(1)/usr
/include
213 $(CP
) $(PKG_INSTALL_DIR
)/include/pppd
$(1)/usr
/include/
216 define Package
/ppp
/script_install
219 define Package
/ppp
/install
220 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_RELEASE_VERSION
)
221 $(INSTALL_DIR
) $(1)/usr
/sbin
222 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/sbin
/pppd
$(1)/usr
/sbin
/
223 $(INSTALL_DIR
) $(1)/etc
/ppp
224 $(INSTALL_CONF
) .
/files
/etc
/ppp
/chap-secrets
$(1)/etc
/ppp
/
225 $(INSTALL_DATA
) .
/files
/etc
/ppp
/filter $(1)/etc
/ppp
/
226 $(INSTALL_DATA
) .
/files
/etc
/ppp
/options
$(1)/etc
/ppp
/
227 $(LN
) /tmp
/resolv.conf.ppp
$(1)/etc
/ppp
/resolv.conf
228 $(INSTALL_DIR
) $(1)/lib
/netifd
/proto
229 $(INSTALL_BIN
) .
/files
/ppp.sh
$(1)/lib
/netifd
/proto
/
230 $(INSTALL_BIN
) .
/files
/lib
/netifd
/ppp-up
$(1)/lib
/netifd
/
231 $(INSTALL_BIN
) .
/files
/lib
/netifd
/ppp6-up
$(1)/lib
/netifd
/
232 $(INSTALL_BIN
) .
/files
/lib
/netifd
/ppp-down
$(1)/lib
/netifd
/
234 Package
/ppp-multilink
/install=$(Package
/ppp
/install)
236 define Package
/ppp-mod-pppoa
/install
237 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_RELEASE_VERSION
)
238 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_RELEASE_VERSION
)/pppoatm.so \
239 $(1)/usr
/lib
/pppd
/$(PKG_RELEASE_VERSION
)/
242 define Package
/ppp-mod-pppoe
/install
243 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_RELEASE_VERSION
)
244 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_RELEASE_VERSION
)/rp-pppoe.so \
245 $(1)/usr
/lib
/pppd
/$(PKG_RELEASE_VERSION
)/
248 define Package
/ppp-mod-radius
/install
249 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_RELEASE_VERSION
)
250 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_RELEASE_VERSION
)/radius.so \
251 $(1)/usr
/lib
/pppd
/$(PKG_RELEASE_VERSION
)/
252 $(INSTALL_DIR
) $(1)/etc
/ppp
253 $(INSTALL_DATA
) .
/files
/etc
/ppp
/radius.conf
$(1)/etc
/ppp
/
254 $(INSTALL_DIR
) $(1)/etc
/ppp
/radius
255 $(INSTALL_DATA
) .
/files
/etc
/ppp
/radius
/dictionary
* \
257 $(INSTALL_CONF
) .
/files
/etc
/ppp
/radius
/servers \
261 define Package
/ppp-mod-pppol2tp
/install
262 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_RELEASE_VERSION
)
263 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_RELEASE_VERSION
)/pppol2tp.so \
264 $(1)/usr
/lib
/pppd
/$(PKG_RELEASE_VERSION
)/
267 define Package
/ppp-mod-pptp
/install
268 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_RELEASE_VERSION
)
269 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_RELEASE_VERSION
)/pptp.so \
270 $(1)/usr
/lib
/pppd
/$(PKG_RELEASE_VERSION
)/
271 $(INSTALL_DIR
) $(1)/etc
/ppp
272 $(INSTALL_DATA
) .
/files
/etc
/ppp
/options.pptp
$(1)/etc
/ppp
/
275 define Package
/ppp-mod-passwordfd
/install
276 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_RELEASE_VERSION
)
277 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_RELEASE_VERSION
)/passwordfd.so \
278 $(1)/usr
/lib
/pppd
/$(PKG_RELEASE_VERSION
)/
281 define Package
/chat
/install
282 $(INSTALL_DIR
) $(1)/usr
/sbin
283 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/sbin
/chat
$(1)/usr
/sbin
/
286 define Package
/pppdump
/install
287 $(INSTALL_DIR
) $(1)/usr
/sbin
288 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/sbin
/pppdump
$(1)/usr
/sbin
/
291 define Package
/pppstats
/install
292 $(INSTALL_DIR
) $(1)/usr
/sbin
293 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/sbin
/pppstats
$(1)/usr
/sbin
/
296 define Package
/pppoe-discovery
/install
297 $(INSTALL_DIR
) $(1)/usr
/sbin
298 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/sbin
/pppoe-discovery
$(1)/usr
/sbin
/
301 $(eval
$(call BuildPackage
,ppp
))
302 $(eval
$(call BuildPackage
,ppp-multilink
))
303 $(eval
$(call BuildPackage
,ppp-mod-pppoa
))
304 $(eval
$(call BuildPackage
,ppp-mod-pppoe
))
305 $(eval
$(call BuildPackage
,ppp-mod-radius
))
306 $(eval
$(call BuildPackage
,ppp-mod-pppol2tp
))
307 $(eval
$(call BuildPackage
,ppp-mod-pptp
))
308 $(eval
$(call BuildPackage
,ppp-mod-passwordfd
))
309 $(eval
$(call BuildPackage
,chat
))
310 $(eval
$(call BuildPackage
,pppdump
))
311 $(eval
$(call BuildPackage
,pppstats
))
312 $(eval
$(call BuildPackage
,pppoe-discovery
))