build: introduce $(MKHASH)
[openwrt/staging/dedeckeh.git] / package / base-files / Makefile
index f63c4db5339d0896e95fa633f7c7be7cc1fab4f2..d8d093a3068d0cbf55d63f8fe79df2969994309f 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2007-2016 OpenWrt.org
+# Copyright (C) 2007-2021 OpenWrt.org
 # Copyright (C) 2010 Vertical Communications
 #
 # This is free software, licensed under the GNU General Public License v2.
@@ -12,8 +12,8 @@ include $(INCLUDE_DIR)/version.mk
 include $(INCLUDE_DIR)/feeds.mk
 
 PKG_NAME:=base-files
-PKG_RELEASE:=235
 PKG_FLAGS:=nonshared
+PKG_RELEASE:=$(COMMITCOUNT)
 
 PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
 PKG_BUILD_DEPENDS:=usign/host ucert/host
@@ -30,7 +30,7 @@ PKG_CONFIG_DEPENDS += \
 include $(INCLUDE_DIR)/package.mk
 
 ifneq ($(DUMP),1)
-  STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell echo $(CONFIG_TARGET_INIT_PATH) | mkhash md5)
+  STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell echo $(CONFIG_TARGET_INIT_PATH) | $(MKHASH) md5)
   TARGET:=-$(BOARD)
 endif
 
@@ -202,6 +202,9 @@ define Package/base-files/install
                $(VERSION_SED_SCRIPT) $(1)/etc/opkg/distfeeds.conf)
        $(if $(CONFIG_IPK_FILES_CHECKSUMS),, \
                rm -f $(1)/sbin/pkg_check)
+
+       $(if $(CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE), \
+               rm -f $(1)/etc/banner.failsafe,)
 endef
 
 ifneq ($(DUMP),1)