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_MD5SUM
:=78818f40e6d33a1d1de68a1551f6595a
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
:=http
://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.
162 define Build
/Configure
163 $(call Build
/Configure
/Default
,, \
165 UNAME_R
="$(LINUX_VERSION)" \
168 mkdir
-p
$(PKG_BUILD_DIR
)/pppd
/plugins
/pppoatm
/linux
170 $(LINUX_DIR
)/include/linux
/compiler.h \
171 $(LINUX_DIR
)/include/$(LINUX_UAPI_DIR
)linux
/atm
*.h \
172 $(PKG_BUILD_DIR
)/pppd
/plugins
/pppoatm
/linux
/
175 MAKE_FLAGS
+= COPTS
="$(TARGET_CFLAGS)" \
176 PRECOMPILED_FILTER
=1 \
177 STAGING_DIR
="$(STAGING_DIR)"
179 ifeq ($(BUILD_VARIANT
),multilink
)
180 MAKE_FLAGS
+= HAVE_MULTILINK
=y
182 MAKE_FLAGS
+= HAVE_MULTILINK
=
185 ifdef CONFIG_USE_MUSL
186 MAKE_FLAGS
+= USE_LIBUTIL
=
189 define Build
/InstallDev
190 $(INSTALL_DIR
) $(1)/usr
/include
191 $(CP
) $(PKG_INSTALL_DIR
)/include/pppd
$(1)/usr
/include/
194 define Package
/ppp
/script_install
197 define Package
/ppp
/install
198 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)
199 $(INSTALL_DIR
) $(1)/usr
/sbin
200 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/sbin
/pppd
$(1)/usr
/sbin
/
201 $(INSTALL_DIR
) $(1)/etc
/ppp
202 $(INSTALL_CONF
) .
/files
/etc
/ppp
/chap-secrets
$(1)/etc
/ppp
/
203 $(INSTALL_DATA
) .
/files
/etc
/ppp
/filter $(1)/etc
/ppp
/
204 $(INSTALL_DATA
) .
/files
/etc
/ppp
/options
$(1)/etc
/ppp
/
205 $(LN
) /tmp
/resolv.conf.ppp
$(1)/etc
/ppp
/resolv.conf
206 $(INSTALL_DIR
) $(1)/lib
/netifd
/proto
207 $(INSTALL_BIN
) .
/files
/ppp.sh
$(1)/lib
/netifd
/proto
/
208 $(INSTALL_BIN
) .
/files
/lib
/netifd
/ppp-up
$(1)/lib
/netifd
/
209 $(INSTALL_BIN
) .
/files
/lib
/netifd
/ppp-down
$(1)/lib
/netifd
/
211 Package
/ppp-multilink
/install=$(Package
/ppp
/install)
213 define Package
/ppp-mod-pppoa
/install
214 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)
215 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_VERSION
)/pppoatm.so \
216 $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)/
219 define Package
/ppp-mod-pppoe
/install
220 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)
221 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_VERSION
)/rp-pppoe.so \
222 $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)/
225 define Package
/ppp-mod-radius
/install
226 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)
227 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_VERSION
)/radius.so \
228 $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)/
229 $(INSTALL_DIR
) $(1)/etc
/ppp
230 $(INSTALL_DATA
) .
/files
/etc
/ppp
/radius.conf
$(1)/etc
/ppp
/
231 $(INSTALL_DIR
) $(1)/etc
/ppp
/radius
232 $(INSTALL_DATA
) .
/files
/etc
/ppp
/radius
/dictionary
* \
234 $(INSTALL_CONF
) .
/files
/etc
/ppp
/radius
/servers \
238 define Package
/ppp-mod-pppol2tp
/install
239 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)
240 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_VERSION
)/pppol2tp.so \
241 $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)/
244 define Package
/ppp-mod-pptp
/install
245 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)
246 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_VERSION
)/pptp.so \
247 $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)/
248 $(INSTALL_DIR
) $(1)/etc
/ppp
249 $(INSTALL_DATA
) .
/files
/etc
/ppp
/options.pptp
$(1)/etc
/ppp
/
252 define Package
/ppp-mod-passwordfd
/install
253 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)
254 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_VERSION
)/passwordfd.so \
255 $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)/
258 define Package
/chat
/install
259 $(INSTALL_DIR
) $(1)/usr
/sbin
260 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/sbin
/chat
$(1)/usr
/sbin
/
263 define Package
/pppdump
/install
264 $(INSTALL_DIR
) $(1)/usr
/sbin
265 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/sbin
/pppdump
$(1)/usr
/sbin
/
268 define Package
/pppstats
/install
269 $(INSTALL_DIR
) $(1)/usr
/sbin
270 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/sbin
/pppstats
$(1)/usr
/sbin
/
273 $(eval
$(call BuildPackage
,ppp
))
274 $(eval
$(call BuildPackage
,ppp-multilink
))
275 $(eval
$(call BuildPackage
,ppp-mod-pppoa
))
276 $(eval
$(call BuildPackage
,ppp-mod-pppoe
))
277 $(eval
$(call BuildPackage
,ppp-mod-radius
))
278 $(eval
$(call BuildPackage
,ppp-mod-pppol2tp
))
279 $(eval
$(call BuildPackage
,ppp-mod-pptp
))
280 $(eval
$(call BuildPackage
,ppp-mod-passwordfd
))
281 $(eval
$(call BuildPackage
,chat
))
282 $(eval
$(call BuildPackage
,pppdump
))
283 $(eval
$(call BuildPackage
,pppstats
))