mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-10-30 12:05:13 +08:00
update 2026-05-10 09:48:30
This commit is contained in:
1 parent
95ac96413e
commit
0b362674f1
6244 files changed
+2992248
No files matched your search
@@ -0,0 +1,76 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2025 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=tuic-client
|
||||
PKG_VERSION:=1.8.1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/Itsusinn/tuic/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=8ef0713c3918eb27a95691b29e64bcd1392d630e5e9a62cfe213293705398806
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
PKG_LICENSE:=GPL-3.0-only
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
PKG_BUILD_DEPENDS:=rust/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
include $(TOPDIR)/feeds/packages/lang/rust/rust-package.mk
|
||||
|
||||
TAR_OPTIONS += --strip-components 1
|
||||
TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
|
||||
|
||||
define Package/tuic-client
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=Web Servers/Proxies
|
||||
TITLE:=TUIC proxy protocol client
|
||||
URL:=https://github.com/Itsusinn/tuic
|
||||
DEPENDS:=@(aarch64||arm||mips||mipsel||x86_64||i386||i686||riscv64||loongarch64)
|
||||
endef
|
||||
|
||||
define Package/tuic-client/description
|
||||
Delicately-TUICed 0-RTT proxy protocol client.
|
||||
endef
|
||||
|
||||
define Select/Features
|
||||
$(strip \
|
||||
$(if $(findstring x86_64,$(RUSTC_TARGET_ARCH)),--features jemallocator) \
|
||||
$(if $(findstring aarch64,$(RUSTC_TARGET_ARCH)),--features jemallocator) \
|
||||
$(if $(or \
|
||||
$(findstring arm,$(RUSTC_TARGET_ARCH)), \
|
||||
$(findstring mips,$(RUSTC_TARGET_ARCH)), \
|
||||
$(findstring mipsel,$(RUSTC_TARGET_ARCH)), \
|
||||
$(findstring i686,$(RUSTC_TARGET_ARCH)), \
|
||||
$(findstring i386,$(RUSTC_TARGET_ARCH)), \
|
||||
$(findstring riscv64,$(RUSTC_TARGET_ARCH)), \
|
||||
$(findstring loongarch64,$(RUSTC_TARGET_ARCH)) \
|
||||
),--no-default-features --features ring) \
|
||||
)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
( \
|
||||
pushd $(PKG_BUILD_DIR) ; \
|
||||
$(CARGO_PKG_CONFIG_VARS) \
|
||||
cargo build --release \
|
||||
-p tuic-client \
|
||||
--target $(RUSTC_TARGET_ARCH) \
|
||||
$(call Select/Features) ; \
|
||||
popd ; \
|
||||
)
|
||||
endef
|
||||
|
||||
define Package/tuic-client/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/target/$(RUSTC_TARGET_ARCH)/release/tuic-client $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
$(eval $(call RustBinPackage,tuic-client))
|
||||
$(eval $(call BuildPackage,tuic-client))
|
||||
Reference in new issue
Block a user