Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
58 lines (46 loc) · 1.73 KB
/
Copy pathMakefile
File metadata and controls
58 lines (46 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
include $(TOPDIR)/rules.mk
PKG_NAME:=chimera-core
PKG_VERSION:=0.21.1
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
PKG_SOURCE:=clash_chimera-x86_64-unknown-linux-musl
PKG_SOURCE_URL:=https://github.com/MFSGA/Chimera_Client/releases/download/$(PKG_SOURCE_VERSION)
PKG_HASH:=850c949dc0176da3d5b57cb78f2e903cbe8823703c819c402f02ca16dea434d0
PKG_LICENSE:=AGPL-3.0
PKG_MAINTAINER:=OpenChimera Team
PKG_BUILD_FLAGS:=no-mips16
include $(INCLUDE_DIR)/package.mk
define Package/chimera-core
SECTION:=net
CATEGORY:=Network
TITLE:=Chimera Client core (clash-rs) prebuilt binary
URL:=https://github.com/MFSGA/Chimera_Client
# Runtime dependencies for the Chimera_Client (clash-rs) binary:
# - ca-bundle: SSL/TLS certificate bundle for HTTPS connections
# - ip-full: Full iproute2 for policy routing in TUN mode
# - kmod-tun: TUN/TAP kernel module for TUN proxy mode
# Note: kmod-inet-diag is NOT needed (diagnostic-only, not required by Chimera)
# kmod-nft-tproxy/kmod-nft-socket deferred to post-milestone-1 (TProxy/Redirect)
DEPENDS:=+ca-bundle +ip-full +kmod-tun
PROVIDES:=mihomo
CONFLICTS:=mihomo-meta mihomo-alpha
ALTERNATIVES:=\
300:/usr/bin/mihomo:/usr/libexec/chimera
endef
define Package/chimera-core/description
Chimera Client prebuilt binary package for OpenWrt.
Provides /usr/libexec/chimera with /usr/bin/mihomo alternative.
Built from MFSGA/Chimera_Client (clash-rs).
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) $(DL_DIR)/$(PKG_SOURCE) $(PKG_BUILD_DIR)/chimera
endef
define Build/Configure
endef
define Build/Compile
endef
define Package/chimera-core/install
$(INSTALL_DIR) $(1)/usr/libexec
$(INSTALL_BIN) $(PKG_BUILD_DIR)/chimera $(1)/usr/libexec/chimera
endef
$(eval $(call BuildPackage,chimera-core))