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.

48 lines
1.3 KiB

  1. # SPDX-License-Identifier: GPL-3.0-only
  2. #
  3. # Copyright (C) 2021 ImmortalWrt.org
  4. include $(TOPDIR)/rules.mk
  5. PKG_NAME:=trojan-go
  6. PKG_VERSION:=0.10.6
  7. PKG_RELEASE:=$(AUTORELEASE)
  8. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  9. PKG_SOURCE_URL:=https://codeload.github.com/p4gefau1t/trojan-go/tar.gz/v$(PKG_VERSION)?
  10. PKG_HASH:=925f02647dda944813f1eab0b71eac98b83eb5964ef5a6f63e89bc7eb4486c1f
  11. PKG_LICENSE:=GPL-3.0-only
  12. PKG_LICENSE_FILES:=LICENSE
  13. PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
  14. PKG_BUILD_DEPENDS:=golang/host
  15. PKG_BUILD_PARALLEL:=1
  16. PKG_USE_MIPS16:=0
  17. GO_PKG:=github.com/p4gefau1t/trojan-go
  18. GO_PKG_BUILD_PKG:=$(GO_PKG)
  19. GO_PKG_LDFLAGS_X:= \
  20. $(GO_PKG)/constant.Version=$(PKG_VERSION) \
  21. $(GO_PKG)/constant.Commit=v$(PKG_VERSION)
  22. GO_PKG_TAGS:=full
  23. include $(INCLUDE_DIR)/package.mk
  24. include ../../lang/golang/golang-package.mk
  25. define Package/trojan-go
  26. SECTION:=net
  27. CATEGORY:=Network
  28. SUBMENU:=Web Servers/Proxies
  29. TITLE:=A Trojan proxy written in Go
  30. DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
  31. URL:=https://p4gefau1t.github.io/trojan-go/
  32. endef
  33. define Package/trojan-go/description
  34. Trojan features multiple protocols over TLS to avoid both
  35. active/passive detections and ISP QoS limitations.
  36. endef
  37. $(eval $(call GoBinPackage,trojan-go))
  38. $(eval $(call BuildPackage,trojan-go))