🎉 init
Signed-off-by: SerinaNya <34389622+SerinaNya@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=mihomo
|
||||
PKG_VERSION:=1.19.29
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/MetaCubeX/mihomo/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=1db1cd49c233b67701b596fbd8a963f418ebeca4cb497f38a0e7cd706ea4c630
|
||||
|
||||
PKG_LICENSE:=GPL-3.0-only
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_BUILD_FLAGS:=no-mips16
|
||||
|
||||
GO_PKG:=github.com/metacubex/mihomo
|
||||
GO_PKG_BUILD_PKG:=$(GO_PKG)
|
||||
GO_PKG_INSTALL_EXTRA:=ca-certificates.crt
|
||||
GO_PKG_TAGS:=with_gvisor
|
||||
GO_PKG_LDFLAGS_X:= \
|
||||
$(GO_PKG)/constant.Version=v$(PKG_VERSION) \
|
||||
$(GO_PKG)/constant.BuildTime=2026-07-18
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
||||
|
||||
define Package/mihomo
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=Web Servers/Proxies
|
||||
TITLE:=Clash Meta Kernel
|
||||
URL:=https://github.com/MetaCubeX/mihomo
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle +kmod-inet-diag +kmod-tun
|
||||
endef
|
||||
|
||||
define Package/mihomo/description
|
||||
Mihomo is a rule-based proxy client supporting multiple protocols, a built-in
|
||||
DNS server, TUN mode, traffic redirection and a RESTful API controller.
|
||||
endef
|
||||
|
||||
define Package/mihomo/conffiles
|
||||
/etc/config/mihomo
|
||||
/etc/mihomo/
|
||||
endef
|
||||
|
||||
define Package/mihomo/install
|
||||
$(call GoPackage/Package/Install/Bin,$(1))
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/mihomo
|
||||
$(INSTALL_CONF) ./files/config.yaml $(1)/etc/mihomo/config.yaml
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_CONF) ./files/mihomo.conf $(1)/etc/config/mihomo
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/mihomo.init $(1)/etc/init.d/mihomo
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,mihomo))
|
||||
Reference in New Issue
Block a user