ppp: Split the ppp-up for the IPv6 part
[openwrt/openwrt.git] / package / network / services / ppp / Makefile
index d8cecc4c5988602985f438f6f3b9b04625091ab6..2b78761ea51e9556f7e9b660f96c59ec6519ac99 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2014 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,17 +10,14 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=ppp
 PKG_VERSION:=2.4.7
-PKG_RELEASE:=4
+PKG_RELEASE:=10
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/ppp/
+PKG_SOURCE_URL:=https://download.samba.org/pub/ppp/
 PKG_MD5SUM:=78818f40e6d33a1d1de68a1551f6595a
-PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
+PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
 PKG_LICENSE:=BSD-4-Clause
 
-PKG_LICENSE:=BSD-3-Clause BSD-4-Clause
-PKG_LICENSE_FILES:=
-
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 
 PKG_BUILD_DEPENDS:=libpcap
@@ -120,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
@@ -194,10 +202,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)
@@ -241,6 +250,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/
@@ -263,6 +278,7 @@ $(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))