From ef0862f644a7ba3ca680769b96cb68f2f45a205a Mon Sep 17 00:00:00 2001 From: kiddin9 <48883331+kiddin9@users.noreply.github.com> Date: Mon, 13 Apr 2026 05:03:32 +0800 Subject: [PATCH] Update upx.patch --- .github/diy/patches/upx.patch | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/diy/patches/upx.patch b/.github/diy/patches/upx.patch index 37f933bc..bc53aa0c 100644 --- a/.github/diy/patches/upx.patch +++ b/.github/diy/patches/upx.patch @@ -75,3 +75,29 @@ define Package/mihomo/install $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR)) $(CURDIR)/.prepare.sh $(VERSION) $(CURDIR) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) + +--- a/mosdns/Makefile ++++ b/mosdns/Makefile +@@ -16,7 +16,7 @@ PKG_LICENSE:=GPL-3.0 + PKG_LICENSE_FILE:=LICENSE + PKG_MAINTAINER:=Tianling Shen + +-PKG_BUILD_DEPENDS:=golang/host ++PKG_BUILD_DEPENDS:=golang/host upx/host + PKG_BUILD_PARALLEL:=1 + PKG_BUILD_FLAGS:=no-mips16 + +@@ -35,6 +35,13 @@ define Package/mosdns + DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle + 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)/mosdns ++endif ++endef ++ + define Package/mosdns/install + $(call GoPackage/Package/Install/Bin,$(1)) + endef