74 lines
1.9 KiB
Makefile
Raw Normal View History

# SPDX-License-Identifier: GPL-3.0-only
2019-11-08 22:57:22 +08:00
#
# Copyright (C) 2020 Lean <coolsnowwolf@gmail.com>
# Copyright (C) 2021 ImmortalWrt.org
2019-11-08 22:57:22 +08:00
include $(TOPDIR)/rules.mk
PKG_NAME:=autocore
PKG_FLAGS:=nonshared
PKG_RELEASE:=$(COMMITCOUNT)
2019-11-08 22:57:22 +08:00
PKG_CONFIG_DEPENDS:= \
CONFIG_TARGET_bcm27xx \
CONFIG_TARGET_bcm53xx
2019-11-08 22:57:22 +08:00
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/target.mk
2019-11-08 22:57:22 +08:00
2020-07-19 21:51:04 +08:00
define Package/autocore-arm
TITLE:=ARM auto core script.
MAINTAINER:=CN_SZTL
DEPENDS:=@(arm||aarch64) \
+TARGET_bcm27xx:bcm27xx-userland \
+TARGET_bcm53xx:nvram
2020-07-19 21:51:04 +08:00
VARIANT:=arm
endef
define Package/autocore-x86
2019-11-08 22:57:22 +08:00
TITLE:=x86/x64 auto core loadbalance script.
2020-07-19 21:51:04 +08:00
MAINTAINER:=Lean / CN_SZTL
DEPENDS:=@TARGET_x86 +lm-sensors +ethtool
2020-07-19 21:51:04 +08:00
VARIANT:=x86
endef
2019-11-08 22:57:22 +08:00
define Build/Compile
endef
define Package/autocore/install/Default
2022-03-26 05:36:38 +08:00
$(INSTALL_DIR) $(1)/etc
$(CP) ./files/generic/10_system.js $(1)/etc/rpcd_10_system.js
$(CP) ./files/generic/luci $(1)/etc/rpcd_luci
2020-07-19 21:51:04 +08:00
$(INSTALL_DIR) $(1)/etc/uci-defaults
2022-03-26 05:36:38 +08:00
$(INSTALL_BIN) ./files/generic/090-cover-index_files $(1)/etc/uci-defaults/
2020-07-19 21:51:04 +08:00
$(INSTALL_DIR) $(1)/sbin
2022-03-26 05:36:38 +08:00
$(INSTALL_BIN) ./files/generic/cpuinfo $(1)/sbin/
$(INSTALL_BIN) ./files/generic/ethinfo $(1)/sbin/
$(INSTALL_DIR) $(1)/usr/share/rpcd/acl.d
$(CP) ./files/generic/luci-mod-status-autocore.json $(1)/usr/share/rpcd/acl.d/
$(INSTALL_DIR) $(1)/www/luci-static/resources/view/status/include
$(INSTALL_DATA) ./files/generic/21_ethinfo.js $(1)/www/luci-static/resources/view/status/include/
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
2020-07-19 22:08:47 +08:00
endef
2020-07-19 21:51:04 +08:00
define Package/autocore-x86/install
$(call Package/autocore/install/Default,$(1))
2019-11-08 22:57:22 +08:00
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/x86/autocore $(1)/etc/init.d/
2019-11-08 22:57:22 +08:00
endef
2020-07-19 21:51:04 +08:00
$(eval $(call BuildPackage,autocore-arm))
$(eval $(call BuildPackage,autocore-x86))