diff --git a/net/tuic-client/Makefile b/net/tuic-client/Makefile new file mode 100644 index 0000000000..6a3613522b --- /dev/null +++ b/net/tuic-client/Makefile @@ -0,0 +1,38 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# Copyright (C) 2023 ImmortalWrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=tuic-client +PKG_VERSION:=1.0.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/EAimTY/tuic/tar.gz/tuic-client-$(PKG_VERSION)? +PKG_HASH:=64d81f3d5c79d9d69229e927c3f842849885f547020d897f9624d185819e5661 +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/$(PKG_NAME) + +PKG_MAINTAINER:=Tianling Shen +PKG_LICENSE:=GPL-3.0-only +PKG_LICENSE_FILES:=LICENSE + +PKG_BUILD_DEPENDS:=rust/host + +include $(INCLUDE_DIR)/package.mk +include ../../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:=Delicately-TUICed 0-RTT proxy protocol (client) + URL:=https://github.com/EAimTY/tuic + DEPENDS:=@(aarch64||arm||x86_64||TARGET_x86_generic) +endef + +$(eval $(call RustBinPackage,tuic-client)) +$(eval $(call BuildPackage,tuic-client)) diff --git a/net/tuic-client/test.sh b/net/tuic-client/test.sh new file mode 100644 index 0000000000..d7515c4cb4 --- /dev/null +++ b/net/tuic-client/test.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +tuic-client --version | grep "$PKG_VERSION" diff --git a/net/tuic-server/Makefile b/net/tuic-server/Makefile new file mode 100644 index 0000000000..59ce621022 --- /dev/null +++ b/net/tuic-server/Makefile @@ -0,0 +1,38 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# Copyright (C) 2023 ImmortalWrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=tuic-server +PKG_VERSION:=1.0.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/EAimTY/tuic/tar.gz/tuic-server-$(PKG_VERSION)? +PKG_HASH:=fa333037596b2ce447d3d99c48f002c0c9f8da5e0725a4c15b2c30b14a298532 +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/$(PKG_NAME) + +PKG_MAINTAINER:=Tianling Shen +PKG_LICENSE:=GPL-3.0-only +PKG_LICENSE_FILES:=LICENSE + +PKG_BUILD_DEPENDS:=rust/host + +include $(INCLUDE_DIR)/package.mk +include ../../lang/rust/rust-package.mk + +TAR_OPTIONS+= --strip-components 1 +TAR_CMD=$(HOST_TAR) -C $(1)/.. $(TAR_OPTIONS) + +define Package/tuic-server + SECTION:=net + CATEGORY:=Network + SUBMENU:=Web Servers/Proxies + TITLE:=Delicately-TUICed 0-RTT proxy protocol (server) + URL:=https://github.com/EAimTY/tuic + DEPENDS:=@(aarch64||arm||x86_64||TARGET_x86_generic) +endef + +$(eval $(call RustBinPackage,tuic-server)) +$(eval $(call BuildPackage,tuic-server)) diff --git a/net/tuic-server/test.sh b/net/tuic-server/test.sh new file mode 100644 index 0000000000..23c3d63c76 --- /dev/null +++ b/net/tuic-server/test.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +tuic-server --version | grep "$PKG_VERSION"