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
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
23 PKG_BUILDDEP:=libpcap linux-atm
25 include $(INCLUDE_DIR)/package.mk
26 include $(INCLUDE_DIR)/kernel.mk
28 define Package/ppp/Default
31 URL:=http://ppp.samba.org/
35 $(call Package/ppp/Default)
40 This package contains the PPP (Point-to-Point Protocol) daemon.
44 define Package/ppp-mod-pppoa
45 $(call Package/ppp/Default)
46 DEPENDS:=ppp +linux-atm +kmod-pppoa
47 DEFAULT:=y if LINUX_2_4_AR7
50 This package contains a PPPoA (PPP over ATM) plugin for ppp.
53 define Package/ppp-mod-pppoe
54 $(call Package/ppp/Default)
56 DEPENDS:=ppp +kmod-pppoe
59 This package contains a PPPoE (PPP over Ethernet) plugin for ppp.
62 define Package/ppp-mod-radius
63 $(call Package/ppp/Default)
67 This package contains a RADIUS (Remote Authentication Dial-In User \\\
68 Service) plugin for ppp.
72 $(call Package/ppp/Default)
74 TITLE:=Establish conversation with a modem
76 This package contains an utility to establish conversation with other \\\
77 PPP servers (via a modem).
80 define Package/pppdump
81 $(call Package/ppp/Default)
83 TITLE:=Read PPP record file
85 This package contains an utility to read PPP record file.
88 define Package/pppstats
89 $(call Package/ppp/Default)
91 TITLE:=Report PPP statistics
93 This package contains an utility to report PPP statistics.
96 define Build/Configure
97 $(call Build/Configure/Default,, \
99 UNAME_R="$(LINUX_VERSION)" \
105 rm -rf $(PKG_INSTALL_DIR)
106 mkdir -p $(PKG_INSTALL_DIR)/usr
107 $(MAKE) -C $(PKG_BUILD_DIR) \
108 $(TARGET_CONFIGURE_OPTS) \
109 COPTS="$(TARGET_CFLAGS)" \
110 PRECOMPILED_FILTER=1 \
111 STAGING_DIR="$(STAGING_DIR)" \
112 DESTDIR="$(PKG_INSTALL_DIR)/usr" \
116 define Package/ppp/install
117 install -d -m0755 $(1)/usr/lib/pppd/$(PKG_VERSION)
118 install -d -m0755 $(1)/usr/sbin
119 install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/pppd $(1)/usr/sbin/
120 install -d -m0755 $(1)/lib/network
121 install -m0755 ./files/ppp.sh $(1)/lib/network/
122 install -d -m0755 $(1)/etc/ppp
123 install -m0600 ./files/etc/ppp/chap-secrets $(1)/etc/ppp/
124 install -m0644 ./files/etc/ppp/filter $(1)/etc/ppp/
125 install -m0755 ./files/etc/ppp/ip-up $(1)/etc/ppp/
126 install -d -m0755 $(1)/etc/ppp/ip-up.d
127 install -m0755 ./files/etc/ppp/ip-down $(1)/etc/ppp/
128 install -d -m0755 $(1)/etc/ppp/ip-down.d
129 install -m0644 ./files/etc/ppp/options $(1)/etc/ppp/
130 ln -sf /tmp/resolv.conf $(1)/etc/ppp/resolv.conf
133 define Package/ppp-mod-pppoa/install
134 install -d -m0755 $(1)/usr/lib/pppd/$(PKG_VERSION)
135 install -m0755 $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/pppoatm.so \
136 $(1)/usr/lib/pppd/$(PKG_VERSION)/
137 install -d -m0755 $(1)/lib/network
138 install -m0755 ./files/pppoa.sh $(1)/lib/network/
141 define Package/ppp-mod-pppoe/install
142 install -d -m0755 $(1)/usr/lib/pppd/$(PKG_VERSION)
143 install -m0755 $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/rp-pppoe.so \
144 $(1)/usr/lib/pppd/$(PKG_VERSION)/
145 install -d -m0755 $(1)/lib/network
146 install -m0755 ./files/pppoe.sh $(1)/lib/network/
149 define Package/ppp-mod-radius/install
150 install -d -m0755 $(1)/usr/lib/pppd/$(PKG_VERSION)
151 install -m0755 $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/radius.so \
152 $(1)/usr/lib/pppd/$(PKG_VERSION)/
153 install -d -m0755 $(1)/etc/ppp
154 install -m0644 ./files/etc/ppp/radius.conf $(1)/etc/ppp/
155 install -d -m0755 $(1)/etc/ppp/radius
156 install -m0644 ./files/etc/ppp/radius/dictionary* \
158 install -m0600 ./files/etc/ppp/radius/servers \
162 define Package/chat/install
163 install -d -m0755 $(1)/usr/sbin
164 install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/chat $(1)/usr/sbin/
167 define Package/pppdump/install
168 install -d -m0755 $(1)/usr/sbin
169 install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/pppdump $(1)/usr/sbin/
172 define Package/pppstats/install
173 install -d -m0755 $(1)/usr/sbin
174 install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/pppstats $(1)/usr/sbin/
177 $(eval $(call BuildPackage,ppp))
178 $(eval $(call BuildPackage,ppp-mod-pppoa))
179 $(eval $(call BuildPackage,ppp-mod-pppoe))
180 $(eval $(call BuildPackage,ppp-mod-radius))
181 $(eval $(call BuildPackage,chat))
182 $(eval $(call BuildPackage,pppdump))
183 $(eval $(call BuildPackage,pppstats))