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.

81 lines
2.1 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.6.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:=d949246aa9fe80aa9cb8fb4d80cb470f508bb44d4ac23e84e28e3b9abd30b67c
  11. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/service
  12. PKG_LICENSE:=AGPL-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)/conf.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-conntrack-extra \
  32. +iptables-mod-extra \
  33. +iptables-mod-filter \
  34. +iptables-mod-tproxy \
  35. +kmod-ipt-nat6 \
  36. +xray-core
  37. URL:=https://v2raya.org
  38. endef
  39. define Package/v2raya/description
  40. v2rayA is a V2Ray Linux client supporting global transparent proxy,
  41. compatible with SS, SSR, Trojan(trojan-go), PingTunnel protocols.
  42. endef
  43. define Package/v2raya/conffiles
  44. /etc/v2raya/
  45. /etc/config/v2raya
  46. endef
  47. define Build/Compile
  48. ( \
  49. pushd $(PKG_BUILD_DIR)/../gui ; \
  50. yarn ; \
  51. OUTPUT_DIR=../service/server/router/web yarn build ; \
  52. popd ; \
  53. $(call GoPackage/Build/Compile) ; \
  54. )
  55. endef
  56. define Package/v2raya/install
  57. $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
  58. $(INSTALL_DIR) $(1)/usr/bin/
  59. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/v2rayA $(1)/usr/bin/v2raya
  60. $(INSTALL_DIR) $(1)/etc/config/
  61. $(INSTALL_CONF) $(CURDIR)/files/v2raya.config $(1)/etc/config/v2raya
  62. $(INSTALL_DIR) $(1)/etc/init.d/
  63. $(INSTALL_BIN) $(CURDIR)/files/v2raya.init $(1)/etc/init.d/v2raya
  64. endef
  65. $(eval $(call GoBinPackage,v2raya))
  66. $(eval $(call BuildPackage,v2raya))