2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR)/rules.mk
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/ppp/
17 PKG_MD5SUM:=848f6c3cafeb6074ffeb293c3af79b7c
19 PKG_BUILD_DEPENDS:=libpcap linux-atm
21 include $(INCLUDE_DIR)/package.mk
22 include $(INCLUDE_DIR)/kernel.mk
24 define Package/ppp/Default
27 URL:=http://ppp.samba.org/
31 $(call Package/ppp/Default)
37 define Package/ppp/description
38 This package contains the PPP (Point-to-Point Protocol) daemon.
41 define Package/ppp-mod-pppoa
42 $(call Package/ppp/Default)
43 DEPENDS:=ppp +linux-atm +kmod-pppoa
47 define Package/ppp-mod-pppoa/description
48 This package contains a PPPoA (PPP over ATM) plugin for ppp.
51 define Package/ppp-mod-pppoe
52 $(call Package/ppp/Default)
53 DEPENDS:=ppp +kmod-pppoe
57 define Package/ppp-mod-pppoe/description
58 This package contains a PPPoE (PPP over Ethernet) plugin for ppp.
61 define Package/ppp-mod-radius
62 $(call Package/ppp/Default)
67 define Package/ppp-mod-radius/description
68 This package contains a RADIUS (Remote Authentication Dial-In User
69 Service) plugin for ppp.
73 $(call Package/ppp/Default)
75 TITLE:=Establish conversation with a modem
78 define Package/chat/description
79 This package contains an utility to establish conversation with other
80 PPP servers (via a modem).
83 define Package/pppdump
84 $(call Package/ppp/Default)
86 TITLE:=Read PPP record file
89 define Package/pppdump/description
90 This package contains an utility to read PPP record file.
93 define Package/pppstats
94 $(call Package/ppp/Default)
96 TITLE:=Report PPP statistics
99 define Package/pppstats/description
100 This package contains an utility to report PPP statistics.
104 define Build/Configure
105 $(call Build/Configure/Default,, \
107 UNAME_R="$(LINUX_VERSION)" \
113 rm -rf $(PKG_INSTALL_DIR)
114 mkdir -p $(PKG_INSTALL_DIR)/usr
115 $(MAKE) -C $(PKG_BUILD_DIR) \
116 $(TARGET_CONFIGURE_OPTS) \
117 COPTS="$(TARGET_CFLAGS)" \
118 PRECOMPILED_FILTER=1 \
119 STAGING_DIR="$(STAGING_DIR)" \
120 DESTDIR="$(PKG_INSTALL_DIR)/usr" \
124 define Package/ppp/install
125 $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
126 $(INSTALL_DIR) $(1)/usr/sbin
127 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppd $(1)/usr/sbin/
128 $(INSTALL_DIR) $(1)/lib/network
129 $(INSTALL_BIN) ./files/ppp.sh $(1)/lib/network/
130 $(INSTALL_DIR) $(1)/etc/ppp
131 $(INSTALL_CONF) ./files/etc/ppp/chap-secrets $(1)/etc/ppp/
132 $(INSTALL_DATA) ./files/etc/ppp/filter $(1)/etc/ppp/
133 $(INSTALL_BIN) ./files/etc/ppp/ip-up $(1)/etc/ppp/
134 $(INSTALL_DIR) $(1)/etc/ppp/ip-up.d
135 $(INSTALL_BIN) ./files/etc/ppp/ip-down $(1)/etc/ppp/
136 $(INSTALL_DIR) $(1)/etc/ppp/ip-down.d
137 $(INSTALL_DATA) ./files/etc/ppp/options $(1)/etc/ppp/
138 ln -sf /tmp/resolv.conf.auto $(1)/etc/ppp/resolv.conf
141 define Package/ppp-mod-pppoa/install
142 $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
143 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/pppoatm.so \
144 $(1)/usr/lib/pppd/$(PKG_VERSION)/
145 $(INSTALL_DIR) $(1)/lib/network
146 $(INSTALL_BIN) ./files/pppoa.sh $(1)/lib/network/
149 define Package/ppp-mod-pppoe/install
150 $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
151 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/rp-pppoe.so \
152 $(1)/usr/lib/pppd/$(PKG_VERSION)/
153 $(INSTALL_DIR) $(1)/lib/network
154 $(INSTALL_BIN) ./files/pppoe.sh $(1)/lib/network/
157 define Package/ppp-mod-radius/install
158 $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
159 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/radius.so \
160 $(1)/usr/lib/pppd/$(PKG_VERSION)/
161 $(INSTALL_DIR) $(1)/etc/ppp
162 $(INSTALL_DATA) ./files/etc/ppp/radius.conf $(1)/etc/ppp/
163 $(INSTALL_DIR) $(1)/etc/ppp/radius
164 $(INSTALL_DATA) ./files/etc/ppp/radius/dictionary* \
166 $(INSTALL_CONF) ./files/etc/ppp/radius/servers \
170 define Package/chat/install
171 $(INSTALL_DIR) $(1)/usr/sbin
172 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/chat $(1)/usr/sbin/
175 define Package/pppdump/install
176 $(INSTALL_DIR) $(1)/usr/sbin
177 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppdump $(1)/usr/sbin/
180 define Package/pppstats/install
181 $(INSTALL_DIR) $(1)/usr/sbin
182 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppstats $(1)/usr/sbin/
185 $(eval $(call BuildPackage,ppp))
186 $(eval $(call BuildPackage,ppp-mod-pppoa))
187 $(eval $(call BuildPackage,ppp-mod-pppoe))
188 $(eval $(call BuildPackage,ppp-mod-radius))
189 $(eval $(call BuildPackage,chat))
190 $(eval $(call BuildPackage,pppdump))
191 $(eval $(call BuildPackage,pppstats))