mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-30 09:25:13 +08:00
⛄ Sync 2026-06-04 04:25:55
This commit is contained in:
1 parent
5f85a70606
commit
e4048e0377
15 files changed
+928
-338
No files matched your search
+53
-44
@@ -1,67 +1,76 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2025 ImmortalWrt.org
|
||||
#
|
||||
# Copyright (C) 2021 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=tuic-client
|
||||
PKG_VERSION:=1.8.5
|
||||
PKG_RELEASE:=8
|
||||
PKG_RELEASE:=9
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/Itsusinn/tuic/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=skip
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
PKG_LICENSE:=GPL-3.0-only
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
PKG_BUILD_DEPENDS:=rust/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(TOPDIR)/feeds/packages/lang/rust/rust-package.mk
|
||||
|
||||
ifeq ($(ARCH),aarch64)
|
||||
TUIC_ARCH:=tuic-client-aarch64-linux-musl
|
||||
PKG_HASH:=skip
|
||||
else ifeq ($(ARCH),arm)
|
||||
# Referred to golang/golang-values.mk
|
||||
ARM_CPU_FEATURES:=$(word 2,$(subst +,$(space),$(call qstrip,$(CONFIG_CPU_TYPE))))
|
||||
ifeq ($(ARM_CPU_FEATURES),)
|
||||
TUIC_ARCH:=tuic-client-armv7-linux-musl
|
||||
PKG_HASH:=skip
|
||||
else
|
||||
TUIC_ARCH:=tuic-client-armv7-linux-muslhf
|
||||
PKG_HASH:=skip
|
||||
endif
|
||||
else ifeq ($(ARCH),i386)
|
||||
TUIC_ARCH:=tuic-client-i686-linux-musl
|
||||
PKG_HASH:=skip
|
||||
else ifeq ($(ARCH),x86_64)
|
||||
TUIC_ARCH:=tuic-client-x86_64-linux-musl
|
||||
PKG_HASH:=skip
|
||||
# Set the default value to make OpenWrt Package Checker happy
|
||||
else
|
||||
PKG_SOURCE:=dummy
|
||||
PKG_HASH:=skip
|
||||
endif
|
||||
|
||||
define Download/tuic-client
|
||||
URL:=https://github.com/Itsusinn/tuic/releases/download/v$(PKG_VERSION)/
|
||||
URL_FILE:=$(TUIC_ARCH)
|
||||
FILE:=$(TUIC_ARCH)-$(PKG_VERSION)
|
||||
HASH:=skip
|
||||
endef
|
||||
|
||||
$(eval $(call Download,tuic-client))
|
||||
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:=Delicately-TUICed 0-RTT proxy protocol
|
||||
URL:=https://github.com/Itsusinn/tuic
|
||||
DEPENDS:=@USE_MUSL @(aarch64||arm_v7||i386||x86_64) @!(TARGET_x86_geode||TARGET_x86_legacy)
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=Web Servers/Proxies
|
||||
TITLE:=TUIC proxy protocol client
|
||||
URL:=https://github.com/EAimTY/tuic
|
||||
DEPENDS:=@(aarch64||arm||x86_64||i686||riscv64||loongarch64)
|
||||
endef
|
||||
|
||||
define Package/tuic-client/description
|
||||
Delicately-TUICed 0-RTT proxy protocol client.
|
||||
endef
|
||||
|
||||
define Select/Features
|
||||
$(strip \
|
||||
$(if $(or \
|
||||
$(findstring i686,$(RUSTC_TARGET_ARCH)), \
|
||||
$(findstring arm,$(RUSTC_TARGET_ARCH)), \
|
||||
$(findstring riscv64,$(RUSTC_TARGET_ARCH)), \
|
||||
$(findstring loongarch64,$(RUSTC_TARGET_ARCH)) \
|
||||
),--no-default-features --features ring) \
|
||||
$(if $(or \
|
||||
$(findstring x86_64,$(RUSTC_TARGET_ARCH)), \
|
||||
$(findstring aarch64,$(RUSTC_TARGET_ARCH)) \
|
||||
),--features jemallocator) \
|
||||
)
|
||||
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) $(DL_DIR)/$(TUIC_ARCH)-$(PKG_VERSION) $(1)/usr/bin/tuic-client
|
||||
$(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))
|
||||
@@ -0,0 +1,8 @@
|
||||
--- a/tuic-client/src/main.rs
|
||||
+++ b/tuic-client/src/main.rs
|
||||
@@ -1,5 +1,3 @@
|
||||
-#![feature(ip)]
|
||||
-
|
||||
use std::{process, str::FromStr};
|
||||
|
||||
use chrono::{Offset, TimeZone};
|
||||
Reference in new issue
Block a user