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.

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