diff mbox series

[v2,2/2] package/netbird: new package

Message ID 20241028161507.186161-2-james.hilliard1@gmail.com
State New
Headers show
Series [v2,1/2] package/pkg-golang.mk: make GOPROXY configurable | expand

Commit Message

James Hilliard Oct. 28, 2024, 4:15 p.m. UTC
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
Changes v1 -> v2:
  - remove package specific GOPROXY
  - update to 0.30.3
---
 DEVELOPERS                   |  1 +
 package/Config.in            |  1 +
 package/netbird/Config.in    | 10 ++++++++++
 package/netbird/netbird.hash |  3 +++
 package/netbird/netbird.mk   | 25 +++++++++++++++++++++++++
 5 files changed, 40 insertions(+)
 create mode 100644 package/netbird/Config.in
 create mode 100644 package/netbird/netbird.hash
 create mode 100644 package/netbird/netbird.mk
diff mbox series

Patch

diff --git a/DEVELOPERS b/DEVELOPERS
index 9743ae30d4..be40f986b7 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1509,6 +1509,7 @@  F:	package/libucontext/
 F:	package/lilv/
 F:	package/lv2/
 F:	package/neon-2-sse/
+F:	package/netbird/
 F:	package/pipewire/
 F:	package/python*
 F:	package/rtl8192eu/
diff --git a/package/Config.in b/package/Config.in
index 57a95a6ea8..dcc1cc8268 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2550,6 +2550,7 @@  endif
 	source "package/ndisc6/Config.in"
 	source "package/net-tools/Config.in"
 	source "package/netatalk/Config.in"
+	source "package/netbird/Config.in"
 	source "package/netcalc/Config.in"
 	source "package/netcat/Config.in"
 	source "package/netcat-openbsd/Config.in"
diff --git a/package/netbird/Config.in b/package/netbird/Config.in
new file mode 100644
index 0000000000..b2e1eb6fd5
--- /dev/null
+++ b/package/netbird/Config.in
@@ -0,0 +1,10 @@ 
+config BR2_PACKAGE_NETBIRD
+	bool "netbird"
+	depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
+	select BR2_PACKAGE_HOST_GO
+	help
+	  Connect your devices into a secure WireGuard-based
+	  overlay network with SSO, MFA and granular access
+	  controls.
+
+	  https://github.com/netbirdio/netbird
diff --git a/package/netbird/netbird.hash b/package/netbird/netbird.hash
new file mode 100644
index 0000000000..08ba5913a0
--- /dev/null
+++ b/package/netbird/netbird.hash
@@ -0,0 +1,3 @@ 
+# Locally computed
+sha256  c736d7d3796eb7a5446ff0ccc562e4f79d8fa6f33e11047e4af9cb3202a4c7e3  netbird-0.30.3-go2.tar.gz
+sha256  c9f34c452ac8f054df592e3eeca0e271b91e8010c0fc6cf8c76aabf547a9388d  LICENSE
diff --git a/package/netbird/netbird.mk b/package/netbird/netbird.mk
new file mode 100644
index 0000000000..c7be6ef213
--- /dev/null
+++ b/package/netbird/netbird.mk
@@ -0,0 +1,25 @@ 
+################################################################################
+#
+# netbird
+#
+################################################################################
+
+NETBIRD_VERSION = 0.30.3
+NETBIRD_SITE = $(call github,netbirdio,netbird,v$(NETBIRD_VERSION))
+NETBIRD_LICENSE = BSD-3-Clause
+NETBIRD_LICENSE_FILES = LICENSE
+NETBIRD_GOMOD = github.com/netbirdio/netbird
+NETBIRD_BUILD_TARGETS = client
+NETBIRD_LDFLAGS = \
+	-X github.com/netbirdio/netbird/version.version=$(NETBIRD_VERSION)
+
+define NETBIRD_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/bin/client $(TARGET_DIR)/usr/bin/netbird
+endef
+
+define NETBIRD_LINUX_CONFIG_FIXUPS
+	$(call KCONFIG_ENABLE_OPT,CONFIG_TUN)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_WIREGUARD)
+endef
+
+$(eval $(golang-package))