You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
2.0 KiB

  1. # SPDX-License-Identifier: GPL-3.0-only
  2. #
  3. # Copyright (C) 2021 ImmortalWrt.org
  4. include $(TOPDIR)/rules.mk
  5. PKG_NAME:=v2rayA
  6. PKG_VERSION:=1.5.2
  7. PKG_RELEASE:=$(AUTORELEASE)
  8. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  9. PKG_SOURCE_URL:=https://codeload.github.com/v2rayA/v2rayA/tar.gz/v$(PKG_VERSION)?
  10. PKG_HASH:=3611b9fa5a6e0421007f2a3ce9671847ffc39e82e1caa6782eff5db470e92fe0
  11. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/service
  12. PKG_LICENSE:=GPL-3.0-only
  13. PKG_LICENSE_FILES:=LICENSE
  14. PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
  15. PKG_BUILD_DEPENDS:=golang/host node/host node-yarn/host
  16. PKG_BUILD_PARALLEL:=1
  17. PKG_USE_MIPS16:=0
  18. GO_PKG:=github.com/v2rayA/v2rayA
  19. GO_PKG_LDFLAGS_X:=$(GO_PKG)/global.Version=$(PKG_VERSION)
  20. include $(INCLUDE_DIR)/package.mk
  21. include ../../lang/golang/golang-package.mk
  22. TAR_OPTIONS+= --strip-components 1
  23. TAR_CMD=$(HOST_TAR) -C $(1)/.. $(TAR_OPTIONS)
  24. define Package/v2rayA
  25. TITLE:=A Linux web GUI client of Project V
  26. SECTION:=net
  27. CATEGORY:=Network
  28. SUBMENU:=Web Servers/Proxies
  29. DEPENDS:=$(GO_ARCH_DEPENDS) \
  30. +ca-bundle \
  31. +iptables-mod-filter \
  32. +iptables-mod-tproxy \
  33. +kmod-ipt-nat6 \
  34. +xray-core
  35. URL:=https://v2raya.org
  36. endef
  37. define Package/v2rayA/description
  38. v2rayA is a V2Ray Linux client supporting global transparent proxy,
  39. compatible with SS, SSR, Trojan(trojan-go), PingTunnel protocols.
  40. endef
  41. define Build/Compile
  42. ( \
  43. pushd $(PKG_BUILD_DIR)/../gui ; \
  44. yarn ; \
  45. OUTPUT_DIR=../service/server/router/web yarn build ; \
  46. popd ; \
  47. $(call GoPackage/Build/Compile) ; \
  48. )
  49. endef
  50. define Package/v2rayA/install
  51. $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
  52. $(INSTALL_DIR) $(1)/usr/bin/
  53. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/v2rayA $(1)/usr/bin/v2raya
  54. $(INSTALL_DIR) $(1)/etc/config/
  55. $(INSTALL_CONF) $(CURDIR)/files/v2raya.config $(1)/etc/config/v2raya
  56. $(INSTALL_DIR) $(1)/etc/init.d/
  57. $(INSTALL_BIN) $(CURDIR)/files/v2raya.init $(1)/etc/init.d/v2raya
  58. endef
  59. $(eval $(call GoBinPackage,v2rayA))
  60. $(eval $(call BuildPackage,v2rayA))