base-files: fix wan6 interface config generation for pppoe
[openwrt/openwrt.git] / package / base-files / Makefile
index 5cfb0190801a52be5327d4250921b743a394e5fd..18ebe6064360f38385aa27c22d63e13e4760a66b 100644 (file)
@@ -11,29 +11,27 @@ include $(INCLUDE_DIR)/kernel.mk
 include $(INCLUDE_DIR)/version.mk
 
 PKG_NAME:=base-files
-PKG_RELEASE:=169
+PKG_RELEASE:=173.1
 PKG_FLAGS:=nonshared
 
 PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
 PKG_BUILD_DEPENDS:=usign/host
 PKG_LICENSE:=GPL-2.0
 
-PKG_CONFIG_DEPENDS := CONFIG_SIGNED_PACKAGES CONFIG_TARGET_INIT_PATH CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE
+# Extend depends from version.mk
+PKG_CONFIG_DEPENDS += CONFIG_SIGNED_PACKAGES CONFIG_TARGET_INIT_PATH CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE
 
 include $(INCLUDE_DIR)/package.mk
 
 ifneq ($(DUMP),1)
-  STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell $(SH_FUNC) echo $(CONFIG_TARGET_INIT_PATH) | md5s)
+  STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell echo $(CONFIG_TARGET_INIT_PATH) | mkhash md5)
   TARGET:=-$(BOARD)
-  ifneq ($(wildcard $(PLATFORM_DIR)/base-files-$(PROFILE) $(PLATFORM_SUBDIR)/base-files-$(PROFILE)),)
-    TARGET:=$(TARGET)-$(PROFILE)
-  endif
 endif
 
 define Package/base-files
   SECTION:=base
   CATEGORY:=Base system
-  DEPENDS:=+netifd +libc +procd +jsonfilter +SIGNED_PACKAGES:usign +SIGNED_PACKAGES:lede-keyring +fstools
+  DEPENDS:=+netifd +libc +procd +jsonfilter +SIGNED_PACKAGES:usign +SIGNED_PACKAGES:lede-keyring +fstools +fwtool
   TITLE:=Base filesystem for Lede
   URL:=http://openwrt.org/
   VERSION:=$(PKG_RELEASE)-$(REVISION)
@@ -60,6 +58,7 @@ define Package/base-files/conffiles
 /etc/sysctl.d/local.conf
 /etc/sysctl.d/
 /etc/iproute2/rt_tables
+/etc/iproute2/rt_protos
 $(call $(TARGET)/conffiles)
 endef
 
@@ -67,7 +66,6 @@ define Package/base-files/description
  This package contains a base filesystem and system scripts for OpenWrt.
 endef
 
-ifneq ($(CONFIG_PREINITOPT),)
 define ImageConfigOptions
        mkdir -p $(1)/lib/preinit
        echo 'pi_suppress_stderr="$(CONFIG_TARGET_PREINIT_SUPPRESS_STDERR)"' >$(1)/lib/preinit/00_preinit.conf
@@ -84,7 +82,6 @@ define ImageConfigOptions
        echo 'pi_preinit_no_failsafe_netmsg="$(CONFIG_TARGET_PREINIT_SUPPRESS_FAILSAFE_NETMSG)"' >>$(1)/lib/preinit/00_preinit.conf
        echo 'pi_preinit_no_failsafe="$(CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE)"' >>$(1)/lib/preinit/00_preinit.conf
 endef
-endif
 
 define Build/Prepare
        mkdir -p $(PKG_BUILD_DIR)
@@ -118,22 +115,10 @@ define Package/base-files/install
        if [ -d $(PLATFORM_DIR)/base-files/. ]; then \
                $(CP) $(PLATFORM_DIR)/base-files/* $(1)/; \
        fi
-       if [ -d $(PLATFORM_DIR)/base-files-$(PROFILE)/. ]; then \
-               $(CP) $(PLATFORM_DIR)/base-files-$(PROFILE)/* $(1)/; \
-       fi
-       if [ -d $(PLATFORM_DIR)/$(PROFILE)/base-files/. ]; then \
-               $(CP) $(PLATFORM_DIR)/$(PROFILE)/base-files/* $(1)/; \
-       fi
        $(if $(filter-out $(PLATFORM_DIR),$(PLATFORM_SUBDIR)), \
                if [ -d $(PLATFORM_SUBDIR)/base-files/. ]; then \
                        $(CP) $(PLATFORM_SUBDIR)/base-files/* $(1)/; \
                fi; \
-               if [ -d $(PLATFORM_SUBDIR)/base-files-$(PROFILE)/. ]; then \
-                       $(CP) $(PLATFORM_SUBDIR)/base-files-$(PROFILE)/* $(1)/; \
-               fi; \
-               if [ -d $(PLATFORM_SUBDIR)/$(PROFILE)/base-files/. ]; then \
-                       $(CP) $(PLATFORM_SUBDIR)/$(PROFILE)/base-files/* $(1)/; \
-               fi \
        )
 
        $(VERSION_SED) \
@@ -188,6 +173,7 @@ endef
 
 ifneq ($(DUMP),1)
   -include $(PLATFORM_DIR)/base-files.mk
+  -include $(PLATFORM_SUBDIR)/base-files.mk
 endif
 
 $(eval $(call BuildPackage,base-files))