ppp: propagate master peerdns setting to dynamic slave interface
[openwrt/openwrt.git] / package / network / services / ppp / Makefile
index b320e304f25a1a19a2d87d03e3af7be15224f426..8b0daf22953f6c72b1ece888606fd0ce7eeaa6d6 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2012 OpenWrt.org
+# Copyright (C) 2006-2015 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -10,12 +10,13 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=ppp
 PKG_VERSION:=2.4.7
-PKG_RELEASE:=2
+PKG_RELEASE:=11
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/ppp/
-PKG_MD5SUM:=78818f40e6d33a1d1de68a1551f6595a
-PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
+PKG_SOURCE_URL:=https://download.samba.org/pub/ppp/
+PKG_HASH:=02e0a3dd3e4799e33103f70ec7df75348c8540966ee7c948e4ed8a42bbccfb30
+PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
+PKG_LICENSE:=BSD-4-Clause
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 
@@ -29,8 +30,7 @@ include $(INCLUDE_DIR)/package.mk
 define Package/ppp/Default
   SECTION:=net
   CATEGORY:=Network
-  MAINTAINER:=Jo-Philipp Wich <xm@subsignal.org>
-  URL:=http://ppp.samba.org/
+  URL:=https://ppp.samba.org/
 endef
 
 define Package/ppp
@@ -117,6 +117,17 @@ define Package/ppp-mod-pptp/description
 This package contains a PPtP plugin for ppp.
 endef
 
+define Package/ppp-mod-passwordfd
+$(call Package/ppp/Default)
+  DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink)
+  TITLE:=pap/chap secret from filedescriptor
+endef
+
+define Package/ppp-mod-passwordfd/description
+This package allows to pass the PAP/CHAP secret from a filedescriptor.
+Eliminates the need for a secrets file.
+endef
+
 define Package/chat
 $(call Package/ppp/Default)
   TITLE:=Establish conversation with a modem
@@ -147,6 +158,17 @@ define Package/pppstats/description
 This package contains an utility to report PPP statistics.
 endef
 
+define Package/pppoe-discovery
+$(call Package/ppp/Default)
+  DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink) +ppp-mod-pppoe
+  TITLE:=Perform a PPPoE-discovery process
+endef
+
+define Package/pppoe-discovery/description
+This tool performs the same discovery process as pppoe, but does
+not initiate a session. Can be useful to debug pppoe.
+endef
+
 
 define Build/Configure
 $(call Build/Configure/Default,, \
@@ -161,6 +183,9 @@ $(call Build/Configure/Default,, \
                $(PKG_BUILD_DIR)/pppd/plugins/pppoatm/linux/
 endef
 
+TARGET_CFLAGS += -ffunction-sections -fdata-sections
+TARGET_LDFLAGS += -Wl,--gc-sections
+
 MAKE_FLAGS += COPTS="$(TARGET_CFLAGS)" \
                PRECOMPILED_FILTER=1 \
                STAGING_DIR="$(STAGING_DIR)"
@@ -191,10 +216,11 @@ define Package/ppp/install
        $(INSTALL_CONF) ./files/etc/ppp/chap-secrets $(1)/etc/ppp/
        $(INSTALL_DATA) ./files/etc/ppp/filter $(1)/etc/ppp/
        $(INSTALL_DATA) ./files/etc/ppp/options $(1)/etc/ppp/
-       ln -sf /tmp/resolv.conf.ppp $(1)/etc/ppp/resolv.conf
+       $(LN) /tmp/resolv.conf.ppp $(1)/etc/ppp/resolv.conf
        $(INSTALL_DIR) $(1)/lib/netifd/proto
        $(INSTALL_BIN) ./files/ppp.sh $(1)/lib/netifd/proto/
        $(INSTALL_BIN) ./files/lib/netifd/ppp-up $(1)/lib/netifd/
+       $(INSTALL_BIN) ./files/lib/netifd/ppp6-up $(1)/lib/netifd/
        $(INSTALL_BIN) ./files/lib/netifd/ppp-down $(1)/lib/netifd/
 endef
 Package/ppp-multilink/install=$(Package/ppp/install)
@@ -238,6 +264,12 @@ define Package/ppp-mod-pptp/install
        $(INSTALL_DATA) ./files/etc/ppp/options.pptp $(1)/etc/ppp/
 endef
 
+define Package/ppp-mod-passwordfd/install
+       $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_VERSION)/passwordfd.so \
+               $(1)/usr/lib/pppd/$(PKG_VERSION)/
+endef
+
 define Package/chat/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/chat $(1)/usr/sbin/
@@ -253,6 +285,11 @@ define Package/pppstats/install
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/pppstats $(1)/usr/sbin/
 endef
 
+define Package/pppoe-discovery/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/pppoe-discovery $(1)/usr/sbin/
+endef
+
 $(eval $(call BuildPackage,ppp))
 $(eval $(call BuildPackage,ppp-multilink))
 $(eval $(call BuildPackage,ppp-mod-pppoa))
@@ -260,6 +297,8 @@ $(eval $(call BuildPackage,ppp-mod-pppoe))
 $(eval $(call BuildPackage,ppp-mod-radius))
 $(eval $(call BuildPackage,ppp-mod-pppol2tp))
 $(eval $(call BuildPackage,ppp-mod-pptp))
+$(eval $(call BuildPackage,ppp-mod-passwordfd))
 $(eval $(call BuildPackage,chat))
 $(eval $(call BuildPackage,pppdump))
 $(eval $(call BuildPackage,pppstats))
+$(eval $(call BuildPackage,pppoe-discovery))