2 # Copyright (C) 2006-2014 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
:=ftp
://ftp.samba.org
/pub
/ppp
/
17 PKG_MD5SUM
:=78818f40e6d33a1d1de68a1551f6595a
18 PKG_MAINTAINER
:=Felix Fietkau
<nbd@openwrt.org
>
20 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(BUILD_VARIANT
)/$(PKG_NAME
)-$(PKG_VERSION
)
22 PKG_BUILD_DEPENDS
:=libpcap
27 include $(INCLUDE_DIR
)/package.mk
29 define Package
/ppp
/Default
32 URL
:=http
://ppp.samba.org
/
36 $(call Package
/ppp
/Default
)
42 define Package
/ppp-multilink
43 $(call Package
/ppp
/Default
)
45 TITLE
:=PPP daemon
(with multilink support
)
49 define Package
/ppp
/description
50 This package contains the PPP
(Point-to-Point Protocol
) daemon.
53 define Package
/ppp
/conffiles
63 define Package
/ppp-mod-pppoa
64 $(call Package
/ppp
/Default
)
65 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
) +linux-atm
+kmod-pppoa
69 define Package
/ppp-mod-pppoa
/description
70 This package contains a PPPoA
(PPP over ATM
) plugin for ppp.
73 define Package
/ppp-mod-pppoe
74 $(call Package
/ppp
/Default
)
75 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
) +kmod-pppoe
79 define Package
/ppp-mod-pppoe
/description
80 This package contains a PPPoE
(PPP over Ethernet
) plugin for ppp.
83 define Package
/ppp-mod-radius
84 $(call Package
/ppp
/Default
)
85 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
)
89 define Package
/ppp-mod-radius
/description
90 This package contains a RADIUS
(Remote Authentication Dial-In User Service
)
94 define Package
/ppp-mod-radius
/conffiles
99 define Package
/ppp-mod-pppol2tp
100 $(call Package
/ppp
/Default
)
101 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
) +kmod-pppol2tp
102 TITLE
:=PPPoL2TP plugin
105 define Package
/ppp-mod-pppol2tp
/description
106 This package contains a PPPoL2TP
(PPP over L2TP
) plugin for ppp.
109 define Package
/ppp-mod-pptp
110 $(call Package
/ppp
/Default
)
111 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
) +kmod-pptp
+kmod-mppe
+resolveip
115 define Package
/ppp-mod-pptp
/description
116 This package contains a PPtP plugin for ppp.
120 $(call Package
/ppp
/Default
)
121 TITLE
:=Establish conversation with a modem
124 define Package
/chat
/description
125 This package contains an utility to establish conversation with other PPP servers
129 define Package
/pppdump
130 $(call Package
/ppp
/Default
)
131 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
)
132 TITLE
:=Read PPP record file
135 define Package
/pppdump
/description
136 This package contains an utility to read PPP record file.
139 define Package
/pppstats
140 $(call Package
/ppp
/Default
)
141 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
)
142 TITLE
:=Report PPP statistics
145 define Package
/pppstats
/description
146 This package contains an utility to report PPP statistics.
150 define Build
/Configure
151 $(call Build
/Configure
/Default
,, \
153 UNAME_R
="$(LINUX_VERSION)" \
156 mkdir
-p
$(PKG_BUILD_DIR
)/pppd
/plugins
/pppoatm
/linux
158 $(LINUX_DIR
)/include/linux
/compiler.h \
159 $(LINUX_DIR
)/include/$(LINUX_UAPI_DIR
)linux
/atm
*.h \
160 $(PKG_BUILD_DIR
)/pppd
/plugins
/pppoatm
/linux
/
163 MAKE_FLAGS
+= COPTS
="$(TARGET_CFLAGS)" \
164 PRECOMPILED_FILTER
=1 \
165 STAGING_DIR
="$(STAGING_DIR)"
167 ifeq ($(BUILD_VARIANT
),multilink
)
168 MAKE_FLAGS
+= HAVE_MULTILINK
=y
170 MAKE_FLAGS
+= HAVE_MULTILINK
=
173 ifdef CONFIG_USE_MUSL
174 MAKE_FLAGS
+= USE_LIBUTIL
=
177 define Build
/InstallDev
178 $(INSTALL_DIR
) $(1)/usr
/include
179 $(CP
) $(PKG_INSTALL_DIR
)/include/pppd
$(1)/usr
/include/
182 define Package
/ppp
/script_install
185 define Package
/ppp
/install
186 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)
187 $(INSTALL_DIR
) $(1)/usr
/sbin
188 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/sbin
/pppd
$(1)/usr
/sbin
/
189 $(INSTALL_DIR
) $(1)/etc
/ppp
190 $(INSTALL_CONF
) .
/files
/etc
/ppp
/chap-secrets
$(1)/etc
/ppp
/
191 $(INSTALL_DATA
) .
/files
/etc
/ppp
/filter $(1)/etc
/ppp
/
192 $(INSTALL_DATA
) .
/files
/etc
/ppp
/options
$(1)/etc
/ppp
/
193 ln
-sf
/tmp
/resolv.conf.ppp
$(1)/etc
/ppp
/resolv.conf
194 $(INSTALL_DIR
) $(1)/lib
/netifd
/proto
195 $(INSTALL_BIN
) .
/files
/ppp.sh
$(1)/lib
/netifd
/proto
/
196 $(INSTALL_BIN
) .
/files
/lib
/netifd
/ppp-up
$(1)/lib
/netifd
/
197 $(INSTALL_BIN
) .
/files
/lib
/netifd
/ppp-down
$(1)/lib
/netifd
/
199 Package
/ppp-multilink
/install=$(Package
/ppp
/install)
201 define Package
/ppp-mod-pppoa
/install
202 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)
203 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_VERSION
)/pppoatm.so \
204 $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)/
207 define Package
/ppp-mod-pppoe
/install
208 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)
209 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_VERSION
)/rp-pppoe.so \
210 $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)/
213 define Package
/ppp-mod-radius
/install
214 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)
215 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_VERSION
)/radius.so \
216 $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)/
217 $(INSTALL_DIR
) $(1)/etc
/ppp
218 $(INSTALL_DATA
) .
/files
/etc
/ppp
/radius.conf
$(1)/etc
/ppp
/
219 $(INSTALL_DIR
) $(1)/etc
/ppp
/radius
220 $(INSTALL_DATA
) .
/files
/etc
/ppp
/radius
/dictionary
* \
222 $(INSTALL_CONF
) .
/files
/etc
/ppp
/radius
/servers \
226 define Package
/ppp-mod-pppol2tp
/install
227 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)
228 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_VERSION
)/pppol2tp.so \
229 $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)/
232 define Package
/ppp-mod-pptp
/install
233 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)
234 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_VERSION
)/pptp.so \
235 $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)/
236 $(INSTALL_DIR
) $(1)/etc
/ppp
237 $(INSTALL_DATA
) .
/files
/etc
/ppp
/options.pptp
$(1)/etc
/ppp
/
240 define Package
/chat
/install
241 $(INSTALL_DIR
) $(1)/usr
/sbin
242 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/sbin
/chat
$(1)/usr
/sbin
/
245 define Package
/pppdump
/install
246 $(INSTALL_DIR
) $(1)/usr
/sbin
247 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/sbin
/pppdump
$(1)/usr
/sbin
/
250 define Package
/pppstats
/install
251 $(INSTALL_DIR
) $(1)/usr
/sbin
252 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/sbin
/pppstats
$(1)/usr
/sbin
/
255 $(eval
$(call BuildPackage
,ppp
))
256 $(eval
$(call BuildPackage
,ppp-multilink
))
257 $(eval
$(call BuildPackage
,ppp-mod-pppoa
))
258 $(eval
$(call BuildPackage
,ppp-mod-pppoe
))
259 $(eval
$(call BuildPackage
,ppp-mod-radius
))
260 $(eval
$(call BuildPackage
,ppp-mod-pppol2tp
))
261 $(eval
$(call BuildPackage
,ppp-mod-pptp
))
262 $(eval
$(call BuildPackage
,chat
))
263 $(eval
$(call BuildPackage
,pppdump
))
264 $(eval
$(call BuildPackage
,pppstats
))