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