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.

81 lines
2.2 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=yggdrasil
  3. PKG_VERSION:=0.3.16
  4. PKG_RELEASE:=1
  5. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  6. PKG_SOURCE_URL:=https://codeload.github.com/yggdrasil-network/yggdrasil-go/tar.gz/v$(PKG_VERSION)?
  7. PKG_HASH:=e03595b78906b171155aaa11c922be3418bd056f8547e4d9f5123b6047316eac
  8. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-go-$(PKG_VERSION)
  9. PKG_MAINTAINER:=William Fleurant <meshnet@protonmail.com>
  10. PKG_LICENSE:=LGPL-3.0-only
  11. PKG_LICENSE_FILES:=LICENSE
  12. PKG_BUILD_DEPENDS:=golang/host
  13. PKG_BUILD_PARALLEL:=1
  14. PKG_USE_MIPS16:=0
  15. GO_PKG:=github.com/yggdrasil-network/yggdrasil-go
  16. GO_PKG_BUILD_PKG:=github.com/yggdrasil-network/yggdrasil-go/cmd/...
  17. GO_PKG_LDFLAGS_X:= \
  18. github.com/yggdrasil-network/yggdrasil-go/src/version.buildName=yggdrasil-openwrt \
  19. github.com/yggdrasil-network/yggdrasil-go/src/version.buildVersion=$(PKG_VERSION)
  20. include $(INCLUDE_DIR)/package.mk
  21. include ../../lang/golang/golang-package.mk
  22. define Package/yggdrasil
  23. SECTION:=net
  24. CATEGORY:=Network
  25. SUBMENU:=Routing and Redirection
  26. TITLE:=Yggdrasil supports end-to-end encrypted IPv6 networks
  27. URL:=https://yggdrasil-network.github.io/
  28. DEPENDS:=$(GO_ARCH_DEPENDS) @IPV6 +kmod-tun +dkjson +libuci-lua
  29. endef
  30. define Package/yggdrasil/description
  31. Yggdrasil builds end-to-end encrypted networks with IPv6.
  32. Beyond the similarities with cjdns is a different routing
  33. algorithm. This globally-agreed spanning tree uses greedy
  34. routing in a metric space. Back-pressure routing techniques
  35. allow advanced link aggregation bonding on per-stream basis.
  36. In turn, a single stream will span across multiple network
  37. interfaces simultaneously with much greater throughput.
  38. endef
  39. define Package/yggdrasil/conffiles
  40. /etc/config/yggdrasil
  41. endef
  42. define Package/yggdrasil/install
  43. $(INSTALL_DIR) \
  44. $(1)/etc/init.d \
  45. $(1)/etc/uci-defaults \
  46. $(1)/usr/sbin
  47. $(INSTALL_BIN) \
  48. $(GO_PKG_BUILD_BIN_DIR)/yggdrasil \
  49. $(1)/usr/sbin
  50. $(INSTALL_BIN) \
  51. $(GO_PKG_BUILD_BIN_DIR)/yggdrasilctl \
  52. $(1)/usr/sbin
  53. $(INSTALL_BIN) \
  54. ./files/ygguci \
  55. $(1)/usr/sbin
  56. $(INSTALL_BIN) \
  57. ./files/yggdrasil.defaults \
  58. $(1)/etc/uci-defaults/yggdrasil
  59. $(INSTALL_BIN) \
  60. ./files/yggdrasil.init \
  61. $(1)/etc/init.d/yggdrasil
  62. endef
  63. $(eval $(call GoBinPackage,yggdrasil))
  64. $(eval $(call BuildPackage,yggdrasil))