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.

65 lines
1.8 KiB

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