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.

80 lines
2.6 KiB

  1. # Copyright 2021 Stan Grishin (stangri@melmac.ca)
  2. # This is free software, licensed under the MIT License.
  3. include $(TOPDIR)/rules.mk
  4. PKG_NAME:=nebula
  5. PKG_VERSION:=1.6.0
  6. PKG_RELEASE:=1
  7. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  8. PKG_SOURCE_URL:=https://codeload.github.com/slackhq/nebula/tar.gz/v$(PKG_VERSION)?
  9. PKG_HASH:=b16638b99d80a4ae6373f7757a0064dc0defd3f9e165617e7b5c3be9e64d3605
  10. PKG_MAINTAINER:=Stan Grishin <stangri@melmac.ca>
  11. PKG_LICENSE:=MIT
  12. PKG_LICENSE_FILES:=LICENSE
  13. PKG_BUILD_DEPENDS:=golang/host
  14. PKG_BUILD_PARALLEL:=1
  15. PKG_USE_MIPS16:=0
  16. GO_PKG:=github.com/slackhq/nebula
  17. GO_PKG_BUILD_PKG:= \
  18. github.com/slackhq/nebula/cmd/nebula \
  19. github.com/slackhq/nebula/cmd/nebula-cert
  20. GO_PKG_LDFLAGS_X:=\
  21. main.Build=$(PKG_VERSION)
  22. include $(INCLUDE_DIR)/package.mk
  23. include ../../lang/golang/golang-package.mk
  24. define Package/nebula
  25. SECTION:=net
  26. CATEGORY:=Network
  27. TITLE:=nebula
  28. URL:=https://github.com/slackhq/nebula
  29. DEPENDS:=$(GO_ARCH_DEPENDS) +kmod-tun
  30. endef
  31. define Package/nebula-cert
  32. SECTION:=net
  33. CATEGORY:=Network
  34. TITLE:=nebula-cert
  35. URL:=https://github.com/slackhq/nebula
  36. DEPENDS:=$(GO_ARCH_DEPENDS)
  37. endef
  38. define Package/nebula/description
  39. Nebula is a scalable overlay networking tool with a focus on performance, simplicity
  40. and security. It lets you seamlessly connect computers anywhere in the world.
  41. endef
  42. define Package/nebula-cert/description
  43. $(call Package/nebula/description)
  44. This package contains only nebula-cert binary.
  45. endef
  46. define Package/nebula/install
  47. $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
  48. $(INSTALL_DIR) $(1)/etc/init.d $(1)/usr/sbin $(1)/usr/share/doc/nebula $(1)/lib/upgrade/keep.d
  49. $(INSTALL_BIN) ./files/nebula.init $(1)/etc/init.d/nebula
  50. $(SED) "s|^\(PKG_VERSION\).*|\1='$(PKG_VERSION)-$(PKG_RELEASE)'|" $(1)/etc/init.d/nebula
  51. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nebula $(1)/usr/sbin/nebula
  52. $(INSTALL_DATA) $(PKG_BUILD_DIR)/LICENSE $(1)/usr/share/doc/nebula/LICENSE
  53. $(INSTALL_DATA) ./files/nebula.upgrade $(1)/lib/upgrade/keep.d/nebula
  54. endef
  55. define Package/nebula-cert/install
  56. $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
  57. $(INSTALL_DIR) $(1)/usr/sbin $(1)/usr/share/doc/nebula-cert $(1)/lib/upgrade/keep.d
  58. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nebula-cert $(1)/usr/sbin/nebula-cert
  59. $(INSTALL_DATA) $(PKG_BUILD_DIR)/LICENSE $(1)/usr/share/doc/nebula-cert/LICENSE
  60. $(INSTALL_DATA) ./files/nebula.upgrade $(1)/lib/upgrade/keep.d/nebula-cert
  61. endef
  62. $(eval $(call GoBinPackage,nebula))
  63. $(eval $(call BuildPackage,nebula))
  64. $(eval $(call GoBinPackage,nebula-cert))
  65. $(eval $(call BuildPackage,nebula-cert))