-# Copyright 2023 Stan Grishin (stangri@melmac.ca)
-# This is free software, licensed under the MIT License.
+# Copyright 2021-2023 Stan Grishin (stangri@melmac.ca)
+# This is free software, licensed under the Apache 2.0 License.
include $(TOPDIR)/rules.mk
PKG_NAME:=nebula
PKG_VERSION:=1.8.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/slackhq/nebula/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=203713c58d0ec8a10df2f605af791a77a33f825454911ac3a5313ced591547fd
PKG_MAINTAINER:=Stan Grishin <stangri@melmac.ca>
-PKG_LICENSE:=MIT
+PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:slack:nebula
PKG_BUILD_DEPENDS:=golang/host
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
include ../../lang/golang/golang-package.mk
-define Package/nebula
+define Package/nebula/Default
SECTION:=net
CATEGORY:=Network
- TITLE:=nebula
URL:=https://docs.openwrt.melmac.net/nebula/
+endef
+
+define Package/nebula
+ $(call Package/nebula/Default)
+ TITLE:=nebula
DEPENDS:=$(GO_ARCH_DEPENDS) +kmod-tun
endef
define Package/nebula-cert
- SECTION:=net
- CATEGORY:=Network
+ $(call Package/nebula/Default)
TITLE:=nebula-cert
- URL:=https://docs.openwrt.melmac.net/nebula/
DEPENDS:=$(GO_ARCH_DEPENDS)
endef
define Package/nebula-proto
- SECTION:=net
- CATEGORY:=Network
+ $(call Package/nebula/Default)
TITLE:=nebula-proto
- URL:=https://docs.openwrt.melmac.net/nebula/
DEPENDS:=nebula
DEPENDS+=+!BUSYBOX_DEFAULT_AWK:gawk
DEPENDS+=+!BUSYBOX_DEFAULT_GREP:grep
endef
define Package/nebula-service
- SECTION:=net
- CATEGORY:=Network
+ $(call Package/nebula/Default)
TITLE:=nebula-service
- URL:=https://docs.openwrt.melmac.net/nebula/
DEPENDS:=nebula
DEPENDS+=+!BUSYBOX_DEFAULT_AWK:gawk
DEPENDS+=+!BUSYBOX_DEFAULT_SED:sed
PKGARCH:=all
endef
-define Build/Compile
- $(call GoPackage/Build/Compile)
+define Package/nebula/description/Default
+ Nebula is a scalable overlay networking tool with a focus on performance, simplicity
+ and security. It lets you seamlessly connect computers anywhere in the world.
endef
define Package/nebula/description
-Nebula is a scalable overlay networking tool with a focus on performance, simplicity
-and security. It lets you seamlessly connect computers anywhere in the world.
-This package contains only nebula binary. Unless you want to start nebula manually,
-you may want to also install *either* 'nebula-service' *or* 'nebula-proto' package.
+ $(call Package/nebula/description/Default)
+ This package contains only nebula binary. Unless you want to start nebula manually,
+ you may want to also install *either* 'nebula-service' *or* 'nebula-proto' package.
endef
define Package/nebula-cert/description
-Nebula is a scalable overlay networking tool with a focus on performance, simplicity
-and security. It lets you seamlessly connect computers anywhere in the world.
-This package contains only nebula-cert binary.
+ $(call Package/nebula/description/Default)
+ This package contains only nebula-cert binary.
endef
define Package/nebula-proto/description
-Nebula is a scalable overlay networking tool with a focus on performance, simplicity
-and security. It lets you seamlessly connect computers anywhere in the world.
-This package contains only OpenWrt protocol/interface support for nebula.
+ $(call Package/nebula/description/Default)
+ This package contains only OpenWrt protocol/interface support for nebula.
endef
define Package/nebula-service/description
-Nebula is a scalable overlay networking tool with a focus on performance, simplicity
-and security. It lets you seamlessly connect computers anywhere in the world.
-This package contains only OpenWrt-specific init.d script for nebula.
+ $(call Package/nebula/description/Default)
+ This package contains only OpenWrt-specific init.d script for nebula.
+endef
+
+define Package/nebula/conffiles
+/etc/nebula/
endef
+Package/nebula-cert/conffiles = $(Package/nebula/conffiles)
+
define Package/nebula/install
$(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
$(INSTALL_DIR) $(1)/usr/sbin
- $(INSTALL_DIR) $(1)/lib/upgrade/keep.d
- $(INSTALL_DIR) $(1)/usr/share/doc/nebula
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nebula $(1)/usr/sbin/
- $(INSTALL_DATA) $(PKG_BUILD_DIR)/LICENSE $(1)/usr/share/doc/nebula/LICENSE
- $(INSTALL_DATA) ./files/nebula.upgrade $(1)/lib/upgrade/keep.d/nebula
endef
define Package/nebula-cert/install
$(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
$(INSTALL_DIR) $(1)/usr/sbin
- $(INSTALL_DIR) $(1)/lib/upgrade/keep.d
- $(INSTALL_DIR) $(1)/usr/share/doc/nebula-cert
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nebula-cert $(1)/usr/sbin/
- $(INSTALL_DATA) $(PKG_BUILD_DIR)/LICENSE $(1)/usr/share/doc/nebula-cert/LICENSE
- $(INSTALL_DATA) ./files/nebula.upgrade $(1)/lib/upgrade/keep.d/nebula-cert
endef
define Package/nebula-proto/install