From a4d8d2459aa4fc0de453b23c34355311366f8d3b Mon Sep 17 00:00:00 2001 From: Oskari Rauta Date: Thu, 2 Feb 2023 13:06:08 +0000 Subject: [PATCH] netbird: new package MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Netbird is similar vpn service as tailscale and zerotier. Description: NetBird is an open-source VPN management platform built on top of WireGuard® making it easy to create secure private networks for your organization or home. It requires zero configuration effort leaving behind the hassle of opening ports, complex firewall rules, VPN gateways, and so forth. Signed-off-by: Oskari Rauta --- net/netbird/Makefile | 51 ++++++++++++++++++++++++++++++++++ net/netbird/files/netbird.init | 14 ++++++++++ 2 files changed, 65 insertions(+) create mode 100644 net/netbird/Makefile create mode 100755 net/netbird/files/netbird.init diff --git a/net/netbird/Makefile b/net/netbird/Makefile new file mode 100644 index 0000000000..561557203f --- /dev/null +++ b/net/netbird/Makefile @@ -0,0 +1,51 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=netbird +PKG_VERSION:=0.12.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/netbirdio/netbird/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=c88b65bb9358e5a6f9c34882e77a3414b02d4c5ac13b76fb2e60b952af6a18d7 + +PKG_MAINTAINER:=Oskari Rauta +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENSE + +PKG_BUILD_DEPENDS:=golang/host +PKG_BUILD_PARALLEL:=1 +PKG_USE_MIPS16:=0 + +GO_PKG:=github.com/netbirdio/netbird +GO_PKG_BUILD_PKG:=$(GO_PKG)/client +GO_PKG_LDFLAGS_X:=$(GO_PKG)/client/system.version=$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../../lang/golang/golang-package.mk + +define Package/netbird + SECTION:=net + CATEGORY:=Network + SUBMENU:=VPN + TITLE:=Connect your devices into a single secure private WireGuard®-based mesh network + URL:=https://netbird.io + DEPENDS:=$(GO_ARCH_DEPENDS) +endef + +define Package/netbird/description + NetBird is an open-source VPN management platform built on top of WireGuard® making it easy to create + secure private networks for your organization or home. + + It requires zero configuration effort leaving behind the hassle of opening ports, complex firewall rules, VPN + gateways, and so forth. +endef + +define Package/netbird/install + $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR)) + $(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/client $(1)/usr/bin/netbird + $(INSTALL_BIN) ./files/netbird.init $(1)/etc/init.d/netbird +endef + +$(eval $(call GoBinPackage,netbird)) +$(eval $(call BuildPackage,netbird)) diff --git a/net/netbird/files/netbird.init b/net/netbird/files/netbird.init new file mode 100755 index 0000000000..b7ccd2d4b2 --- /dev/null +++ b/net/netbird/files/netbird.init @@ -0,0 +1,14 @@ +#!/bin/sh /etc/rc.common + +START=99 +STOP=10 + +USE_PROCD=1 + +start_service() { + procd_open_instance + procd_set_param command /usr/bin/netbird + procd_append_param command service run + procd_set_param pidfile /var/run/netbird.pid + procd_close_instance +} -- 2.30.2