mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
66 lines
1.7 KiB
Makefile
66 lines
1.7 KiB
Makefile
#
|
|
# Copyright (C) 2019 Xingwang Liao
|
|
#
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
# See /LICENSE for more information.
|
|
#
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=kcptun
|
|
PKG_VERSION:=20200409
|
|
PKG_RELEASE:=1
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
PKG_SOURCE_URL:=https://codeload.github.com/xtaci/kcptun/tar.gz/v$(PKG_VERSION)?
|
|
PKG_HASH:=312b8f438549225dfd1eac95444dd6a4c50610578ddcf7ff21e19c73a855d4bc
|
|
|
|
PKG_LICENSE:=MIT
|
|
PKG_LICENSE_FILES:=LICENSE.md
|
|
PKG_MAINTAINER:=Xingwang Liao <kuoruan@gmail.com>
|
|
|
|
PKG_BUILD_DEPENDS:=golang/host
|
|
PKG_BUILD_PARALLEL:=1
|
|
PKG_USE_MIPS16:=0
|
|
|
|
GO_PKG:=github.com/xtaci/kcptun
|
|
|
|
GO_PKG_LDFLAGS:=-s -w -X 'main.VERSION=$(PKG_VERSION)-$(PKG_RELEASE) for OpenWrt'
|
|
|
|
# Can't use GO_PKG_LDFLAGS_X to define X args with space
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
|
|
|
define Package/kcptun/Default
|
|
define Package/kcptun-$(1)
|
|
SECTION:=net
|
|
CATEGORY:=Network
|
|
SUBMENU:=Web Servers/Proxies
|
|
DEPENDS:=$$(GO_ARCH_DEPENDS)
|
|
TITLE:=Simple UDP Tunnel Based On KCP ($1)
|
|
URL:=https://github.com/xtaci/kcptun
|
|
endef
|
|
|
|
define Package/kcptun-$(1)/description
|
|
A Stable & Secure Tunnel Based On KCP with N:M Multiplexing.
|
|
|
|
This package contains the kcptun $(1).
|
|
endef
|
|
|
|
define Package/kcptun-$(1)/install
|
|
$$(call GoPackage/Package/Install/Bin,$$(PKG_INSTALL_DIR))
|
|
|
|
$$(INSTALL_DIR) $$(1)/usr/bin
|
|
$$(INSTALL_BIN) $$(PKG_INSTALL_DIR)/usr/bin/$(1) $$(1)/usr/bin/kcptun-$(1)
|
|
endef
|
|
endef
|
|
|
|
KCPTUN_COMPONENTS:=client server
|
|
|
|
$(foreach component,$(KCPTUN_COMPONENTS), \
|
|
$(eval $(call Package/kcptun/Default,$(component))) \
|
|
$(eval $(call GoBinPackage,kcptun-$(component))) \
|
|
$(eval $(call BuildPackage,kcptun-$(component))) \
|
|
)
|