autocore: merge arm/x86 variant
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
parent
c958bed9d5
commit
6e35857807
@ -1,48 +1,51 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2020 Lean <coolsnowwolf@gmail.com>
|
||||
# Copyright (C) 2021 ImmortalWrt.org
|
||||
# Copyright (C) 2021-2023 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=autocore
|
||||
PKG_FLAGS:=nonshared
|
||||
PKG_RELEASE:=$(COMMITCOUNT)
|
||||
PKG_RELEASE:=41
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_TARGET_bcm27xx \
|
||||
CONFIG_TARGET_bcm53xx \
|
||||
CONFIG_TARGET_mvebu
|
||||
CONFIG_TARGET_mvebu \
|
||||
CONFIG_TARGET_x86
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/target.mk
|
||||
|
||||
define Package/autocore-arm
|
||||
TITLE:=ARM auto core script.
|
||||
MAINTAINER:=CN_SZTL
|
||||
DEPENDS:=@(arm||aarch64) \
|
||||
define Package/autocore
|
||||
TITLE:=auto core loadbalance script.
|
||||
DEPENDS:=@(aarch64||arm||i386||i686||x86_64) \
|
||||
+TARGET_bcm27xx:bcm27xx-userland \
|
||||
+TARGET_bcm53xx:nvram \
|
||||
+TARGET_mvebu:mhz
|
||||
VARIANT:=arm
|
||||
endef
|
||||
|
||||
define Package/autocore-x86
|
||||
TITLE:=x86/x64 auto core loadbalance script.
|
||||
MAINTAINER:=Lean / CN_SZTL
|
||||
DEPENDS:=@TARGET_x86 +lm-sensors +ethtool
|
||||
VARIANT:=x86
|
||||
+TARGET_mvebu:mhz \
|
||||
+TARGET_x86:ethtool \
|
||||
+TARGET_x86:lm-sensors
|
||||
PROVIDES:=autocore-arm autocore-x86
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/autocore/install/Default
|
||||
define Package/autocore/install
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||
$(INSTALL_BIN) ./files/generic/60-autocore-reload-rpcd $(1)/etc/uci-defaults/
|
||||
|
||||
ifneq ($(filter i386 i686 x86_64, $(ARCH)),)
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/x86/autocore $(1)/etc/init.d/
|
||||
endif
|
||||
|
||||
$(INSTALL_DIR) $(1)/sbin
|
||||
$(INSTALL_BIN) ./files/generic/cpuinfo $(1)/sbin/
|
||||
ifneq ($(filter ipq% %mt7622, $(TARGETID)),)
|
||||
$(INSTALL_BIN) ./files/arm/tempinfo $(1)/sbin/
|
||||
endif
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/share/rpcd/acl.d
|
||||
$(CP) ./files/generic/luci-mod-status-autocore.json $(1)/usr/share/rpcd/acl.d/
|
||||
@ -54,20 +57,4 @@ ifeq ($(filter ipq806x%, $(TARGETID)),)
|
||||
endif
|
||||
endef
|
||||
|
||||
define Package/autocore-arm/install
|
||||
$(call Package/autocore/install/Default,$(1))
|
||||
|
||||
ifneq ($(filter ipq% %mt7622, $(TARGETID)),)
|
||||
$(INSTALL_BIN) ./files/arm/tempinfo $(1)/sbin/
|
||||
endif
|
||||
endef
|
||||
|
||||
define Package/autocore-x86/install
|
||||
$(call Package/autocore/install/Default,$(1))
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/x86/autocore $(1)/etc/init.d/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,autocore-arm))
|
||||
$(eval $(call BuildPackage,autocore-x86))
|
||||
$(eval $(call BuildPackage,autocore))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user