mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-08-01 12:29:36 +08:00
78 lines
2.2 KiB
Makefile
78 lines
2.2 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0-only
|
|
#
|
|
# Copyright (C) 2025 ImmortalWrt.org
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=tuic-client
|
|
PKG_UPSTREAM_VERSION:=2.0.0-dev1
|
|
PKG_VERSION:=2.0.0_pre1
|
|
PKG_RELEASE:=1
|
|
|
|
TUIC_HASH_AARCH64:=07e4be99f22f760ce7fe77daf7547266cbab1080b405887458b540f18c4c6c29
|
|
TUIC_HASH_ARMV7:=c7320a7f1a0d5feeebb6b9aab5e22d3570f511b4d5c34fe513fb96d951f9da6b
|
|
TUIC_HASH_ARMV7HF:=9498bc6d0c88756a426b6f5cf5f4b926aac896037a1d1a718f2c5e7bd39103cb
|
|
TUIC_HASH_I686:=151ea3783738130b14801620d5a972a9be27d708f16eea0f20ffceb673e93e5d
|
|
TUIC_HASH_X86_64:=ce57a4f9c2136739c5869e2744fb0a5fdb425a8deef02516d68af12c8c74328f
|
|
|
|
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
|
PKG_LICENSE:=GPL-3.0-or-later
|
|
PKG_LICENSE_FILES:=LICENSE
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
ifeq ($(ARCH),aarch64)
|
|
TUIC_ARCH:=tuic-client-aarch64-linux-musl
|
|
PKG_HASH:=$(TUIC_HASH_AARCH64)
|
|
else ifeq ($(ARCH),arm)
|
|
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:=$(TUIC_HASH_ARMV7)
|
|
else
|
|
TUIC_ARCH:=tuic-client-armv7-linux-muslhf
|
|
PKG_HASH:=$(TUIC_HASH_ARMV7HF)
|
|
endif
|
|
else ifeq ($(ARCH),i386)
|
|
TUIC_ARCH:=tuic-client-i686-linux-musl
|
|
PKG_HASH:=$(TUIC_HASH_I686)
|
|
else ifeq ($(ARCH),x86_64)
|
|
TUIC_ARCH:=tuic-client-x86_64-linux-musl
|
|
PKG_HASH:=$(TUIC_HASH_X86_64)
|
|
else
|
|
PKG_SOURCE:=dummy
|
|
PKG_HASH:=dummy
|
|
endif
|
|
|
|
define Download/tuic-client
|
|
URL:=https://github.com/Itsusinn/tuic/releases/download/v$(PKG_UPSTREAM_VERSION)/
|
|
URL_FILE:=$(TUIC_ARCH)
|
|
FILE:=$(TUIC_ARCH)-$(PKG_UPSTREAM_VERSION)
|
|
HASH:=$(PKG_HASH)
|
|
endef
|
|
|
|
$(eval $(call Download,tuic-client))
|
|
|
|
define Package/tuic-client
|
|
SECTION:=net
|
|
CATEGORY:=Network
|
|
SUBMENU:=Web Servers/Proxies
|
|
TITLE:=TUIC proxy protocol client
|
|
URL:=https://github.com/Itsusinn/tuic
|
|
DEPENDS:=@USE_MUSL @(aarch64||arm_v7||i386||x86_64) @!(TARGET_x86_geode||TARGET_x86_legacy)
|
|
endef
|
|
|
|
define Package/tuic-client/description
|
|
Delicately-TUICed 0-RTT proxy protocol client.
|
|
endef
|
|
|
|
define Build/Compile
|
|
endef
|
|
|
|
define Package/tuic-client/install
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
$(INSTALL_BIN) $(DL_DIR)/$(TUIC_ARCH)-$(PKG_UPSTREAM_VERSION) $(1)/usr/bin/tuic-client
|
|
endef
|
|
|
|
$(eval $(call BuildPackage,tuic-client))
|