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)