mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-10 19:12:33 +08:00
58 lines
1.5 KiB
Makefile
58 lines
1.5 KiB
Makefile
|
#
|
||
|
# Copyright (c) 2017 Yu Wang <wangyucn@gmail.com>
|
||
|
#
|
||
|
# This is free software, licensed under the MIT.
|
||
|
# See /LICENSE for more information.
|
||
|
#
|
||
|
|
||
|
include $(TOPDIR)/rules.mk
|
||
|
|
||
|
PKG_NAME:=udp2raw-tunnel
|
||
|
PKG_VERSION:=20190716.test.0
|
||
|
PKG_RELEASE:=1
|
||
|
|
||
|
PKG_SOURCE_PROTO:=git
|
||
|
PKG_SOURCE_URL:=https://github.com/wangyu-/udp2raw-tunnel.git
|
||
|
PKG_SOURCE_VERSION:=5cc304a26181ee17bc583b79a2e80449ea63e1b7
|
||
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
|
||
|
|
||
|
PKG_LICENSE:=MIT
|
||
|
PKG_LICENSE_FILES:=LICENSE
|
||
|
PKG_MAINTAINER:=Yu Wang
|
||
|
|
||
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||
|
|
||
|
PKG_BUILD_PARALLEL:=1
|
||
|
|
||
|
include $(INCLUDE_DIR)/package.mk
|
||
|
|
||
|
define Package/udp2raw-tunnel
|
||
|
SECTION:=net
|
||
|
CATEGORY:=Network
|
||
|
TITLE:=Tunnel which turns UDP Traffic into Encrypted FakeTCP/UDP/ICMP Traffic
|
||
|
URL:=https://github.com/wangyu-/udp2raw-tunnel
|
||
|
DEPENDS:= +libstdcpp +libpthread +librt
|
||
|
endef
|
||
|
|
||
|
define Package/udp2raw-tunnel/description
|
||
|
udp2raw-tunnel is a tunnel which turns UDP Traffic into Encrypted FakeTCP/UDP/ICMP Traffic by using Raw Socket.
|
||
|
endef
|
||
|
|
||
|
MAKE_FLAGS += cross
|
||
|
|
||
|
define Build/Prepare
|
||
|
$(PKG_UNPACK)
|
||
|
sed -i 's/cc_cross=.*/cc_cross=$(TARGET_CXX)/g' $(PKG_BUILD_DIR)/makefile
|
||
|
sed -i '/\*gitversion/d' $(PKG_BUILD_DIR)/makefile
|
||
|
echo 'const char *gitversion = "$(PKG_VERSION)";' > $(PKG_BUILD_DIR)/git_version.h
|
||
|
$(Build/Patch)
|
||
|
endef
|
||
|
|
||
|
define Package/udp2raw-tunnel/install
|
||
|
$(INSTALL_DIR) $(1)/usr/bin
|
||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/udp2raw_cross $(1)/usr/bin/udp2raw
|
||
|
endef
|
||
|
|
||
|
$(eval $(call BuildPackage,udp2raw-tunnel))
|