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:=183800762e266132218b204dfb428d29
19 PKG_BUILD_DEPENDS:=libpcap
23 include $(INCLUDE_DIR)/package.mk
25 define Package/ppp/Default
28 URL:=http://ppp.samba.org/
32 $(call Package/ppp/Default)
38 define Package/ppp/description
39 This package contains the PPP (Point-to-Point Protocol) daemon.
42 define Package/ppp/conffiles
52 define Package/ppp-mod-pppoa
53 $(call Package/ppp/Default)
54 DEPENDS:=ppp +linux-atm +kmod-pppoa
58 define Package/ppp-mod-pppoa/description
59 This package contains a PPPoA (PPP over ATM) plugin for ppp.
62 define Package/ppp-mod-pppoe
63 $(call Package/ppp/Default)
64 DEPENDS:=ppp +kmod-pppoe
68 define Package/ppp-mod-pppoe/description
69 This package contains a PPPoE (PPP over Ethernet) plugin for ppp.
72 define Package/ppp-mod-radius
73 $(call Package/ppp/Default)
78 define Package/ppp-mod-radius/description
79 This package contains a RADIUS (Remote Authentication Dial-In User Service)
83 define Package/ppp-mod-radius/conffiles
89 $(call Package/ppp/Default)
91 TITLE:=Establish conversation with a modem
94 define Package/chat/description
95 This package contains an utility to establish conversation with other PPP servers
99 define Package/pppdump
100 $(call Package/ppp/Default)
102 TITLE:=Read PPP record file
105 define Package/pppdump/description
106 This package contains an utility to read PPP record file.
109 define Package/pppstats
110 $(call Package/ppp/Default)
112 TITLE:=Report PPP statistics
115 define Package/pppstats/description
116 This package contains an utility to report PPP statistics.
120 define Build/Configure
121 $(call Build/Configure/Default,, \
123 UNAME_R="$(LINUX_VERSION)" \
126 mkdir -p $(PKG_BUILD_DIR)/pppd/plugins/pppoatm/linux
128 $(LINUX_DIR)/include/linux/compiler.h \
129 $(LINUX_DIR)/include/linux/atm*.h \
130 $(PKG_BUILD_DIR)/pppd/plugins/pppoatm/linux/
133 MAKE_FLAGS += COPTS="$(TARGET_CFLAGS)" \
134 PRECOMPILED_FILTER=1 \
135 STAGING_DIR="$(STAGING_DIR)"
137 define Build/InstallDev
138 $(INSTALL_DIR) $(1)/usr/include
139 $(CP) $(PKG_INSTALL_DIR)/include/pppd $(1)/usr/include/
142 define Package/ppp/install
143 $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
144 $(INSTALL_DIR) $(1)/usr/sbin
145 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/pppd $(1)/usr/sbin/
146 $(INSTALL_DIR) $(1)/lib/network
147 $(INSTALL_BIN) ./files/ppp.sh $(1)/lib/network/
148 $(INSTALL_DIR) $(1)/etc/ppp
149 $(INSTALL_CONF) ./files/etc/ppp/chap-secrets $(1)/etc/ppp/
150 $(INSTALL_DATA) ./files/etc/ppp/filter $(1)/etc/ppp/
151 $(INSTALL_BIN) ./files/etc/ppp/ip-up $(1)/etc/ppp/
152 $(INSTALL_DIR) $(1)/etc/ppp/ip-up.d
153 $(INSTALL_BIN) ./files/etc/ppp/ip-down $(1)/etc/ppp/
154 $(INSTALL_DIR) $(1)/etc/ppp/ip-down.d
155 $(INSTALL_BIN) ./files/etc/ppp/ipv6-up $(1)/etc/ppp/
156 $(INSTALL_BIN) ./files/etc/ppp/ipv6-down $(1)/etc/ppp/
157 $(INSTALL_DATA) ./files/etc/ppp/options $(1)/etc/ppp/
158 ln -sf /tmp/resolv.conf.ppp $(1)/etc/ppp/resolv.conf
161 define Package/ppp-mod-pppoa/install
162 $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
163 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_VERSION)/pppoatm.so \
164 $(1)/usr/lib/pppd/$(PKG_VERSION)/
165 $(INSTALL_DIR) $(1)/lib/network
166 $(INSTALL_BIN) ./files/pppoa.sh $(1)/lib/network/
167 $(INSTALL_DIR) $(1)/etc/hotplug.d/atm
168 $(INSTALL_DATA) ./files/etc/hotplug.d/atm/20-atm-modem $(1)/etc/hotplug.d/atm/
171 define Package/ppp-mod-pppoe/install
172 $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
173 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_VERSION)/rp-pppoe.so \
174 $(1)/usr/lib/pppd/$(PKG_VERSION)/
175 $(INSTALL_DIR) $(1)/lib/network
176 $(INSTALL_BIN) ./files/pppoe.sh $(1)/lib/network/
179 define Package/ppp-mod-radius/install
180 $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
181 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_VERSION)/radius.so \
182 $(1)/usr/lib/pppd/$(PKG_VERSION)/
183 $(INSTALL_DIR) $(1)/etc/ppp
184 $(INSTALL_DATA) ./files/etc/ppp/radius.conf $(1)/etc/ppp/
185 $(INSTALL_DIR) $(1)/etc/ppp/radius
186 $(INSTALL_DATA) ./files/etc/ppp/radius/dictionary* \
188 $(INSTALL_CONF) ./files/etc/ppp/radius/servers \
192 define Package/chat/install
193 $(INSTALL_DIR) $(1)/usr/sbin
194 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/chat $(1)/usr/sbin/
197 define Package/pppdump/install
198 $(INSTALL_DIR) $(1)/usr/sbin
199 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/pppdump $(1)/usr/sbin/
202 define Package/pppstats/install
203 $(INSTALL_DIR) $(1)/usr/sbin
204 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/pppstats $(1)/usr/sbin/
207 $(eval $(call BuildPackage,ppp))
208 $(eval $(call BuildPackage,ppp-mod-pppoa))
209 $(eval $(call BuildPackage,ppp-mod-pppoe))
210 $(eval $(call BuildPackage,ppp-mod-radius))
211 $(eval $(call BuildPackage,chat))
212 $(eval $(call BuildPackage,pppdump))
213 $(eval $(call BuildPackage,pppstats))