1 # Copyright 2021-2023 Stan Grishin (stangri@melmac.ca)
2 # This is free software, licensed under the MIT License.
4 include $(TOPDIR
)/rules.mk
10 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
11 PKG_SOURCE_URL
:=https
://codeload.github.com
/slackhq
/nebula
/tar.gz
/v
$(PKG_VERSION
)?
12 PKG_HASH
:=c4771ce6eb3e142f88f5f4c12443cfca140bf96b2746c74f9536bd1a362f3f88
14 PKG_MAINTAINER
:=Stan Grishin
<stangri@melmac.ca
>
16 PKG_LICENSE_FILES
:=LICENSE
18 PKG_BUILD_DEPENDS
:=golang
/host
20 PKG_BUILD_FLAGS
:=no-mips16
22 GO_PKG
:=github.com
/slackhq
/nebula
24 github.com
/slackhq
/nebula
/cmd
/nebula \
25 github.com
/slackhq
/nebula
/cmd
/nebula-cert
27 main.Build
=$(PKG_VERSION
)
29 include $(INCLUDE_DIR
)/package.mk
30 include ..
/..
/lang
/golang
/golang-package.mk
36 URL
:=https
://docs.openwrt.melmac.net
/nebula
/
37 DEPENDS
:=$(GO_ARCH_DEPENDS
) +kmod-tun
40 define Package
/nebula-cert
44 URL
:=https
://docs.openwrt.melmac.net
/nebula
/
45 DEPENDS
:=$(GO_ARCH_DEPENDS
)
48 define Package
/nebula-proto
52 URL
:=https
://docs.openwrt.melmac.net
/nebula
/
57 define Package
/nebula-service
61 URL
:=https
://docs.openwrt.melmac.net
/nebula
/
63 CONFLICTS
:=nebula-proto
68 $(call GoPackage
/Build
/Compile
)
71 define Package
/nebula
/description
72 Nebula is a scalable overlay networking tool with a focus on performance
, simplicity
73 and security. It lets you seamlessly connect computers anywhere in the world.
74 This package contains only nebula binary. Unless you want to start nebula manually
,
75 you may want to also
install *either
* 'nebula-service' *or
* 'nebula-proto' package.
78 define Package
/nebula-cert
/description
79 Nebula is a scalable overlay networking tool with a focus on performance
, simplicity
80 and security. It lets you seamlessly connect computers anywhere in the world.
81 This package contains only nebula-cert binary.
84 define Package
/nebula-proto
/description
85 Nebula is a scalable overlay networking tool with a focus on performance
, simplicity
86 and security. It lets you seamlessly connect computers anywhere in the world.
87 This package contains only OpenWrt protocol
/interface support for nebula.
90 define Package
/nebula-service
/description
91 Nebula is a scalable overlay networking tool with a focus on performance
, simplicity
92 and security. It lets you seamlessly connect computers anywhere in the world.
93 This package contains only OpenWrt-specific init.d script for nebula.
96 define Package
/nebula
/install
97 $(call GoPackage
/Package
/Install
/Bin
,$(PKG_INSTALL_DIR
))
98 $(INSTALL_DIR
) $(1)/usr
/sbin
99 $(INSTALL_DIR
) $(1)/lib
/upgrade
/keep.d
100 $(INSTALL_DIR
) $(1)/usr
/share
/doc
/nebula
101 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/nebula
$(1)/usr
/sbin
/
102 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/LICENSE
$(1)/usr
/share
/doc
/nebula
/LICENSE
103 $(INSTALL_DATA
) .
/files
/nebula.upgrade
$(1)/lib
/upgrade
/keep.d
/nebula
106 define Package
/nebula-cert
/install
107 $(call GoPackage
/Package
/Install
/Bin
,$(PKG_INSTALL_DIR
))
108 $(INSTALL_DIR
) $(1)/usr
/sbin
109 $(INSTALL_DIR
) $(1)/lib
/upgrade
/keep.d
110 $(INSTALL_DIR
) $(1)/usr
/share
/doc
/nebula-cert
111 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/nebula-cert
$(1)/usr
/sbin
/
112 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/LICENSE
$(1)/usr
/share
/doc
/nebula-cert
/LICENSE
113 $(INSTALL_DATA
) .
/files
/nebula.upgrade
$(1)/lib
/upgrade
/keep.d
/nebula-cert
116 define Package
/nebula-proto
/install
117 $(call GoPackage
/Package
/Install
/Bin
,$(PKG_INSTALL_DIR
))
118 $(INSTALL_DIR
) $(1)/lib
/netifd
/proto
119 $(INSTALL_BIN
) .
/files
/nebula.proto
$(1)/lib
/netifd
/proto
/nebula.sh
120 $(SED
) "s|^\(readonly PKG_VERSION\).*|\1='$(PKG_VERSION)-$(PKG_RELEASE)'|" $(1)/lib
/netifd
/proto
/nebula.sh
123 define Package
/nebula-service
/install
124 $(call GoPackage
/Package
/Install
/Bin
,$(PKG_INSTALL_DIR
))
125 $(INSTALL_DIR
) $(1)/etc
/init.d
126 $(INSTALL_BIN
) .
/files
/nebula.init
$(1)/etc
/init.d
/nebula
127 $(SED
) "s|^\(readonly PKG_VERSION\).*|\1='$(PKG_VERSION)-$(PKG_RELEASE)'|" $(1)/etc
/init.d
/nebula
130 $(eval
$(call GoBinPackage
,nebula
))
131 $(eval
$(call BuildPackage
,nebula
))
133 $(eval
$(call GoBinPackage
,nebula-cert
))
134 $(eval
$(call BuildPackage
,nebula-cert
))
136 $(eval
$(call BuildPackage
,nebula-proto
))
138 $(eval
$(call BuildPackage
,nebula-service
))