kenzok8-small/v2raya/Makefile

89 lines
2.4 KiB
Makefile
Raw Normal View History

2022-04-11 15:44:15 +08:00
# SPDX-License-Identifier: GPL-3.0-only
#
2023-04-27 11:32:17 +08:00
# Copyright (C) 2021-2023 ImmortalWrt.org
2022-04-11 15:44:15 +08:00
include $(TOPDIR)/rules.mk
PKG_NAME:=v2rayA
2023-12-17 20:14:47 +08:00
PKG_VERSION:=2.2.4.6
2023-04-27 11:32:17 +08:00
PKG_RELEASE:=1
2022-04-11 15:44:15 +08:00
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/v2rayA/v2rayA/tar.gz/v$(PKG_VERSION)?
2023-12-17 20:14:47 +08:00
PKG_HASH:=22285b2fdf321d68993b38ad738f4af210920757d7944691a78e151abd99cb3a
2022-04-11 15:44:15 +08:00
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/service
PKG_LICENSE:=AGPL-3.0-only
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
2022-06-19 10:21:53 +08:00
PKG_BUILD_DEPENDS:=golang/host
2022-04-11 15:44:15 +08:00
PKG_BUILD_PARALLEL:=1
2023-04-09 18:14:39 +08:00
PKG_USE_MIPS16:=0
2023-09-08 08:38:19 +08:00
PKG_BUILD_FLAGS:=no-mips16
2022-04-11 15:44:15 +08:00
GO_PKG:=github.com/v2rayA/v2rayA
2023-04-27 11:32:17 +08:00
GO_PKG_LDFLAGS_X:= \
$(GO_PKG)/conf.Version=$(PKG_VERSION) \
$(GO_PKG)/core/iptables.TproxyNotSkipBr=true
2023-09-06 00:13:39 +08:00
2022-04-11 15:44:15 +08:00
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
TAR_OPTIONS+= --strip-components 1
TAR_CMD=$(HOST_TAR) -C $(1)/.. $(TAR_OPTIONS)
define Package/v2raya
TITLE:=A Linux web GUI client of Project V
SECTION:=net
CATEGORY:=Network
SUBMENU:=Web Servers/Proxies
2023-09-08 08:38:19 +08:00
DEPENDS:=$(GO_ARCH_DEPENDS) \
+ca-bundle \
+kmod-nft-tproxy \
+xray-core
2022-04-11 15:44:15 +08:00
URL:=https://v2raya.org
endef
define Package/v2raya/description
v2rayA is a V2Ray Linux client supporting global transparent proxy,
compatible with SS, SSR, Trojan(trojan-go), PingTunnel protocols.
endef
define Package/v2raya/conffiles
/etc/v2raya/
/etc/config/v2raya
endef
2022-06-19 10:21:53 +08:00
WEB_FILE:=$(PKG_NAME)-web-$(PKG_VERSION).tar.gz
define Download/v2raya-web
URL:=https://codeload.github.com/v2rayA/v2raya-web/tar.gz/v$(PKG_VERSION)?
URL_FILE:=$(WEB_FILE)
FILE:=$(WEB_FILE)
2023-12-16 20:14:44 +08:00
HASH:=be724e6312864781b32fec5825d3c48902f8713a63f01c7471061ff6aa4fc357
2022-06-19 10:21:53 +08:00
endef
define Build/Prepare
$(call Build/Prepare/Default)
2022-04-11 15:44:15 +08:00
( \
2022-06-19 10:21:53 +08:00
mkdir -p $(PKG_BUILD_DIR)/server/router/web ; \
2023-09-08 08:38:19 +08:00
unzip -q -d $(PKG_BUILD_DIR)/server/router/web $(DL_DIR)/$(WEB_FILE) ; \
2022-04-11 15:44:15 +08:00
)
endef
define Package/v2raya/install
$(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
$(INSTALL_DIR) $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/v2rayA $(1)/usr/bin/v2raya
$(INSTALL_DIR) $(1)/etc/config/
$(INSTALL_CONF) $(CURDIR)/files/v2raya.config $(1)/etc/config/v2raya
$(INSTALL_DIR) $(1)/etc/init.d/
$(INSTALL_BIN) $(CURDIR)/files/v2raya.init $(1)/etc/init.d/v2raya
endef
2022-06-19 10:21:53 +08:00
$(eval $(call Download,v2raya-web))
2022-04-11 15:44:15 +08:00
$(eval $(call GoBinPackage,v2raya))
$(eval $(call BuildPackage,v2raya))