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.

75 lines
1.9 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=frp
  3. PKG_VERSION:=0.28.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:=61afbd0e84fc1ab92eacce5a642e2590d1b8c1a972a78f6499165c1778aa62cf
  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. SUBMENU:=Web Servers/Proxies
  22. TITLE:=frp - fast reverse proxy
  23. URL:=https://github.com/fatedier/frp
  24. DEPENDS:=$(GO_ARCH_DEPENDS)
  25. endef
  26. define Package/frpc
  27. $(call Package/frp/template)
  28. TITLE+= (client)
  29. endef
  30. define Package/frps
  31. $(call Package/frp/template)
  32. TITLE+= (server)
  33. endef
  34. define Package/frp/description
  35. frp is a fast reverse proxy to help you expose a local server behind
  36. a NAT or firewall to the internet.
  37. endef
  38. Package/frpc/description = $(Package/frp/description)
  39. Package/frps/description = $(Package/frp/description)
  40. define Package/frp/install
  41. $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
  42. $(INSTALL_DIR) $(1)/usr/bin/
  43. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(2) $(1)/usr/bin/
  44. $(INSTALL_DIR) $(1)/etc/frp/$(2).d/
  45. $(INSTALL_DATA) $(PKG_BUILD_DIR)/conf/$(2)_full.ini $(1)/etc/frp/$(2).d/
  46. $(INSTALL_DIR) $(1)/etc/config/
  47. $(INSTALL_CONF) ./files/$(2).config $(1)/etc/config/$(2)
  48. $(INSTALL_DIR) $(1)/etc/init.d/
  49. $(INSTALL_BIN) ./files/$(2).init $(1)/etc/init.d/$(2)
  50. endef
  51. define Package/frpc/install
  52. $(call Package/frp/install,$(1),frpc)
  53. endef
  54. define Package/frps/install
  55. $(call Package/frp/install,$(1),frps)
  56. endef
  57. $(eval $(call GoBinPackage,frpc))
  58. $(eval $(call BuildPackage,frpc))
  59. $(eval $(call GoBinPackage,frps))
  60. $(eval $(call BuildPackage,frps))