mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-14 04:18:00 +08:00
Create upx.patch
This commit is contained in:
1 parent
baaa03bde3
commit
85275a9c25
1 file changed
+77
@@ -0,0 +1,77 @@
|
|||||||
|
--- a/sing-box/Makefile
|
||||||
|
+++ b/sing-box/Makefile
|
||||||
|
@@ -29,7 +29,7 @@ PKG_CONFIG_DEPENDS:= \
|
||||||
|
CONFIG_SING_BOX_BUILD_V2RAY_API \
|
||||||
|
CONFIG_SING_BOX_BUILD_WIREGUARD
|
||||||
|
|
||||||
|
-PKG_BUILD_DEPENDS:=golang/host
|
||||||
|
+PKG_BUILD_DEPENDS:=golang/host upx/host
|
||||||
|
PKG_BUILD_PARALLEL:=1
|
||||||
|
PKG_BUILD_FLAGS:=no-mips16
|
||||||
|
|
||||||
|
@@ -126,6 +126,13 @@ GO_PKG_TAGS:=$(subst $(space),$(comma),$(strip \
|
||||||
|
define Package/sing-box/conffiles
|
||||||
|
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)/sing-box
|
||||||
|
+endif
|
||||||
|
+endef
|
||||||
|
+
|
||||||
|
define Package/sing-box/install
|
||||||
|
$(call GoPackage/Package/Install/Bin,$(1))
|
||||||
|
endef
|
||||||
|
|
||||||
|
--- a/xray-core/Makefile
|
||||||
|
+++ b/xray-core/Makefile
|
||||||
|
@@ -12,7 +12,7 @@ PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||||
|
PKG_LICENSE:=MPL-2.0
|
||||||
|
PKG_LICENSE_FILES:=LICENSE
|
||||||
|
|
||||||
|
-PKG_BUILD_DEPENDS:=golang/host
|
||||||
|
+PKG_BUILD_DEPENDS:=golang/host upx/host
|
||||||
|
PKG_BUILD_PARALLEL:=1
|
||||||
|
PKG_USE_MIPS16:=0
|
||||||
|
PKG_BUILD_FLAGS:=no-mips16
|
||||||
|
@@ -52,6 +52,13 @@ define Package/xray-core/conffiles
|
||||||
|
/etc/config/xray
|
||||||
|
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)/xray
|
||||||
|
+endif
|
||||||
|
+endef
|
||||||
|
+
|
||||||
|
define Package/xray-core/install
|
||||||
|
$(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
|
||||||
|
$(INSTALL_DIR) $(1)/usr/bin/
|
||||||
|
|
||||||
|
--- a/mihomo/Makefile
|
||||||
|
+++ b/mihomo/Makefile
|
||||||
|
@@ -16,7 +16,7 @@ PKG_MAINTAINER:=Anya Lin <hukk1996@gmail.com>
|
||||||
|
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)
|
||||||
Reference in new issue
Block a user