OSDN Git Service

0aea3e361eea896f13c4395c6ae69fddb60807e1
[immortalwrt/immortalwrt.git] / package / emortal / autocore / Makefile
1 # SPDX-License-Identifier: GPL-3.0-only
2 #
3 # Copyright (C) 2020 Lean <coolsnowwolf@gmail.com>
4 # Copyright (C) 2021 ImmortalWrt.org
5
6 include $(TOPDIR)/rules.mk
7
8 PKG_NAME:=autocore
9 PKG_VERSION:=2
10 PKG_RELEASE:=$(COMMITCOUNT)
11
12 PKG_CONFIG_DEPENDS:= \
13         CONFIG_TARGET_bcm27xx \
14         CONFIG_TARGET_bcm53xx
15
16 include $(INCLUDE_DIR)/package.mk
17
18 define Package/autocore-arm
19   TITLE:=ARM auto core script.
20   MAINTAINER:=CN_SZTL
21   DEPENDS:=@(arm||aarch64) \
22     +TARGET_bcm27xx:bcm27xx-userland \
23     +TARGET_bcm53xx:nvram
24   VARIANT:=arm
25 endef
26
27 define Package/autocore-x86
28   TITLE:=x86/x64 auto core loadbalance script.
29   MAINTAINER:=Lean / CN_SZTL
30   DEPENDS:=@TARGET_x86 +lm-sensors +ethtool
31   VARIANT:=x86
32 endef
33
34 define Build/Compile
35 endef
36
37 define Package/autocore/install/Default
38         $(INSTALL_DIR) $$(1)/etc
39         $(CP) ./files/generic/index.htm $$(1)/etc/
40
41         $(INSTALL_DIR) $(1)/etc/uci-defaults
42         $(INSTALL_BIN) ./files/generic/090-cover-index_htm $$(1)/etc/uci-defaults/
43
44         $(INSTALL_DIR) $(1)/sbin
45         $(INSTALL_BIN) ./files/generic/cpuinfo $$(1)/sbin/
46         $(INSTALL_BIN) ./files/generic/ethinfo $$(1)/sbin/
47 endef
48
49 define Package/autocore-arm/install
50         $(call Package/autocore/install/Default,$(1))
51 endef
52
53 define Package/autocore-x86/install
54         $(call Package/autocore/install/Default)
55
56         $(INSTALL_DIR) $(1)/etc/init.d
57         $(INSTALL_BIN) ./files/x86/autocore $(1)/etc/init.d/
58 endef
59
60 $(eval $(call BuildPackage,autocore-arm))
61 $(eval $(call BuildPackage,autocore-x86))