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
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_SOURCE_URL
:=https
://download.samba.org
/pub
/ppp
/
17 PKG_HASH
:=02e0a3dd3e4799e33103f70ec7df75348c8540966ee7c948e4ed8a42bbccfb30
18 PKG_MAINTAINER
:=Felix Fietkau
<nbd@nbd.name
>
19 PKG_LICENSE
:=BSD-4-Clause
21 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(BUILD_VARIANT
)/$(PKG_NAME
)-$(PKG_VERSION
)
23 PKG_BUILD_DEPENDS
:=libpcap
28 include $(INCLUDE_DIR
)/package.mk
30 define Package
/ppp
/Default
33 URL
:=https
://ppp.samba.org
/
37 $(call Package
/ppp
/Default
)
43 define Package
/ppp-multilink
44 $(call Package
/ppp
/Default
)
46 TITLE
:=PPP daemon
(with multilink support
)
50 define Package
/ppp
/description
51 This package contains the PPP
(Point-to-Point Protocol
) daemon.
54 define Package
/ppp
/conffiles
64 define Package
/ppp-mod-pppoa
65 $(call Package
/ppp
/Default
)
66 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
) +linux-atm
+kmod-pppoa
70 define Package
/ppp-mod-pppoa
/description
71 This package contains a PPPoA
(PPP over ATM
) plugin for ppp.
74 define Package
/ppp-mod-pppoe
75 $(call Package
/ppp
/Default
)
76 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
) +kmod-pppoe
80 define Package
/ppp-mod-pppoe
/description
81 This package contains a PPPoE
(PPP over Ethernet
) plugin for ppp.
84 define Package
/ppp-mod-radius
85 $(call Package
/ppp
/Default
)
86 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
)
90 define Package
/ppp-mod-radius
/description
91 This package contains a RADIUS
(Remote Authentication Dial-In User Service
)
95 define Package
/ppp-mod-radius
/conffiles
100 define Package
/ppp-mod-pppol2tp
101 $(call Package
/ppp
/Default
)
102 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
) +kmod-pppol2tp
103 TITLE
:=PPPoL2TP plugin
106 define Package
/ppp-mod-pppol2tp
/description
107 This package contains a PPPoL2TP
(PPP over L2TP
) plugin for ppp.
110 define Package
/ppp-mod-pptp
111 $(call Package
/ppp
/Default
)
112 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
) +kmod-pptp
+kmod-mppe
+resolveip
116 define Package
/ppp-mod-pptp
/description
117 This package contains a PPtP plugin for ppp.
120 define Package
/ppp-mod-passwordfd
121 $(call Package
/ppp
/Default
)
122 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
)
123 TITLE
:=pap
/chap secret from filedescriptor
126 define Package
/ppp-mod-passwordfd
/description
127 This package allows to pass the PAP
/CHAP secret from a filedescriptor.
128 Eliminates the need for a secrets file.
132 $(call Package
/ppp
/Default
)
133 TITLE
:=Establish conversation with a modem
136 define Package
/chat
/description
137 This package contains an utility to establish conversation with other PPP servers
141 define Package
/pppdump
142 $(call Package
/ppp
/Default
)
143 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
)
144 TITLE
:=Read PPP record file
147 define Package
/pppdump
/description
148 This package contains an utility to read PPP record file.
151 define Package
/pppstats
152 $(call Package
/ppp
/Default
)
153 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
)
154 TITLE
:=Report PPP statistics
157 define Package
/pppstats
/description
158 This package contains an utility to report PPP statistics.
161 define Package
/pppoe-discovery
162 $(call Package
/ppp
/Default
)
163 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
) +ppp-mod-pppoe
164 TITLE
:=Perform a PPPoE-discovery process
167 define Package
/pppoe-discovery
/description
168 This tool performs the same discovery process
as pppoe
, but does
169 not initiate a session. Can be useful to debug pppoe.
173 define Build
/Configure
174 $(call Build
/Configure
/Default
,, \
176 UNAME_R
="$(LINUX_VERSION)" \
179 mkdir
-p
$(PKG_BUILD_DIR
)/pppd
/plugins
/pppoatm
/linux
181 $(LINUX_DIR
)/include/linux
/compiler.h \
182 $(LINUX_DIR
)/include/$(LINUX_UAPI_DIR
)linux
/atm
*.h \
183 $(PKG_BUILD_DIR
)/pppd
/plugins
/pppoatm
/linux
/
186 TARGET_CFLAGS
+= -ffunction-sections
-fdata-sections
187 TARGET_LDFLAGS
+= -Wl
,--gc-sections
189 MAKE_FLAGS
+= COPTS
="$(TARGET_CFLAGS)" \
190 PRECOMPILED_FILTER
=1 \
191 STAGING_DIR
="$(STAGING_DIR)"
193 ifeq ($(BUILD_VARIANT
),multilink
)
194 MAKE_FLAGS
+= HAVE_MULTILINK
=y
196 MAKE_FLAGS
+= HAVE_MULTILINK
=
199 ifdef CONFIG_USE_MUSL
200 MAKE_FLAGS
+= USE_LIBUTIL
=
203 define Build
/InstallDev
204 $(INSTALL_DIR
) $(1)/usr
/include
205 $(CP
) $(PKG_INSTALL_DIR
)/include/pppd
$(1)/usr
/include/
208 define Package
/ppp
/script_install
211 define Package
/ppp
/install
212 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)
213 $(INSTALL_DIR
) $(1)/usr
/sbin
214 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/sbin
/pppd
$(1)/usr
/sbin
/
215 $(INSTALL_DIR
) $(1)/etc
/ppp
216 $(INSTALL_CONF
) .
/files
/etc
/ppp
/chap-secrets
$(1)/etc
/ppp
/
217 $(INSTALL_DATA
) .
/files
/etc
/ppp
/filter $(1)/etc
/ppp
/
218 $(INSTALL_DATA
) .
/files
/etc
/ppp
/options
$(1)/etc
/ppp
/
219 $(LN
) /tmp
/resolv.conf.ppp
$(1)/etc
/ppp
/resolv.conf
220 $(INSTALL_DIR
) $(1)/lib
/netifd
/proto
221 $(INSTALL_BIN
) .
/files
/ppp.sh
$(1)/lib
/netifd
/proto
/
222 $(INSTALL_BIN
) .
/files
/lib
/netifd
/ppp-up
$(1)/lib
/netifd
/
223 $(INSTALL_BIN
) .
/files
/lib
/netifd
/ppp6-up
$(1)/lib
/netifd
/
224 $(INSTALL_BIN
) .
/files
/lib
/netifd
/ppp-down
$(1)/lib
/netifd
/
226 Package
/ppp-multilink
/install=$(Package
/ppp
/install)
228 define Package
/ppp-mod-pppoa
/install
229 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)
230 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_VERSION
)/pppoatm.so \
231 $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)/
234 define Package
/ppp-mod-pppoe
/install
235 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)
236 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_VERSION
)/rp-pppoe.so \
237 $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)/
240 define Package
/ppp-mod-radius
/install
241 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)
242 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_VERSION
)/radius.so \
243 $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)/
244 $(INSTALL_DIR
) $(1)/etc
/ppp
245 $(INSTALL_DATA
) .
/files
/etc
/ppp
/radius.conf
$(1)/etc
/ppp
/
246 $(INSTALL_DIR
) $(1)/etc
/ppp
/radius
247 $(INSTALL_DATA
) .
/files
/etc
/ppp
/radius
/dictionary
* \
249 $(INSTALL_CONF
) .
/files
/etc
/ppp
/radius
/servers \
253 define Package
/ppp-mod-pppol2tp
/install
254 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)
255 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_VERSION
)/pppol2tp.so \
256 $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)/
259 define Package
/ppp-mod-pptp
/install
260 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)
261 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_VERSION
)/pptp.so \
262 $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)/
263 $(INSTALL_DIR
) $(1)/etc
/ppp
264 $(INSTALL_DATA
) .
/files
/etc
/ppp
/options.pptp
$(1)/etc
/ppp
/
267 define Package
/ppp-mod-passwordfd
/install
268 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)
269 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_VERSION
)/passwordfd.so \
270 $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)/
273 define Package
/chat
/install
274 $(INSTALL_DIR
) $(1)/usr
/sbin
275 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/sbin
/chat
$(1)/usr
/sbin
/
278 define Package
/pppdump
/install
279 $(INSTALL_DIR
) $(1)/usr
/sbin
280 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/sbin
/pppdump
$(1)/usr
/sbin
/
283 define Package
/pppstats
/install
284 $(INSTALL_DIR
) $(1)/usr
/sbin
285 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/sbin
/pppstats
$(1)/usr
/sbin
/
288 define Package
/pppoe-discovery
/install
289 $(INSTALL_DIR
) $(1)/usr
/sbin
290 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/sbin
/pppoe-discovery
$(1)/usr
/sbin
/
293 $(eval
$(call BuildPackage
,ppp
))
294 $(eval
$(call BuildPackage
,ppp-multilink
))
295 $(eval
$(call BuildPackage
,ppp-mod-pppoa
))
296 $(eval
$(call BuildPackage
,ppp-mod-pppoe
))
297 $(eval
$(call BuildPackage
,ppp-mod-radius
))
298 $(eval
$(call BuildPackage
,ppp-mod-pppol2tp
))
299 $(eval
$(call BuildPackage
,ppp-mod-pptp
))
300 $(eval
$(call BuildPackage
,ppp-mod-passwordfd
))
301 $(eval
$(call BuildPackage
,chat
))
302 $(eval
$(call BuildPackage
,pppdump
))
303 $(eval
$(call BuildPackage
,pppstats
))
304 $(eval
$(call BuildPackage
,pppoe-discovery
))