From 314ecc312dc0b32e45e3dc448f2d125a970dfd83 Mon Sep 17 00:00:00 2001 From: kiddin9 <48883331+kiddin9@users.noreply.github.com> Date: Mon, 13 Apr 2026 02:55:40 +0800 Subject: [PATCH] Update Makefile --- mihomo/Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mihomo/Makefile b/mihomo/Makefile index 9dac1e2d..10bdfbc6 100644 --- a/mihomo/Makefile +++ b/mihomo/Makefile @@ -16,7 +16,7 @@ PKG_MAINTAINER:=Anya Lin PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=LICENSE -PKG_BUILD_DEPENDS:=golang/host +PKG_BUILD_DEPENDS:=golang/host upx/host PKG_BUILD_PARALLEL:=1 PKG_BUILD_FLAGS:=no-mips16 @@ -49,6 +49,13 @@ define Build/Prepare rm -f $(PKG_BUILD_DIR)/rules/logic_test/logic_test.go endef +define Build/Compile + $(call GoPackage/Build/Compile) +ifneq ($(filter arm mipsel mips,$(ARCH)),) + $(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/mihomo +endif +endef + define Package/mihomo/install $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR)) $(CURDIR)/.prepare.sh $(VERSION) $(CURDIR) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME)