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
2.5 KiB

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