mirror of
https://github.com/ntop/n2n.git
synced 2024-09-20 00:51:10 +02:00
Unify n2n version
This commit is contained in:
parent
1c9e029b88
commit
cb43d0cf64
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,6 +2,7 @@
|
||||||
*.a
|
*.a
|
||||||
*.gz
|
*.gz
|
||||||
configure
|
configure
|
||||||
|
configure.ac
|
||||||
config.*
|
config.*
|
||||||
Makefile
|
Makefile
|
||||||
autom4te.cache
|
autom4te.cache
|
||||||
|
|
|
@ -2,7 +2,7 @@ project(n2n)
|
||||||
cmake_minimum_required(VERSION 2.6)
|
cmake_minimum_required(VERSION 2.6)
|
||||||
|
|
||||||
# N2n information
|
# N2n information
|
||||||
set(N2N_VERSION 2.5.0)
|
set(N2N_VERSION 2.5.1)
|
||||||
set(N2N_OSNAME ${CMAKE_SYSTEM})
|
set(N2N_OSNAME ${CMAKE_SYSTEM})
|
||||||
|
|
||||||
# N2n specific params
|
# N2n specific params
|
||||||
|
|
|
@ -1,8 +1,3 @@
|
||||||
|
|
||||||
N2N_VERSION=@N2N_VERSION@
|
|
||||||
|
|
||||||
########
|
|
||||||
|
|
||||||
CC?=gcc
|
CC?=gcc
|
||||||
DEBUG?=-g3
|
DEBUG?=-g3
|
||||||
#OPTIMIZATION?=-O2
|
#OPTIMIZATION?=-O2
|
||||||
|
@ -102,8 +97,8 @@ install: edge supernode edge.8.gz supernode.1.gz n2n.7.gz
|
||||||
|
|
||||||
# Docker builder section
|
# Docker builder section
|
||||||
DOCKER_IMAGE_NAME=ntop/supernode
|
DOCKER_IMAGE_NAME=ntop/supernode
|
||||||
DOCKER_IMAGE_VERSION=$N2N_VERSION
|
DOCKER_IMAGE_VERSION=@N2N_VERSION_SHORT@
|
||||||
N2N_COMMIT_HASH=21055550f3392235a1b41d71257e9dc9ead0dfa0
|
N2N_COMMIT_HASH=@GIT_REVISION@
|
||||||
|
|
||||||
default: steps
|
default: steps
|
||||||
|
|
||||||
|
|
14
autogen.sh
14
autogen.sh
|
@ -1,5 +1,19 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# NOTE: update version in CMakeLists.txt after changing these
|
||||||
|
N2N_MAJOR="2"
|
||||||
|
N2N_MINOR="5"
|
||||||
|
N2N_PATCH="1"
|
||||||
|
|
||||||
|
N2N_VERSION_SHORT="$N2N_MAJOR.$N2N_MINOR.$N2N_PATCH"
|
||||||
|
|
||||||
|
cat configure.seed | sed \
|
||||||
|
-e "s/@N2N_MAJOR@/$N2N_MAJOR/g" \
|
||||||
|
-e "s/@N2N_MINOR@/$N2N_MINOR/g" \
|
||||||
|
-e "s/@N2N_PATCH@/$N2N_PATCH/g" \
|
||||||
|
-e "s/@N2N_VERSION_SHORT@/$N2N_VERSION_SHORT/g" \
|
||||||
|
> configure.ac
|
||||||
|
|
||||||
rm -f config.h config.h.in *~ Makefile configure #*
|
rm -f config.h config.h.in *~ Makefile configure #*
|
||||||
|
|
||||||
echo "Wait please..."
|
echo "Wait please..."
|
||||||
|
|
|
@ -1,8 +1,14 @@
|
||||||
odnl> Do not add anything above
|
odnl> Do not add anything above
|
||||||
AC_INIT([edge],2.5.0)
|
AC_INIT([edge],@N2N_VERSION_SHORT@)
|
||||||
dnl> Do not add anything above
|
dnl> Do not add anything above
|
||||||
|
|
||||||
N2N_VERSION=2.5.0
|
if test -d ".git"; then
|
||||||
|
GIT_COMMITS=`git rev-list --count HEAD`
|
||||||
|
GIT_REVISION=`git rev-parse --short HEAD`
|
||||||
|
GIT_RELEASE="@N2N_VERSION_SHORT@.r${GIT_COMMITS}.${GIT_REVISION}"
|
||||||
|
else
|
||||||
|
GIT_RELEASE=@N2N_VERSION_SHORT@
|
||||||
|
fi
|
||||||
|
|
||||||
AC_CHECK_LIB([crypto], [AES_cbc_encrypt])
|
AC_CHECK_LIB([crypto], [AES_cbc_encrypt])
|
||||||
|
|
||||||
|
@ -30,6 +36,7 @@ dnl> wget -O config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=bl
|
||||||
OSNAME=`./config.guess`
|
OSNAME=`./config.guess`
|
||||||
fi
|
fi
|
||||||
AC_DEFINE_UNQUOTED(PACKAGE_OSNAME, "${OSNAME}", [OS name])
|
AC_DEFINE_UNQUOTED(PACKAGE_OSNAME, "${OSNAME}", [OS name])
|
||||||
|
AC_DEFINE_UNQUOTED(GIT_RELEASE, "${GIT_RELEASE}", [GIT release])
|
||||||
|
|
||||||
if test $MACHINE = "x86_64"; then
|
if test $MACHINE = "x86_64"; then
|
||||||
EXTN="amd64"
|
EXTN="amd64"
|
||||||
|
@ -41,7 +48,13 @@ fi
|
||||||
|
|
||||||
DATE=`date +"%Y-%m-%d"`
|
DATE=`date +"%Y-%m-%d"`
|
||||||
|
|
||||||
AC_SUBST(N2N_VERSION)
|
AC_SUBST(N2N_MAJOR)
|
||||||
|
AC_SUBST(N2N_MINOR)
|
||||||
|
AC_SUBST(N2N_PATCH)
|
||||||
|
AC_SUBST(N2N_VERSION_SHORT)
|
||||||
|
AC_SUBST(GIT_COMMITS)
|
||||||
|
AC_SUBST(GIT_REVISION)
|
||||||
|
AC_SUBST(GIT_RELEASE)
|
||||||
AC_SUBST(N2N_DEFINES)
|
AC_SUBST(N2N_DEFINES)
|
||||||
AC_SUBST(N2N_LIBS)
|
AC_SUBST(N2N_LIBS)
|
||||||
AC_CONFIG_HEADERS(config.h)
|
AC_CONFIG_HEADERS(config.h)
|
4
n2n.c
4
n2n.c
|
@ -257,8 +257,8 @@ void hexdump(const uint8_t * buf, size_t len)
|
||||||
void print_n2n_version() {
|
void print_n2n_version() {
|
||||||
printf("Welcome to n2n v.%s for %s\n"
|
printf("Welcome to n2n v.%s for %s\n"
|
||||||
"Built on %s\n"
|
"Built on %s\n"
|
||||||
"Copyright 2007-18 - ntop.org and contributors\n\n",
|
"Copyright 2007-19 - ntop.org and contributors\n\n",
|
||||||
PACKAGE_VERSION, PACKAGE_OSNAME, PACKAGE_BUILDDATE);
|
GIT_RELEASE, PACKAGE_OSNAME, PACKAGE_BUILDDATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* *********************************************** */
|
/* *********************************************** */
|
||||||
|
|
|
@ -25,18 +25,12 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
APP=n2n
|
APP=n2n
|
||||||
N2N_VERS=`grep N2N_VERSION ../../Makefile | head -1| cut -d "=" -f 2`
|
|
||||||
GIT_RELEASE=`git rev-parse HEAD`
|
|
||||||
GIT_COMMITS=`git rev-list --all |wc -l | tr -d '[[:space:]]'`
|
|
||||||
DATE=`date -R`
|
DATE=`date -R`
|
||||||
|
|
||||||
AC_SUBST(APP)
|
AC_SUBST(APP)
|
||||||
AC_SUBST(N2N_VERS)
|
|
||||||
AC_SUBST(MACHINE)
|
AC_SUBST(MACHINE)
|
||||||
AC_SUBST(EXTN)
|
AC_SUBST(EXTN)
|
||||||
AC_SUBST(DATE)
|
AC_SUBST(DATE)
|
||||||
AC_SUBST(GIT_RELEASE)
|
|
||||||
AC_SUBST(GIT_COMMITS)
|
|
||||||
|
|
||||||
AC_CONFIG_FILES(debian/changelog)
|
AC_CONFIG_FILES(debian/changelog)
|
||||||
AC_CONFIG_FILES(debian/files)
|
AC_CONFIG_FILES(debian/files)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
@APP@ (@N2N_VERS@-@GIT_COMMITS@) table; urgency=high
|
@APP@ (@N2N_VERSION_SHORT@-@GIT_COMMITS@) table; urgency=high
|
||||||
* Last packaged version
|
* Last packaged version
|
||||||
|
|
||||||
-- Luca Deri <deri@ntop.org> @DATE@
|
-- Luca Deri <deri@ntop.org> @DATE@
|
||||||
|
|
|
@ -2,7 +2,7 @@ Source: n2n
|
||||||
Section: net
|
Section: net
|
||||||
Priority: extra
|
Priority: extra
|
||||||
Maintainer: Luca Deri <deri@ntop.org>
|
Maintainer: Luca Deri <deri@ntop.org>
|
||||||
Standards-Version: @N2N_VERS@
|
Standards-Version: @N2N_VERSION_SHORT@
|
||||||
Build-Depends:
|
Build-Depends:
|
||||||
|
|
||||||
Package: n2n
|
Package: n2n
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
n2n_@N2N_VERS@_@EXTN@.deb free optional
|
n2n_@N2N_VERSION_SHORT@_@EXTN@.deb free optional
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
N2N_HOME=$(PWD)/../..
|
N2N_HOME=$(PWD)/../..
|
||||||
N2N_BUILD=${N2N_HOME}/packages/debian/n2n
|
N2N_BUILD=${N2N_HOME}/packages/debian/n2n
|
||||||
PLATFORM=@MACHINE@
|
PLATFORM=@MACHINE@
|
||||||
RPM_PKG=n2n-@N2N_VERS@-@REVISION@.$(PLATFORM).rpm
|
RPM_PKG=n2n-@N2N_VERSION_SHORT@-@GIT_COMMITS@.$(PLATFORM).rpm
|
||||||
|
|
||||||
all: clean pkg
|
all: clean pkg
|
||||||
|
|
||||||
|
|
|
@ -20,20 +20,12 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
APP=n2n
|
APP=n2n
|
||||||
N2N_VERS=`grep N2N_VERSION ../../Makefile | head -1| cut -d "=" -f 2`
|
|
||||||
GIT_RELEASE=`git rev-parse HEAD`
|
|
||||||
GIT_COMMITS=`git rev-list --all |wc -l | tr -d '[[:space:]]'`
|
|
||||||
DATE=`date -R`
|
DATE=`date -R`
|
||||||
REVISION=`git log --pretty=oneline | wc -l`
|
|
||||||
|
|
||||||
AC_SUBST(APP)
|
AC_SUBST(APP)
|
||||||
AC_SUBST(N2N_VERS)
|
|
||||||
AC_SUBST(MACHINE)
|
AC_SUBST(MACHINE)
|
||||||
AC_SUBST(EXTN)
|
AC_SUBST(EXTN)
|
||||||
AC_SUBST(DATE)
|
AC_SUBST(DATE)
|
||||||
AC_SUBST(GIT_RELEASE)
|
|
||||||
AC_SUBST(GIT_COMMITS)
|
|
||||||
AC_SUBST(REVISION)
|
|
||||||
|
|
||||||
AC_CONFIG_FILES(n2n.spec)
|
AC_CONFIG_FILES(n2n.spec)
|
||||||
AC_CONFIG_FILES(../etc/systemd/system/edge.service)
|
AC_CONFIG_FILES(../etc/systemd/system/edge.service)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
Summary: n2n peer-to-peer VPN
|
Summary: n2n peer-to-peer VPN
|
||||||
Name: n2n
|
Name: n2n
|
||||||
Version: @N2N_VERS@
|
Version: @N2N_VERSION_SHORT@
|
||||||
Release: @REVISION@
|
Release: @GIT_COMMITS@
|
||||||
License: GPL
|
License: GPL
|
||||||
Group: Networking/Utilities
|
Group: Networking/Utilities
|
||||||
URL: http://www.ntop.org/
|
URL: http://www.ntop.org/
|
||||||
|
|
|
@ -5,3 +5,4 @@
|
||||||
|
|
||||||
/* Define to the version of this package. */
|
/* Define to the version of this package. */
|
||||||
#define PACKAGE_VERSION N2N_VERSION
|
#define PACKAGE_VERSION N2N_VERSION
|
||||||
|
#define GIT_RELEASE N2N_VERSION
|
||||||
|
|
Loading…
Reference in New Issue
Block a user