2 # Copyright (C) 2006-2011 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
:=4621bc56167b6953ec4071043fe0ec57
19 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(BUILD_VARIANT
)/$(PKG_NAME
)-$(PKG_VERSION
)
21 PKG_BUILD_DEPENDS
:=libpcap
25 include $(INCLUDE_DIR
)/package.mk
27 define Package
/ppp
/Default
30 MAINTAINER
:=Jo-Philipp Wich
<xm@subsignal.org
>
31 URL
:=http
://ppp.samba.org
/
35 $(call Package
/ppp
/Default
)
41 define Package
/ppp-multilink
42 $(call Package
/ppp
/Default
)
44 TITLE
:=PPP daemon
(with multilink support
)
48 define Package
/ppp
/description
49 This package contains the PPP
(Point-to-Point Protocol
) daemon.
52 define Package
/ppp
/conffiles
62 define Package
/ppp-mod-pppoa
63 $(call Package
/ppp
/Default
)
64 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
) +linux-atm
+kmod-pppoa
68 define Package
/ppp-mod-pppoa
/description
69 This package contains a PPPoA
(PPP over ATM
) plugin for ppp.
72 define Package
/ppp-mod-pppoe
73 $(call Package
/ppp
/Default
)
74 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
) +kmod-pppoe
78 define Package
/ppp-mod-pppoe
/description
79 This package contains a PPPoE
(PPP over Ethernet
) plugin for ppp.
82 define Package
/ppp-mod-radius
83 $(call Package
/ppp
/Default
)
84 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
)
88 define Package
/ppp-mod-radius
/description
89 This package contains a RADIUS
(Remote Authentication Dial-In User Service
)
93 define Package
/ppp-mod-radius
/conffiles
98 define Package
/ppp-mod-pppol2tp
99 $(call Package
/ppp
/Default
)
100 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
) +kmod-pppol2tp
101 TITLE
:=PPPoL2TP plugin
104 define Package
/ppp-mod-pppol2tp
/description
105 This package contains a PPPoL2TP
(PPP over L2TP
) plugin for ppp.
109 $(call Package
/ppp
/Default
)
110 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
)
111 TITLE
:=Establish conversation with a modem
114 define Package
/chat
/description
115 This package contains an utility to establish conversation with other PPP servers
119 define Package
/pppdump
120 $(call Package
/ppp
/Default
)
121 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
)
122 TITLE
:=Read PPP record file
125 define Package
/pppdump
/description
126 This package contains an utility to read PPP record file.
129 define Package
/pppstats
130 $(call Package
/ppp
/Default
)
131 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
)
132 TITLE
:=Report PPP statistics
135 define Package
/pppstats
/description
136 This package contains an utility to report PPP statistics.
140 define Build
/Configure
141 $(call Build
/Configure
/Default
,, \
143 UNAME_R
="$(LINUX_VERSION)" \
146 mkdir
-p
$(PKG_BUILD_DIR
)/pppd
/plugins
/pppoatm
/linux
148 $(LINUX_DIR
)/include/linux
/compiler.h \
149 $(LINUX_DIR
)/include/linux
/atm
*.h \
150 $(PKG_BUILD_DIR
)/pppd
/plugins
/pppoatm
/linux
/
153 MAKE_FLAGS
+= COPTS
="$(TARGET_CFLAGS)" \
154 PRECOMPILED_FILTER
=1 \
155 STAGING_DIR
="$(STAGING_DIR)"
157 ifeq ($(BUILD_VARIANT
),multilink
)
158 MAKE_FLAGS
+= HAVE_MULTILINK
=y
160 MAKE_FLAGS
+= HAVE_MULTILINK
=
164 define Build
/InstallDev
165 $(INSTALL_DIR
) $(1)/usr
/include
166 $(CP
) $(PKG_INSTALL_DIR
)/include/pppd
$(1)/usr
/include/
169 ifneq ($(CONFIG_PACKAGE_netifd
),)
170 define Package
/ppp
/script_install
171 $(INSTALL_DIR
) $(1)/lib
/netifd
/proto
172 $(INSTALL_BIN
) .
/files
/ppp.sh
$(1)/lib
/netifd
/proto
/
173 $(INSTALL_BIN
) .
/files
/lib
/netifd
/ppp-up
$(1)/lib
/netifd
/
174 $(INSTALL_BIN
) .
/files
/lib
/netifd
/ppp-down
$(1)/lib
/netifd
/
177 define Package
/ppp
/script_install
178 $(INSTALL_DIR
) $(1)/lib
/network
179 $(INSTALL_BIN
) .
/files.old
/ppp.sh
$(1)/lib
/network
/
180 $(INSTALL_BIN
) .
/files.old
/etc
/ppp
/ip-up
$(1)/etc
/ppp
/
181 $(INSTALL_DIR
) $(1)/etc
/ppp
/ip-up.d
182 $(INSTALL_BIN
) .
/files.old
/etc
/ppp
/ip-down
$(1)/etc
/ppp
/
183 $(INSTALL_DIR
) $(1)/etc
/ppp
/ip-down.d
184 $(INSTALL_BIN
) .
/files.old
/etc
/ppp
/ipv6-up
$(1)/etc
/ppp
/
185 $(INSTALL_BIN
) .
/files.old
/etc
/ppp
/ipv6-down
$(1)/etc
/ppp
/
186 $(INSTALL_DIR
) $(1)/lib
/network
187 $(INSTALL_BIN
) .
/files.old
/pppoe.sh
$(1)/lib
/network
/
188 $(INSTALL_DIR
) $(1)/lib
/network
189 $(INSTALL_BIN
) .
/files.old
/pppoa.sh
$(1)/lib
/network
/
190 $(INSTALL_DIR
) $(1)/etc
/hotplug.d
/atm
191 $(INSTALL_DATA
) .
/files.old
/etc
/hotplug.d
/atm
/20-atm-modem
$(1)/etc
/hotplug.d
/atm
/
195 define Package
/ppp
/install
196 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)
197 $(INSTALL_DIR
) $(1)/usr
/sbin
198 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/sbin
/pppd
$(1)/usr
/sbin
/
199 $(INSTALL_DIR
) $(1)/etc
/ppp
200 $(INSTALL_CONF
) .
/files
/etc
/ppp
/chap-secrets
$(1)/etc
/ppp
/
201 $(INSTALL_DATA
) .
/files
/etc
/ppp
/filter $(1)/etc
/ppp
/
202 $(INSTALL_DATA
) .
/files
/etc
/ppp
/options
$(1)/etc
/ppp
/
203 ln
-sf
/tmp
/resolv.conf.ppp
$(1)/etc
/ppp
/resolv.conf
204 $(Package
/ppp
/script_install
)
206 Package
/ppp-multilink
/install=$(Package
/ppp
/install)
208 define Package
/ppp-mod-pppoa
/install
209 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)
210 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_VERSION
)/pppoatm.so \
211 $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)/
214 define Package
/ppp-mod-pppoe
/install
215 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)
216 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_VERSION
)/rp-pppoe.so \
217 $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)/
220 define Package
/ppp-mod-radius
/install
221 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)
222 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_VERSION
)/radius.so \
223 $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)/
224 $(INSTALL_DIR
) $(1)/etc
/ppp
225 $(INSTALL_DATA
) .
/files
/etc
/ppp
/radius.conf
$(1)/etc
/ppp
/
226 $(INSTALL_DIR
) $(1)/etc
/ppp
/radius
227 $(INSTALL_DATA
) .
/files
/etc
/ppp
/radius
/dictionary
* \
229 $(INSTALL_CONF
) .
/files
/etc
/ppp
/radius
/servers \
233 define Package
/ppp-mod-pppol2tp
/install
234 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)
235 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_VERSION
)/pppol2tp.so \
236 $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)/
239 define Package
/chat
/install
240 $(INSTALL_DIR
) $(1)/usr
/sbin
241 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/sbin
/chat
$(1)/usr
/sbin
/
244 define Package
/pppdump
/install
245 $(INSTALL_DIR
) $(1)/usr
/sbin
246 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/sbin
/pppdump
$(1)/usr
/sbin
/
249 define Package
/pppstats
/install
250 $(INSTALL_DIR
) $(1)/usr
/sbin
251 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/sbin
/pppstats
$(1)/usr
/sbin
/
254 $(eval
$(call BuildPackage
,ppp
))
255 $(eval
$(call BuildPackage
,ppp-multilink
))
256 $(eval
$(call BuildPackage
,ppp-mod-pppoa
))
257 $(eval
$(call BuildPackage
,ppp-mod-pppoe
))
258 $(eval
$(call BuildPackage
,ppp-mod-radius
))
259 $(eval
$(call BuildPackage
,ppp-mod-pppol2tp
))
260 $(eval
$(call BuildPackage
,chat
))
261 $(eval
$(call BuildPackage
,pppdump
))
262 $(eval
$(call BuildPackage
,pppstats
))