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
22 PKG_CONFIG_DEPENDS
:=CONFIG_PACKAGE_netifd
26 include $(INCLUDE_DIR
)/package.mk
28 define Package
/ppp
/Default
31 MAINTAINER
:=Jo-Philipp Wich
<xm@subsignal.org
>
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.
110 $(call Package
/ppp
/Default
)
111 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
)
112 TITLE
:=Establish conversation with a modem
115 define Package
/chat
/description
116 This package contains an utility to establish conversation with other PPP servers
120 define Package
/pppdump
121 $(call Package
/ppp
/Default
)
122 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
)
123 TITLE
:=Read PPP record file
126 define Package
/pppdump
/description
127 This package contains an utility to read PPP record file.
130 define Package
/pppstats
131 $(call Package
/ppp
/Default
)
132 DEPENDS
:=@
(PACKAGE_ppp||PACKAGE_ppp-multilink
)
133 TITLE
:=Report PPP statistics
136 define Package
/pppstats
/description
137 This package contains an utility to report PPP statistics.
141 define Build
/Configure
142 $(call Build
/Configure
/Default
,, \
144 UNAME_R
="$(LINUX_VERSION)" \
147 mkdir
-p
$(PKG_BUILD_DIR
)/pppd
/plugins
/pppoatm
/linux
149 $(LINUX_DIR
)/include/linux
/compiler.h \
150 $(LINUX_DIR
)/include/linux
/atm
*.h \
151 $(PKG_BUILD_DIR
)/pppd
/plugins
/pppoatm
/linux
/
154 MAKE_FLAGS
+= COPTS
="$(TARGET_CFLAGS)" \
155 PRECOMPILED_FILTER
=1 \
156 STAGING_DIR
="$(STAGING_DIR)"
158 ifeq ($(BUILD_VARIANT
),multilink
)
159 MAKE_FLAGS
+= HAVE_MULTILINK
=y
161 MAKE_FLAGS
+= HAVE_MULTILINK
=
165 define Build
/InstallDev
166 $(INSTALL_DIR
) $(1)/usr
/include
167 $(CP
) $(PKG_INSTALL_DIR
)/include/pppd
$(1)/usr
/include/
170 ifneq ($(CONFIG_PACKAGE_netifd
),)
171 define Package
/ppp
/script_install
172 $(INSTALL_DIR
) $(1)/lib
/netifd
/proto
173 $(INSTALL_BIN
) .
/files
/ppp.sh
$(1)/lib
/netifd
/proto
/
174 $(INSTALL_BIN
) .
/files
/lib
/netifd
/ppp-up
$(1)/lib
/netifd
/
175 $(INSTALL_BIN
) .
/files
/lib
/netifd
/ppp-down
$(1)/lib
/netifd
/
178 define Package
/ppp
/script_install
179 $(INSTALL_DIR
) $(1)/lib
/network
180 $(INSTALL_BIN
) .
/files.old
/ppp.sh
$(1)/lib
/network
/
181 $(INSTALL_BIN
) .
/files.old
/etc
/ppp
/ip-up
$(1)/etc
/ppp
/
182 $(INSTALL_DIR
) $(1)/etc
/ppp
/ip-up.d
183 $(INSTALL_BIN
) .
/files.old
/etc
/ppp
/ip-down
$(1)/etc
/ppp
/
184 $(INSTALL_DIR
) $(1)/etc
/ppp
/ip-down.d
185 $(INSTALL_BIN
) .
/files.old
/etc
/ppp
/ipv6-up
$(1)/etc
/ppp
/
186 $(INSTALL_BIN
) .
/files.old
/etc
/ppp
/ipv6-down
$(1)/etc
/ppp
/
187 $(INSTALL_DIR
) $(1)/lib
/network
188 $(INSTALL_BIN
) .
/files.old
/pppoe.sh
$(1)/lib
/network
/
189 $(INSTALL_DIR
) $(1)/lib
/network
190 $(INSTALL_BIN
) .
/files.old
/pppoa.sh
$(1)/lib
/network
/
191 $(INSTALL_DIR
) $(1)/etc
/hotplug.d
/atm
192 $(INSTALL_DATA
) .
/files.old
/etc
/hotplug.d
/atm
/20-atm-modem
$(1)/etc
/hotplug.d
/atm
/
196 define Package
/ppp
/install
197 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)
198 $(INSTALL_DIR
) $(1)/usr
/sbin
199 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/sbin
/pppd
$(1)/usr
/sbin
/
200 $(INSTALL_DIR
) $(1)/etc
/ppp
201 $(INSTALL_CONF
) .
/files
/etc
/ppp
/chap-secrets
$(1)/etc
/ppp
/
202 $(INSTALL_DATA
) .
/files
/etc
/ppp
/filter $(1)/etc
/ppp
/
203 $(INSTALL_DATA
) .
/files
/etc
/ppp
/options
$(1)/etc
/ppp
/
204 ln
-sf
/tmp
/resolv.conf.ppp
$(1)/etc
/ppp
/resolv.conf
205 $(Package
/ppp
/script_install
)
207 Package
/ppp-multilink
/install=$(Package
/ppp
/install)
209 define Package
/ppp-mod-pppoa
/install
210 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)
211 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_VERSION
)/pppoatm.so \
212 $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)/
215 define Package
/ppp-mod-pppoe
/install
216 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)
217 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_VERSION
)/rp-pppoe.so \
218 $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)/
221 define Package
/ppp-mod-radius
/install
222 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)
223 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_VERSION
)/radius.so \
224 $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)/
225 $(INSTALL_DIR
) $(1)/etc
/ppp
226 $(INSTALL_DATA
) .
/files
/etc
/ppp
/radius.conf
$(1)/etc
/ppp
/
227 $(INSTALL_DIR
) $(1)/etc
/ppp
/radius
228 $(INSTALL_DATA
) .
/files
/etc
/ppp
/radius
/dictionary
* \
230 $(INSTALL_CONF
) .
/files
/etc
/ppp
/radius
/servers \
234 define Package
/ppp-mod-pppol2tp
/install
235 $(INSTALL_DIR
) $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)
236 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/lib
/pppd
/$(PKG_VERSION
)/pppol2tp.so \
237 $(1)/usr
/lib
/pppd
/$(PKG_VERSION
)/
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
,chat
))
262 $(eval
$(call BuildPackage
,pppdump
))
263 $(eval
$(call BuildPackage
,pppstats
))