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)
35 This package contains the PPP (Point-to-Point Protocol) daemon.
39 define Package/ppp-mod-pppoa
40 $(call Package/ppp/Default)
41 DEPENDS:=ppp +linux-atm +kmod-pppoa
44 This package contains a PPPoA (PPP over ATM) plugin for ppp.
47 define Package/ppp-mod-pppoe
48 $(call Package/ppp/Default)
49 DEPENDS:=ppp +kmod-pppoe
52 This package contains a PPPoE (PPP over Ethernet) plugin for ppp.
55 define Package/ppp-mod-radius
56 $(call Package/ppp/Default)
60 This package contains a RADIUS (Remote Authentication Dial-In User \\\
61 Service) plugin for ppp.
65 $(call Package/ppp/Default)
67 TITLE:=Establish conversation with a modem
69 This package contains an utility to establish conversation with other \\\
70 PPP servers (via a modem).
73 define Package/pppdump
74 $(call Package/ppp/Default)
76 TITLE:=Read PPP record file
78 This package contains an utility to read PPP record file.
81 define Package/pppstats
82 $(call Package/ppp/Default)
84 TITLE:=Report PPP statistics
86 This package contains an utility to report PPP statistics.
89 define Build/Configure
90 $(call Build/Configure/Default,, \
92 UNAME_R="$(LINUX_VERSION)" \
98 rm -rf $(PKG_INSTALL_DIR)
99 mkdir -p $(PKG_INSTALL_DIR)/usr
100 $(MAKE) -C $(PKG_BUILD_DIR) \
101 $(TARGET_CONFIGURE_OPTS) \
102 COPTS="$(TARGET_CFLAGS)" \
103 PRECOMPILED_FILTER=1 \
104 STAGING_DIR="$(STAGING_DIR)" \
105 DESTDIR="$(PKG_INSTALL_DIR)/usr" \
109 define Package/ppp/install
110 $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
111 $(INSTALL_DIR) $(1)/usr/sbin
112 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppd $(1)/usr/sbin/
113 $(INSTALL_DIR) $(1)/lib/network
114 $(INSTALL_BIN) ./files/ppp.sh $(1)/lib/network/
115 $(INSTALL_DIR) $(1)/etc/ppp
116 $(INSTALL_CONF) ./files/etc/ppp/chap-secrets $(1)/etc/ppp/
117 $(INSTALL_DATA) ./files/etc/ppp/filter $(1)/etc/ppp/
118 $(INSTALL_BIN) ./files/etc/ppp/ip-up $(1)/etc/ppp/
119 $(INSTALL_DIR) $(1)/etc/ppp/ip-up.d
120 $(INSTALL_BIN) ./files/etc/ppp/ip-down $(1)/etc/ppp/
121 $(INSTALL_DIR) $(1)/etc/ppp/ip-down.d
122 $(INSTALL_DATA) ./files/etc/ppp/options $(1)/etc/ppp/
123 ln -sf /tmp/resolv.conf.auto $(1)/etc/ppp/resolv.conf
126 define Package/ppp-mod-pppoa/install
127 $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
128 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/pppoatm.so \
129 $(1)/usr/lib/pppd/$(PKG_VERSION)/
130 $(INSTALL_DIR) $(1)/lib/network
131 $(INSTALL_BIN) ./files/pppoa.sh $(1)/lib/network/
134 define Package/ppp-mod-pppoe/install
135 $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
136 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/rp-pppoe.so \
137 $(1)/usr/lib/pppd/$(PKG_VERSION)/
138 $(INSTALL_DIR) $(1)/lib/network
139 $(INSTALL_BIN) ./files/pppoe.sh $(1)/lib/network/
142 define Package/ppp-mod-radius/install
143 $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
144 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/radius.so \
145 $(1)/usr/lib/pppd/$(PKG_VERSION)/
146 $(INSTALL_DIR) $(1)/etc/ppp
147 $(INSTALL_DATA) ./files/etc/ppp/radius.conf $(1)/etc/ppp/
148 $(INSTALL_DIR) $(1)/etc/ppp/radius
149 $(INSTALL_DATA) ./files/etc/ppp/radius/dictionary* \
151 $(INSTALL_CONF) ./files/etc/ppp/radius/servers \
155 define Package/chat/install
156 $(INSTALL_DIR) $(1)/usr/sbin
157 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/chat $(1)/usr/sbin/
160 define Package/pppdump/install
161 $(INSTALL_DIR) $(1)/usr/sbin
162 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppdump $(1)/usr/sbin/
165 define Package/pppstats/install
166 $(INSTALL_DIR) $(1)/usr/sbin
167 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppstats $(1)/usr/sbin/
170 $(eval $(call BuildPackage,ppp))
171 $(eval $(call BuildPackage,ppp-mod-pppoa))
172 $(eval $(call BuildPackage,ppp-mod-pppoe))
173 $(eval $(call BuildPackage,ppp-mod-radius))
174 $(eval $(call BuildPackage,chat))
175 $(eval $(call BuildPackage,pppdump))
176 $(eval $(call BuildPackage,pppstats))