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