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:=ddda28dec8aca99a403ab6070d94ffd2b17d63e9a4c5509158e99e148f572d4f
19 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
20 PKG_LICENSE:=BSD-4-Clause
21 PKG_CPE_ID:=cpe:/a:point-to-point_protocol_project:point-to-point_protocol
23 PKG_ASLR_PIE_REGULAR:=1
24 PKG_BUILD_DEPENDS:=libpcap
25 PKG_BUILD_FLAGS:=gc-sections lto
30 include $(INCLUDE_DIR)/package.mk
35 --disable-openssl-engine \
39 --enable-microsoft-extensions \
48 define Package/ppp/Default
51 URL:=https://ppp.samba.org/
55 $(call Package/ppp/Default)
56 DEPENDS:= +USE_GLIBC:libcrypt-compat +kmod-ppp +ucode +ucode-mod-fs +ucode-mod-resolv +ucode-mod-ubus
61 define Package/ppp-multilink
62 $(call Package/ppp/Default)
63 DEPENDS:= +USE_GLIBC:libcrypt-compat +kmod-ppp +ucode +ucode-mod-fs +ucode-mod-resolv +ucode-mod-ubus
64 TITLE:=PPP daemon (with multilink support)
68 define Package/ppp/description
69 This package contains the PPP (Point-to-Point Protocol) daemon.
72 define Package/ppp/conffiles
82 define Package/ppp-mod-pppoa
83 $(call Package/ppp/Default)
84 DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink) +linux-atm +kmod-pppoa
88 define Package/ppp-mod-pppoa/description
89 This package contains a PPPoA (PPP over ATM) plugin for ppp.
92 define Package/ppp-mod-pppoe
93 $(call Package/ppp/Default)
94 DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink) +kmod-pppoe
98 define Package/ppp-mod-pppoe/description
99 This package contains a PPPoE (PPP over Ethernet) plugin for ppp.
102 define Package/ppp-mod-radius
103 $(call Package/ppp/Default)
104 DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink)
108 define Package/ppp-mod-radius/description
109 This package contains a RADIUS (Remote Authentication Dial-In User Service)
113 define Package/ppp-mod-radius/conffiles
118 define Package/ppp-mod-pppol2tp
119 $(call Package/ppp/Default)
120 DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink) +kmod-pppol2tp
121 TITLE:=PPPoL2TP plugin
124 define Package/ppp-mod-pppol2tp/description
125 This package contains a PPPoL2TP (PPP over L2TP) plugin for ppp.
128 define Package/ppp-mod-pptp
129 $(call Package/ppp/Default)
130 DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink) +kmod-pptp +kmod-mppe +resolveip
134 define Package/ppp-mod-pptp/description
135 This package contains a PPtP plugin for ppp.
138 define Package/ppp-mod-passwordfd
139 $(call Package/ppp/Default)
140 DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink)
141 TITLE:=pap/chap secret from filedescriptor
144 define Package/ppp-mod-passwordfd/description
145 This package allows to pass the PAP/CHAP secret from a filedescriptor.
146 Eliminates the need for a secrets file.
150 $(call Package/ppp/Default)
151 TITLE:=Establish conversation with a modem
154 define Package/chat/description
155 This package contains an utility to establish conversation with other PPP servers
159 define Package/pppdump
160 $(call Package/ppp/Default)
161 DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink)
162 TITLE:=Read PPP record file
165 define Package/pppdump/description
166 This package contains an utility to read PPP record file.
169 define Package/pppstats
170 $(call Package/ppp/Default)
171 DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink)
172 TITLE:=Report PPP statistics
175 define Package/pppstats/description
176 This package contains an utility to report PPP statistics.
179 define Package/pppoe-discovery
180 $(call Package/ppp/Default)
181 DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink) +ppp-mod-pppoe
182 TITLE:=Perform a PPPoE-discovery process
185 define Package/pppoe-discovery/description
186 This tool performs the same discovery process as pppoe, but does
187 not initiate a session. Can be useful to debug pppoe.
190 ifeq ($(BUILD_VARIANT),multilink)
195 define Build/InstallDev
196 $(INSTALL_DIR) $(1)/usr/include
197 $(CP) $(PKG_INSTALL_DIR)/usr/include/pppd $(1)/usr/include/
198 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
199 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig
202 define Package/ppp/script_install
205 define Package/ppp/install
206 $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
207 $(INSTALL_DIR) $(1)/usr/sbin
208 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppd $(1)/usr/sbin/
209 $(INSTALL_DIR) $(1)/etc/ppp
210 $(INSTALL_CONF) ./files/etc/ppp/chap-secrets $(1)/etc/ppp/
211 $(INSTALL_DATA) ./files/etc/ppp/filter $(1)/etc/ppp/
212 $(INSTALL_DATA) ./files/etc/ppp/options $(1)/etc/ppp/
213 $(LN) /tmp/resolv.conf.ppp $(1)/etc/ppp/resolv.conf
214 $(INSTALL_DIR) $(1)/lib/netifd/proto
215 $(INSTALL_BIN) ./files/ppp.uc $(1)/lib/netifd/proto/
216 $(INSTALL_BIN) ./files/ppp.sh $(1)/lib/netifd/proto/
217 $(INSTALL_BIN) ./files/lib/netifd/ppp-up $(1)/lib/netifd/
218 $(INSTALL_BIN) ./files/lib/netifd/ppp6-up $(1)/lib/netifd/
219 $(INSTALL_BIN) ./files/lib/netifd/ppp-down $(1)/lib/netifd/
221 Package/ppp-multilink/install=$(Package/ppp/install)
223 define Package/ppp-mod-pppoa/install
224 $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
225 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/pppoatm.so \
226 $(1)/usr/lib/pppd/$(PKG_VERSION)/
229 define Package/ppp-mod-pppoe/install
230 $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
231 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/pppoe.so \
232 $(1)/usr/lib/pppd/$(PKG_VERSION)/
235 define Package/ppp-mod-radius/install
236 $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
237 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/radius.so \
238 $(1)/usr/lib/pppd/$(PKG_VERSION)/
239 $(INSTALL_DIR) $(1)/etc/ppp
240 $(INSTALL_DATA) ./files/etc/ppp/radius.conf $(1)/etc/ppp/
241 $(INSTALL_DIR) $(1)/etc/ppp/radius
242 $(INSTALL_DATA) ./files/etc/ppp/radius/dictionary* \
244 $(INSTALL_CONF) ./files/etc/ppp/radius/servers \
248 define Package/ppp-mod-pppol2tp/install
249 $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
250 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/pppol2tp.so \
251 $(1)/usr/lib/pppd/$(PKG_VERSION)/
254 define Package/ppp-mod-pptp/install
255 $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
256 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/pptp.so \
257 $(1)/usr/lib/pppd/$(PKG_VERSION)/
258 $(INSTALL_DIR) $(1)/etc/ppp
259 $(INSTALL_DATA) ./files/etc/ppp/options.pptp $(1)/etc/ppp/
262 define Package/ppp-mod-passwordfd/install
263 $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
264 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/passwordfd.so \
265 $(1)/usr/lib/pppd/$(PKG_VERSION)/
268 define Package/chat/install
269 $(INSTALL_DIR) $(1)/usr/sbin
270 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/chat $(1)/usr/sbin/
273 define Package/pppdump/install
274 $(INSTALL_DIR) $(1)/usr/sbin
275 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppdump $(1)/usr/sbin/
278 define Package/pppstats/install
279 $(INSTALL_DIR) $(1)/usr/sbin
280 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppstats $(1)/usr/sbin/
283 define Package/pppoe-discovery/install
284 $(INSTALL_DIR) $(1)/usr/sbin
285 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-discovery $(1)/usr/sbin/
288 $(eval $(call BuildPackage,ppp))
289 $(eval $(call BuildPackage,ppp-multilink))
290 $(eval $(call BuildPackage,ppp-mod-pppoa))
291 $(eval $(call BuildPackage,ppp-mod-pppoe))
292 $(eval $(call BuildPackage,ppp-mod-radius))
293 $(eval $(call BuildPackage,ppp-mod-pppol2tp))
294 $(eval $(call BuildPackage,ppp-mod-pptp))
295 $(eval $(call BuildPackage,ppp-mod-passwordfd))
296 $(eval $(call BuildPackage,chat))
297 $(eval $(call BuildPackage,pppdump))
298 $(eval $(call BuildPackage,pppstats))
299 $(eval $(call BuildPackage,pppoe-discovery))