netbird: update to 0.27.3
[feed/packages.git] / net / netbird / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=netbird
4 PKG_VERSION:=0.27.3
5 PKG_RELEASE:=1
6
7 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
8 PKG_SOURCE_URL:=https://codeload.github.com/netbirdio/netbird/tar.gz/v$(PKG_VERSION)?
9 PKG_HASH:=f172798f164b7484b231adc656eaf1090b6f7d9e7d7c3753f1e611bdf82ae738
10
11 PKG_MAINTAINER:=Oskari Rauta <oskari.rauta@gmail.com>
12 PKG_LICENSE:=BSD-3-Clause
13 PKG_LICENSE_FILES:=LICENSE
14
15 PKG_BUILD_DEPENDS:=golang/host
16 PKG_BUILD_PARALLEL:=1
17 PKG_BUILD_FLAGS:=no-mips16
18
19 GO_PKG:=github.com/netbirdio/netbird
20 GO_PKG_BUILD_PKG:=$(GO_PKG)/client
21 GO_PKG_LDFLAGS_X:=$(GO_PKG)/version.version=$(PKG_VERSION)
22
23 include $(INCLUDE_DIR)/package.mk
24 include ../../lang/golang/golang-package.mk
25
26 define Package/netbird
27 SECTION:=net
28 CATEGORY:=Network
29 SUBMENU:=VPN
30 TITLE:=Connect your devices into a single secure private WireGuard®-based mesh network
31 URL:=https://netbird.io
32 DEPENDS:=$(GO_ARCH_DEPENDS)
33 endef
34
35 define Package/netbird/description
36 NetBird is an open-source VPN management platform built on top of WireGuard® making it easy to create
37 secure private networks for your organization or home.
38
39 It requires zero configuration effort leaving behind the hassle of opening ports, complex firewall rules, VPN
40 gateways, and so forth.
41 endef
42
43 define Package/netbird/conffiles
44 /etc/netbird/config.json
45 endef
46
47 # Workaround for musl 1.2.4 compability in mattn/go-sqlite3
48 # https://github.com/mattn/go-sqlite3/issues/1164
49 ifneq ($(CONFIG_USE_MUSL),)
50 TARGET_CFLAGS += -D_LARGEFILE64_SOURCE
51 endif
52
53 define Package/netbird/install
54 $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
55 $(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d
56 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/client $(1)/usr/bin/netbird
57 $(INSTALL_BIN) ./files/netbird.init $(1)/etc/init.d/netbird
58 endef
59
60 $(eval $(call GoBinPackage,netbird))
61 $(eval $(call BuildPackage,netbird))