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
14 PKG_BUILDDEP:=libpcap linux-atm
16 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
18 PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/ppp/
19 PKG_MD5SUM:=848f6c3cafeb6074ffeb293c3af79b7c
22 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
24 include $(INCLUDE_DIR)/package.mk
32 DESCRIPTION:=PPP (Point-to-Point Protocol) daemon
33 URL:=http://ppp.samba.org/
36 define Package/ppp-mod-pppoa
39 DEPENDS:=ppp +linux-atm
41 DESCRIPTION:=PPPoA (PPP over ATM) plugin for ppp
44 define Package/ppp-mod-pppoe
50 DESCRIPTION:=PPPoE (PPP over Ethernet) plugin for ppp
53 define Package/ppp-mod-radius
58 DESCRIPTION:=RADIUS (Remote Authentication Dial-In User Service) plugin for ppp
65 TITLE:=Establish conversation with a modem
66 DESCRIPTION:=Utility to establish conversation with other PPP servers (via a modem)
69 define Package/pppdump
73 TITLE:=Read PPP record file
74 DESCRIPTION:=Utility to read PPP record file
77 define Package/pppstats
81 TITLE:=Report PPP statistics
82 DESCRIPTION:=Utility to report PPP statistics
86 rm -rf $(PKG_INSTALL_DIR)
87 mkdir -p $(PKG_INSTALL_DIR)/usr
88 $(MAKE) -C $(PKG_BUILD_DIR) \
90 COPTS="$(TARGET_CFLAGS)" \
91 PRECOMPILED_FILTER=1 \
92 STAGING_DIR="$(STAGING_DIR)" \
93 DESTDIR="$(PKG_INSTALL_DIR)/usr" \
97 define Package/ppp/install
98 install -d -m0755 $(1)/lib/network
99 install -m0755 ./files/ppp.sh $(1)/lib/network/
100 install -d -m0755 $(1)/etc/ppp
101 install -m0600 ./files/etc/ppp/chap-secrets $(1)/etc/ppp/
102 install -m0644 ./files/etc/ppp/filter $(1)/etc/ppp/
103 install -m0755 ./files/etc/ppp/ip-up $(1)/etc/ppp/
104 install -d -m0755 $(1)/etc/ppp/ip-up.d
105 install -m0755 ./files/etc/ppp/ip-down $(1)/etc/ppp/
106 install -d -m0755 $(1)/etc/ppp/ip-down.d
107 install -m0644 ./files/etc/ppp/options $(1)/etc/ppp/
108 ln -sf /tmp/resolv.conf $(1)/etc/ppp/resolv.conf
109 install -d -m0755 $(1)/usr/lib/pppd/$(PKG_VERSION)
110 install -d -m0755 $(1)/usr/sbin
111 install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/pppd $(1)/usr/sbin/
114 define Package/ppp-mod-pppoa/install
115 install -d -m0755 $(1)/lib/network
116 install -m0755 ./files/pppoa.sh $(1)/lib/network/
117 install -d -m0755 $(1)/usr/lib/pppd/$(PKG_VERSION)
118 install -m0755 $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/pppoatm.so \
119 $(1)/usr/lib/pppd/$(PKG_VERSION)/
122 define Package/ppp-mod-pppoe/install
123 install -d -m0755 $(1)/lib/network
124 install -m0755 ./files/pppoe.sh $(1)/lib/network/
125 install -d -m0755 $(1)/usr/lib/pppd/$(PKG_VERSION)
126 install -m0755 $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/rp-pppoe.so \
127 $(1)/usr/lib/pppd/$(PKG_VERSION)/
130 define Package/ppp-mod-radius/install
131 install -d -m0755 $(1)/etc/ppp
132 install -m644 ./files/etc/ppp/radius.conf $(1)/etc/ppp/
133 install -d -m0755 $(1)/etc/ppp/radius
134 install -m644 ./files/etc/ppp/radius/dictionary* \
136 install -m600 ./files/etc/ppp/radius/servers \
138 install -d -m0755 $(1)/usr/lib/pppd/$(PKG_VERSION)
139 install -m0755 $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/radius.so \
140 $(1)/usr/lib/pppd/$(PKG_VERSION)/
143 define Package/chat/install
144 install -d -m0755 $(1)/usr/sbin
145 install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/chat $(1)/usr/sbin/
148 define Package/pppdump/install
149 install -d -m0755 $(1)/usr/sbin
150 install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/pppdump $(1)/usr/sbin/
153 define Package/pppstats/install
154 install -d -m0755 $(1)/usr/sbin
155 install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/pppstats $(1)/usr/sbin/
158 $(eval $(call BuildPackage,ppp))
159 $(eval $(call BuildPackage,ppp-mod-pppoa))
160 $(eval $(call BuildPackage,ppp-mod-pppoe))
161 $(eval $(call BuildPackage,ppp-mod-radius))
162 $(eval $(call BuildPackage,chat))
163 $(eval $(call BuildPackage,pppdump))
164 $(eval $(call BuildPackage,pppstats))