2009-09-10 18:07:04 +08:00
|
|
|
#
|
2011-04-20 20:02:04 +08:00
|
|
|
# Copyright (C) 2006-2011 OpenWrt.org
|
2006-06-27 08:35:46 +08:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
2005-03-21 16:12:49 +08:00
|
|
|
|
2005-03-06 11:53:29 +08:00
|
|
|
include $(TOPDIR)/rules.mk
|
2010-03-29 05:55:54 +08:00
|
|
|
include $(INCLUDE_DIR)/kernel.mk
|
2005-03-06 11:53:29 +08:00
|
|
|
|
2005-05-19 02:05:44 +08:00
|
|
|
PKG_NAME:=ppp
|
2011-07-29 00:51:12 +08:00
|
|
|
PKG_VERSION:=2.4.5
|
2011-11-16 07:40:39 +08:00
|
|
|
PKG_RELEASE:=4
|
2005-05-19 02:05:44 +08:00
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
2006-05-24 15:19:27 +08:00
|
|
|
PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/ppp/
|
2011-07-29 00:51:12 +08:00
|
|
|
PKG_MD5SUM:=4621bc56167b6953ec4071043fe0ec57
|
2005-05-19 02:05:44 +08:00
|
|
|
|
2011-02-14 00:23:15 +08:00
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
|
|
|
|
2007-09-23 07:32:24 +08:00
|
|
|
PKG_BUILD_DEPENDS:=libpcap
|
2006-09-25 04:49:31 +08:00
|
|
|
|
2010-03-06 04:10:37 +08:00
|
|
|
PKG_INSTALL:=1
|
|
|
|
|
2006-06-21 10:32:39 +08:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
2005-05-19 02:05:44 +08:00
|
|
|
|
2006-09-25 04:49:31 +08:00
|
|
|
define Package/ppp/Default
|
|
|
|
SECTION:=net
|
|
|
|
CATEGORY:=Network
|
2010-09-30 18:48:37 +08:00
|
|
|
MAINTAINER:=Jo-Philipp Wich <xm@subsignal.org>
|
2006-09-25 04:49:31 +08:00
|
|
|
URL:=http://ppp.samba.org/
|
|
|
|
endef
|
|
|
|
|
2006-05-24 15:19:27 +08:00
|
|
|
define Package/ppp
|
2007-09-07 16:34:51 +08:00
|
|
|
$(call Package/ppp/Default)
|
2006-09-25 04:49:31 +08:00
|
|
|
DEPENDS:=+kmod-ppp
|
|
|
|
TITLE:=PPP daemon
|
2011-02-14 00:23:15 +08:00
|
|
|
VARIANT:=default
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/ppp-multilink
|
|
|
|
$(call Package/ppp/Default)
|
|
|
|
DEPENDS:=+kmod-ppp
|
2011-02-14 00:25:33 +08:00
|
|
|
TITLE:=PPP daemon (with multilink support)
|
2011-02-14 00:23:15 +08:00
|
|
|
VARIANT:=multilink
|
2006-05-24 15:19:27 +08:00
|
|
|
endef
|
2005-05-19 02:05:44 +08:00
|
|
|
|
2007-09-07 16:34:51 +08:00
|
|
|
define Package/ppp/description
|
2010-03-06 04:10:37 +08:00
|
|
|
This package contains the PPP (Point-to-Point Protocol) daemon.
|
2007-09-07 16:34:51 +08:00
|
|
|
endef
|
|
|
|
|
2010-10-06 01:13:07 +08:00
|
|
|
define Package/ppp/conffiles
|
|
|
|
/etc/ppp/chap-secrets
|
|
|
|
/etc/ppp/filter
|
|
|
|
/etc/ppp/ip-down
|
|
|
|
/etc/ppp/ip-up
|
|
|
|
/etc/ppp/ipv6-down
|
|
|
|
/etc/ppp/ipv6-up
|
|
|
|
/etc/ppp/options
|
|
|
|
endef
|
|
|
|
|
2006-05-24 15:19:27 +08:00
|
|
|
define Package/ppp-mod-pppoa
|
2007-09-07 16:34:51 +08:00
|
|
|
$(call Package/ppp/Default)
|
2011-02-14 00:23:15 +08:00
|
|
|
DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink) +linux-atm +kmod-pppoa
|
2006-09-25 04:49:31 +08:00
|
|
|
TITLE:=PPPoA plugin
|
2007-09-07 16:34:51 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/ppp-mod-pppoa/description
|
2010-03-06 04:10:37 +08:00
|
|
|
This package contains a PPPoA (PPP over ATM) plugin for ppp.
|
2006-05-24 15:19:27 +08:00
|
|
|
endef
|
2005-05-19 02:05:44 +08:00
|
|
|
|
2006-05-24 15:19:27 +08:00
|
|
|
define Package/ppp-mod-pppoe
|
2007-09-07 16:34:51 +08:00
|
|
|
$(call Package/ppp/Default)
|
2011-02-14 00:23:15 +08:00
|
|
|
DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink) +kmod-pppoe
|
2006-09-25 04:49:31 +08:00
|
|
|
TITLE:=PPPoE plugin
|
2007-09-07 16:34:51 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/ppp-mod-pppoe/description
|
2010-03-06 04:10:37 +08:00
|
|
|
This package contains a PPPoE (PPP over Ethernet) plugin for ppp.
|
2005-05-19 02:05:44 +08:00
|
|
|
endef
|
|
|
|
|
2006-05-24 15:19:27 +08:00
|
|
|
define Package/ppp-mod-radius
|
2007-09-07 16:34:51 +08:00
|
|
|
$(call Package/ppp/Default)
|
2011-02-14 00:23:15 +08:00
|
|
|
DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink)
|
2006-09-25 04:49:31 +08:00
|
|
|
TITLE:=RADIUS plugin
|
2007-09-07 16:34:51 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/ppp-mod-radius/description
|
2010-03-06 04:10:37 +08:00
|
|
|
This package contains a RADIUS (Remote Authentication Dial-In User Service)
|
|
|
|
plugin for ppp.
|
2006-05-24 15:19:27 +08:00
|
|
|
endef
|
|
|
|
|
2010-10-06 01:13:07 +08:00
|
|
|
define Package/ppp-mod-radius/conffiles
|
|
|
|
/etc/ppp/radius.conf
|
2010-10-06 03:32:49 +08:00
|
|
|
/etc/ppp/radius/
|
2010-10-06 01:13:07 +08:00
|
|
|
endef
|
|
|
|
|
2006-05-24 15:19:27 +08:00
|
|
|
define Package/chat
|
2007-09-07 16:34:51 +08:00
|
|
|
$(call Package/ppp/Default)
|
2011-02-14 00:23:15 +08:00
|
|
|
DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink)
|
2006-09-25 04:49:31 +08:00
|
|
|
TITLE:=Establish conversation with a modem
|
2007-09-07 16:34:51 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/chat/description
|
2010-03-06 04:10:37 +08:00
|
|
|
This package contains an utility to establish conversation with other PPP servers
|
|
|
|
(via a modem).
|
2006-05-24 15:19:27 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/pppdump
|
2007-09-07 16:34:51 +08:00
|
|
|
$(call Package/ppp/Default)
|
2011-02-14 00:23:15 +08:00
|
|
|
DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink)
|
2006-09-25 04:49:31 +08:00
|
|
|
TITLE:=Read PPP record file
|
2007-09-07 16:34:51 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/pppdump/description
|
2010-03-06 04:10:37 +08:00
|
|
|
This package contains an utility to read PPP record file.
|
2006-05-24 15:19:27 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/pppstats
|
2007-09-07 16:34:51 +08:00
|
|
|
$(call Package/ppp/Default)
|
2011-02-14 00:23:15 +08:00
|
|
|
DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink)
|
2006-09-25 04:49:31 +08:00
|
|
|
TITLE:=Report PPP statistics
|
2006-05-24 15:19:27 +08:00
|
|
|
endef
|
|
|
|
|
2007-09-07 16:34:51 +08:00
|
|
|
define Package/pppstats/description
|
2010-03-06 04:10:37 +08:00
|
|
|
This package contains an utility to report PPP statistics.
|
2007-09-07 16:34:51 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
|
2006-09-28 01:33:45 +08:00
|
|
|
define Build/Configure
|
|
|
|
$(call Build/Configure/Default,, \
|
|
|
|
UNAME_S="Linux" \
|
|
|
|
UNAME_R="$(LINUX_VERSION)" \
|
|
|
|
UNAME_M="$(ARCH)" \
|
|
|
|
)
|
2010-03-29 05:55:54 +08:00
|
|
|
mkdir -p $(PKG_BUILD_DIR)/pppd/plugins/pppoatm/linux
|
|
|
|
cp \
|
|
|
|
$(LINUX_DIR)/include/linux/compiler.h \
|
|
|
|
$(LINUX_DIR)/include/linux/atm*.h \
|
|
|
|
$(PKG_BUILD_DIR)/pppd/plugins/pppoatm/linux/
|
2006-09-28 01:33:45 +08:00
|
|
|
endef
|
|
|
|
|
2010-03-06 04:10:37 +08:00
|
|
|
MAKE_FLAGS += COPTS="$(TARGET_CFLAGS)" \
|
2006-05-24 15:19:27 +08:00
|
|
|
PRECOMPILED_FILTER=1 \
|
2010-03-06 04:10:37 +08:00
|
|
|
STAGING_DIR="$(STAGING_DIR)"
|
2005-08-26 23:52:12 +08:00
|
|
|
|
2011-02-14 00:23:15 +08:00
|
|
|
ifeq ($(BUILD_VARIANT),multilink)
|
|
|
|
MAKE_FLAGS += HAVE_MULTILINK=y
|
|
|
|
else
|
|
|
|
MAKE_FLAGS += HAVE_MULTILINK=
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
2008-08-22 13:02:04 +08:00
|
|
|
define Build/InstallDev
|
|
|
|
$(INSTALL_DIR) $(1)/usr/include
|
2010-03-06 04:10:37 +08:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/include/pppd $(1)/usr/include/
|
2008-08-22 13:03:37 +08:00
|
|
|
endef
|
2008-08-22 13:02:04 +08:00
|
|
|
|
2006-05-24 15:19:27 +08:00
|
|
|
define Package/ppp/install
|
2006-11-23 08:29:07 +08:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
|
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
2010-03-06 04:10:37 +08:00
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/pppd $(1)/usr/sbin/
|
2006-11-23 08:29:07 +08:00
|
|
|
$(INSTALL_DIR) $(1)/lib/network
|
|
|
|
$(INSTALL_BIN) ./files/ppp.sh $(1)/lib/network/
|
|
|
|
$(INSTALL_DIR) $(1)/etc/ppp
|
2007-01-05 23:34:48 +08:00
|
|
|
$(INSTALL_CONF) ./files/etc/ppp/chap-secrets $(1)/etc/ppp/
|
2006-11-23 08:29:07 +08:00
|
|
|
$(INSTALL_DATA) ./files/etc/ppp/filter $(1)/etc/ppp/
|
|
|
|
$(INSTALL_BIN) ./files/etc/ppp/ip-up $(1)/etc/ppp/
|
|
|
|
$(INSTALL_DIR) $(1)/etc/ppp/ip-up.d
|
|
|
|
$(INSTALL_BIN) ./files/etc/ppp/ip-down $(1)/etc/ppp/
|
|
|
|
$(INSTALL_DIR) $(1)/etc/ppp/ip-down.d
|
2007-11-07 21:24:10 +08:00
|
|
|
$(INSTALL_BIN) ./files/etc/ppp/ipv6-up $(1)/etc/ppp/
|
|
|
|
$(INSTALL_BIN) ./files/etc/ppp/ipv6-down $(1)/etc/ppp/
|
2006-11-23 08:29:07 +08:00
|
|
|
$(INSTALL_DATA) ./files/etc/ppp/options $(1)/etc/ppp/
|
2010-05-07 09:22:48 +08:00
|
|
|
ln -sf /tmp/resolv.conf.ppp $(1)/etc/ppp/resolv.conf
|
2006-05-24 15:19:27 +08:00
|
|
|
endef
|
2011-02-14 00:23:15 +08:00
|
|
|
Package/ppp-multilink/install=$(Package/ppp/install)
|
2010-10-06 01:13:07 +08:00
|
|
|
|
2006-05-24 15:19:27 +08:00
|
|
|
define Package/ppp-mod-pppoa/install
|
2006-11-23 08:29:07 +08:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
|
2010-03-06 04:10:37 +08:00
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_VERSION)/pppoatm.so \
|
2006-05-24 15:19:27 +08:00
|
|
|
$(1)/usr/lib/pppd/$(PKG_VERSION)/
|
2006-11-23 08:29:07 +08:00
|
|
|
$(INSTALL_DIR) $(1)/lib/network
|
|
|
|
$(INSTALL_BIN) ./files/pppoa.sh $(1)/lib/network/
|
2010-05-03 00:40:58 +08:00
|
|
|
$(INSTALL_DIR) $(1)/etc/hotplug.d/atm
|
2010-05-03 00:47:16 +08:00
|
|
|
$(INSTALL_DATA) ./files/etc/hotplug.d/atm/20-atm-modem $(1)/etc/hotplug.d/atm/
|
2006-05-24 15:19:27 +08:00
|
|
|
endef
|
2005-05-19 02:05:44 +08:00
|
|
|
|
2006-05-24 15:19:27 +08:00
|
|
|
define Package/ppp-mod-pppoe/install
|
2006-11-23 08:29:07 +08:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
|
2010-03-06 04:10:37 +08:00
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_VERSION)/rp-pppoe.so \
|
2006-05-24 15:19:27 +08:00
|
|
|
$(1)/usr/lib/pppd/$(PKG_VERSION)/
|
2006-11-23 08:29:07 +08:00
|
|
|
$(INSTALL_DIR) $(1)/lib/network
|
|
|
|
$(INSTALL_BIN) ./files/pppoe.sh $(1)/lib/network/
|
2006-05-24 15:19:27 +08:00
|
|
|
endef
|
2005-05-19 02:05:44 +08:00
|
|
|
|
2006-05-24 15:19:27 +08:00
|
|
|
define Package/ppp-mod-radius/install
|
2006-11-23 08:29:07 +08:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
|
2010-03-06 04:10:37 +08:00
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_VERSION)/radius.so \
|
2006-09-25 04:49:31 +08:00
|
|
|
$(1)/usr/lib/pppd/$(PKG_VERSION)/
|
2006-11-23 08:29:07 +08:00
|
|
|
$(INSTALL_DIR) $(1)/etc/ppp
|
|
|
|
$(INSTALL_DATA) ./files/etc/ppp/radius.conf $(1)/etc/ppp/
|
|
|
|
$(INSTALL_DIR) $(1)/etc/ppp/radius
|
|
|
|
$(INSTALL_DATA) ./files/etc/ppp/radius/dictionary* \
|
2006-05-24 15:19:27 +08:00
|
|
|
$(1)/etc/ppp/radius/
|
2007-01-05 23:34:48 +08:00
|
|
|
$(INSTALL_CONF) ./files/etc/ppp/radius/servers \
|
2006-05-24 15:19:27 +08:00
|
|
|
$(1)/etc/ppp/radius/
|
|
|
|
endef
|
2005-05-19 02:05:44 +08:00
|
|
|
|
2006-05-24 15:19:27 +08:00
|
|
|
define Package/chat/install
|
2006-11-23 08:29:07 +08:00
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
2010-03-06 04:10:37 +08:00
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/chat $(1)/usr/sbin/
|
2006-05-24 15:19:27 +08:00
|
|
|
endef
|
2005-05-19 02:05:44 +08:00
|
|
|
|
2006-05-24 15:19:27 +08:00
|
|
|
define Package/pppdump/install
|
2006-11-23 08:29:07 +08:00
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
2010-03-06 04:10:37 +08:00
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/pppdump $(1)/usr/sbin/
|
2006-05-24 15:19:27 +08:00
|
|
|
endef
|
2005-05-19 02:05:44 +08:00
|
|
|
|
2006-05-24 15:19:27 +08:00
|
|
|
define Package/pppstats/install
|
2006-11-23 08:29:07 +08:00
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
2010-03-06 04:10:37 +08:00
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/pppstats $(1)/usr/sbin/
|
2006-05-24 15:19:27 +08:00
|
|
|
endef
|
2005-05-19 02:05:44 +08:00
|
|
|
|
2006-05-24 15:19:27 +08:00
|
|
|
$(eval $(call BuildPackage,ppp))
|
2011-02-14 00:23:15 +08:00
|
|
|
$(eval $(call BuildPackage,ppp-multilink))
|
2006-05-24 15:19:27 +08:00
|
|
|
$(eval $(call BuildPackage,ppp-mod-pppoa))
|
|
|
|
$(eval $(call BuildPackage,ppp-mod-pppoe))
|
|
|
|
$(eval $(call BuildPackage,ppp-mod-radius))
|
|
|
|
$(eval $(call BuildPackage,chat))
|
|
|
|
$(eval $(call BuildPackage,pppdump))
|
|
|
|
$(eval $(call BuildPackage,pppstats))
|