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.

72 lines
1.8 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=frp
  3. PKG_VERSION:=0.27.0
  4. PKG_RELEASE:=1
  5. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  6. PKG_SOURCE_URL:=https://codeload.github.com/fatedier/frp/tar.gz/v${PKG_VERSION}?
  7. PKG_HASH:=5d2efd5d924c7a7f84a9f2838de6ab9b7d5ca070ab243edd404a5ca80237607c
  8. PKG_MAINTAINER:=Richard Yu <yurichard3839@gmail.com>
  9. PKG_LICENSE:=Apache-2.0
  10. PKG_LICENSE_FILES:=LICENSE
  11. PKG_BUILD_DEPENDS:=golang/host
  12. PKG_BUILD_PARALLEL:=1
  13. PKG_USE_MIPS16:=0
  14. GO_PKG:=github.com/fatedier/frp
  15. GO_PKG_BUILD_PKG:=github.com/fatedier/frp/cmd/...
  16. include $(INCLUDE_DIR)/package.mk
  17. include ../../lang/golang/golang-package.mk
  18. define Package/frp/template
  19. SECTION:=net
  20. CATEGORY:=Network
  21. TITLE:=frp - fast reverse proxy
  22. URL:=https://github.com/fatedier/frp
  23. DEPENDS:=$(GO_ARCH_DEPENDS)
  24. endef
  25. define Package/frpc
  26. $(call Package/frp/template)
  27. TITLE+= (client)
  28. endef
  29. define Package/frps
  30. $(call Package/frp/template)
  31. TITLE+= (server)
  32. endef
  33. define Package/frp/description
  34. frp is a fast reverse proxy to help you expose a local server behind
  35. a NAT or firewall to the internet.
  36. endef
  37. Package/frpc/description = $(Package/frp/description)
  38. Package/frps/description = $(Package/frp/description)
  39. define Package/frp/install
  40. $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
  41. $(INSTALL_DIR) $(1)/usr/bin/
  42. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(2) $(1)/usr/bin/
  43. $(INSTALL_DIR) $(1)/etc/frp
  44. $(INSTALL_DATA) $(PKG_BUILD_DIR)/conf/$(2).ini $(1)/etc/frp/
  45. $(INSTALL_DIR) $(1)/etc/init.d/
  46. $(INSTALL_BIN) ./files/$(2).init $(1)/etc/init.d/$(2)
  47. endef
  48. define Package/frpc/install
  49. $(call Package/frp/install,$(1),frpc)
  50. endef
  51. define Package/frps/install
  52. $(call Package/frp/install,$(1),frps)
  53. endef
  54. $(eval $(call GoBinPackage,frpc))
  55. $(eval $(call BuildPackage,frpc))
  56. $(eval $(call GoBinPackage,frps))
  57. $(eval $(call BuildPackage,frps))