n2n: update to 3.0 (#8390)

This commit is contained in:
AmadeusGhost 2021-12-16 12:54:28 +08:00 committed by GitHub
parent 6e5aaa7b3d
commit 95afa84a8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,20 +5,18 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=n2n
PKG_SOURCE_URL:=https://github.com/ntop/n2n.git
PKG_SOURCE_VERSION:=99e56e9f3c34c49eeb297971d41150b433489120
PKG_VERSION:=2.8.1_git-$(PKG_SOURCE_VERSION)
PKG_VERSION:=3.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://codeload.github.com/ntop/n2n/tar.gz/$(PKG_VERSION)?
PKG_HASH:=25fcabba7bfcf25f4c9cd7fecc7ce11de48beb0b0f3506053d8485604ea8f50d
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILE:=LICENSE
PKG_MAINTAINER:=Emanuele Faranda <faranda@ntop.org>
PKG_LICENSE:=GPL3
PKG_BUILD_PARALLEL:=1
# autogen fix
PKG_BUILD_PARALLEL:=1
PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk
@ -29,33 +27,19 @@ define Package/n2n/Default
TITLE:=N2N Peer-to-peer VPN
URL:=http://www.ntop.org/n2n
SUBMENU:=VPN
DEPENDS:=+libcap +libopenssl +libzstd +resolveip
endef
define Package/n2n-edge
$(call Package/n2n/Default)
TITLE+= client (edge node)
DEPENDS+=+kmod-tun +resolveip +libopenssl +libcap +libzstd
endef
define Package/n2n-supernode
$(call Package/n2n/Default)
TITLE+= server (supernode)
DEPENDS+=+libcap
DEPENDS+=+kmod-tun
endef
define Package/n2n-edge/description
The client node for the N2N infrastructure
endef
define Package/n2n-supernode/description
The supernode for the N2N infrastructure
endef
define Build/Configure
( cd $(PKG_BUILD_DIR); ./autogen.sh )
$(call Build/Configure/Default)
endef
define Package/n2n-edge/conffiles
/etc/config/n2n-edge.conf
endef
@ -69,6 +53,15 @@ define Package/n2n-edge/install
$(INSTALL_DATA) ./files/n2n_v2.config $(1)/etc/config/n2n_v2
endef
define Package/n2n-supernode
$(call Package/n2n/Default)
TITLE+= server (supernode)
endef
define Package/n2n-supernode/description
The supernode for the N2N infrastructure
endef
define Package/n2n-supernode/conffiles
/etc/config/n2n-supernode.conf
endef
@ -78,5 +71,11 @@ define Package/n2n-supernode/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/supernode $(1)/usr/bin/
endef
define Build/Configure
( cd $(PKG_BUILD_DIR); \
./autogen.sh; \
./configure CFLAGS="-O3" )
endef
$(eval $(call BuildPackage,n2n-edge))
$(eval $(call BuildPackage,n2n-supernode))