Makefile 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # SPDX-License-Identifier: GPL-3.0-only
  2. #
  3. # Copyright (C) 2021 ImmortalWrt.org
  4. include $(TOPDIR)/rules.mk
  5. PKG_NAME:=hysteria
  6. PKG_VERSION:=2.6.5
  7. PKG_RELEASE:=1
  8. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  9. PKG_SOURCE_URL:=https://codeload.github.com/apernet/hysteria/tar.gz/app/v$(PKG_VERSION)?
  10. PKG_HASH:=21a04ef8ce640d7c60c3b8678500b6e6481862d9af62f9ce2663b772211718d0
  11. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-app-v$(PKG_VERSION)
  12. PKG_LICENSE:=MIT
  13. PKG_LICENSE_FILE:=LICENSE
  14. PKG_MAINTAINER:=Tianling Shen <[email protected]>
  15. PKG_BUILD_DEPENDS:=golang/host
  16. PKG_BUILD_PARALLEL:=1
  17. PKG_USE_MIPS16:=0
  18. PKG_BUILD_FLAGS:=no-mips16
  19. GO_PKG:=github.com/apernet/hysteria
  20. GO_PKG_BUILD_PKG:=$(GO_PKG)/app/v2
  21. GO_PKG_LDFLAGS_X = \
  22. $(GO_PKG)/app/v2/cmd.appVersion=v$(PKG_VERSION) \
  23. $(GO_PKG)/app/v2/cmd.appType=release \
  24. $(GO_PKG)/app/v2/cmd.appPlatform=$(GO_OS) \
  25. $(GO_PKG)/app/v2/cmd.appArch=$(GO_ARCH)
  26. include $(INCLUDE_DIR)/package.mk
  27. include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
  28. define Package/hysteria
  29. SECTION:=net
  30. CATEGORY:=Network
  31. TITLE:=A feature-packed network utility optimized for networks of poor quality
  32. URL:=https://github.com/apernet/hysteria
  33. DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
  34. endef
  35. define Package/hysteria/description
  36. Hysteria is a feature-packed network utility optimized for networks
  37. of poor quality (e.g. satellite connections, congested public Wi-Fi,
  38. connecting from China to servers abroad) powered by a custom version
  39. of QUIC protocol.
  40. endef
  41. define Package/hysteria/install
  42. $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
  43. $(INSTALL_DIR) $(1)/usr/bin/
  44. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/app $(1)/usr/bin/hysteria
  45. endef
  46. $(eval $(call GoBinPackage,hysteria))
  47. $(eval $(call BuildPackage,hysteria))