mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-07-27 10:31:38 +08:00
68 lines
1.6 KiB
Makefile
68 lines
1.6 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
#
|
|
# Copyright (C) 2021 ImmortalWrt.org
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=tuic-client
|
|
PKG_VERSION:=1.8.1
|
|
PKG_RELEASE:=4
|
|
|
|
PKG_LICENSE_FILES:=LICENSE
|
|
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
|
|
|
include $(INCLUDE_DIR)/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))
|
|
|
|
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)
|
|
endef
|
|
|
|
define Build/Compile
|
|
endef
|
|
|
|
define Package/tuic-client/install
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
$(INSTALL_BIN) $(DL_DIR)/$(TUIC_ARCH)-$(PKG_VERSION) $(1)/usr/bin/tuic-client
|
|
endef
|
|
|
|
$(eval $(call BuildPackage,tuic-client))
|