mirror of
https://github.com/ntop/n2n.git
synced 2024-09-19 00:21:11 +02:00
Make all version calculations come from scripts/version.sh and remove resulting redundant substitutions
This commit is contained in:
parent
a4910ddc77
commit
ff72ed8190
|
@ -1,7 +1,6 @@
|
|||
|
||||
# NOTE: these are needed by the configure.in inside the packages folder
|
||||
N2N_VERSION_SHORT=@N2N_VERSION_SHORT@
|
||||
GIT_COMMITS=@GIT_COMMITS@
|
||||
N2N_VERSION=@N2N_VERSION@
|
||||
|
||||
########
|
||||
|
||||
|
@ -252,7 +251,7 @@ install: edge supernode edge.8.gz supernode.1.gz n2n.7.gz
|
|||
# Docker builder section
|
||||
DOCKER_IMAGE_NAME=ntop/supernode
|
||||
DOCKER_IMAGE_VERSION=$N2N_VERSION_SHORT
|
||||
N2N_COMMIT_HASH=@GIT_REVISION@
|
||||
N2N_COMMIT_HASH=$(shell scripts/version.sh hash)
|
||||
|
||||
default: steps
|
||||
|
||||
|
|
12
configure.ac
12
configure.ac
|
@ -2,13 +2,7 @@ odnl> Do not add anything above
|
|||
AC_INIT([edge], m4_esyscmd([scripts/version.sh | tr -d '\n']))
|
||||
dnl> Do not add anything above
|
||||
|
||||
N2N_VERSION_SHORT=$(scripts/version.sh short)
|
||||
|
||||
if test -d ".git"; then
|
||||
# NOTE: keep in sync with the definitions for configure.in files under the packages folder
|
||||
GIT_COMMITS=`git rev-list --count HEAD`
|
||||
GIT_REVISION=`git rev-parse --short HEAD`
|
||||
fi
|
||||
N2N_VERSION=${PACKAGE_VERSION}
|
||||
|
||||
if test "${CC+set}" != set; then
|
||||
CC=gcc
|
||||
|
@ -120,9 +114,7 @@ AC_SUBST(CC)
|
|||
AC_SUBST(AR)
|
||||
AC_SUBST(CFLAGS)
|
||||
AC_SUBST(LDFLAGS)
|
||||
AC_SUBST(N2N_VERSION_SHORT)
|
||||
AC_SUBST(GIT_COMMITS)
|
||||
AC_SUBST(GIT_REVISION)
|
||||
AC_SUBST(N2N_VERSION)
|
||||
AC_SUBST(N2N_DEFINES)
|
||||
AC_SUBST(N2N_LIBS)
|
||||
AC_SUBST(ADDITIONAL_TOOLS)
|
||||
|
|
7
packages/debian/configure
vendored
7
packages/debian/configure
vendored
|
@ -586,8 +586,7 @@ LIBOBJS
|
|||
EXTRA_DEP
|
||||
DATE
|
||||
EXTN
|
||||
GIT_COMMITS
|
||||
N2N_VERSION_SHORT
|
||||
N2N_VERSION
|
||||
APP
|
||||
target_alias
|
||||
host_alias
|
||||
|
@ -1694,8 +1693,7 @@ fi
|
|||
|
||||
|
||||
# NOTE: this file is not actually used. You need to edit configure as well!
|
||||
N2N_VERSION_SHORT=`grep N2N_VERSION_SHORT ../../Makefile | head -1| cut -d "=" -f 2`
|
||||
GIT_COMMITS=`grep GIT_COMMITS ../../Makefile | head -1| cut -d "=" -f 2`
|
||||
N2N_VERSION=$(../../scripts/version.sh)
|
||||
|
||||
DEBIAN_VERSION=`cat /etc/debian_version | grep "^8" | wc -l`
|
||||
|
||||
|
@ -1740,7 +1738,6 @@ DATE=`date -R`
|
|||
|
||||
|
||||
|
||||
|
||||
ac_config_files="$ac_config_files debian/changelog"
|
||||
|
||||
ac_config_files="$ac_config_files debian/files"
|
||||
|
|
|
@ -3,8 +3,7 @@ AC_INIT([Makefile.in], 1.0)
|
|||
AC_ARG_WITH(edgex, [ --with-edgex Build for Ubiquity-X])
|
||||
|
||||
# NOTE: this file is not actually used. You need to edit configure as well!
|
||||
N2N_VERSION_SHORT=`grep N2N_VERSION_SHORT ../../Makefile | head -1| cut -d "=" -f 2`
|
||||
GIT_COMMITS=`grep GIT_COMMITS ../../Makefile | head -1| cut -d "=" -f 2`
|
||||
N2N_VERSION=$(../../scripts/version.sh)
|
||||
|
||||
DEBIAN_VERSION=`cat /etc/debian_version | grep "^8" | wc -l`
|
||||
|
||||
|
@ -44,8 +43,7 @@ APP=n2n
|
|||
DATE=`date -R`
|
||||
|
||||
AC_SUBST(APP)
|
||||
AC_SUBST(N2N_VERSION_SHORT)
|
||||
AC_SUBST(GIT_COMMITS)
|
||||
AC_SUBST(N2N_VERSION)
|
||||
AC_SUBST(EXTN)
|
||||
AC_SUBST(DATE)
|
||||
AC_SUBST(EXTRA_DEP)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
@APP@ (@N2N_VERSION_SHORT@-@GIT_COMMITS@) table; urgency=high
|
||||
@APP@ (@N2N_VERSION@) table; urgency=high
|
||||
* Last packaged version
|
||||
|
||||
-- Luca Deri <deri@ntop.org> @DATE@
|
||||
|
|
|
@ -1 +1 @@
|
|||
n2n_@N2N_VERSION_SHORT@_@EXTN@.deb free optional
|
||||
n2n_@N2N_VERSION@_@EXTN@.deb free optional
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
N2N_HOME=$(PWD)/../..
|
||||
N2N_BUILD=${N2N_HOME}/packages/debian/n2n
|
||||
PLATFORM=@MACHINE@
|
||||
RPM_PKG=n2n-@N2N_VERSION_SHORT@-@GIT_COMMITS@.$(PLATFORM).rpm
|
||||
RPM_PKG=n2n-@N2N_VERSION_RPM@-1.$(PLATFORM).rpm
|
||||
|
||||
all: clean pkg
|
||||
|
||||
|
|
21
packages/rpm/configure
vendored
21
packages/rpm/configure
vendored
|
@ -586,8 +586,7 @@ LIBOBJS
|
|||
RPM_SIGN_CMD
|
||||
DATE
|
||||
EXTN
|
||||
GIT_COMMITS
|
||||
N2N_VERSION_SHORT
|
||||
N2N_VERSION_RPM
|
||||
MACHINE
|
||||
APP
|
||||
target_alias
|
||||
|
@ -609,6 +608,7 @@ infodir
|
|||
docdir
|
||||
oldincludedir
|
||||
includedir
|
||||
runstatedir
|
||||
localstatedir
|
||||
sharedstatedir
|
||||
sysconfdir
|
||||
|
@ -673,6 +673,7 @@ datadir='${datarootdir}'
|
|||
sysconfdir='${prefix}/etc'
|
||||
sharedstatedir='${prefix}/com'
|
||||
localstatedir='${prefix}/var'
|
||||
runstatedir='${localstatedir}/run'
|
||||
includedir='${prefix}/include'
|
||||
oldincludedir='/usr/include'
|
||||
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
|
||||
|
@ -925,6 +926,15 @@ do
|
|||
| -silent | --silent | --silen | --sile | --sil)
|
||||
silent=yes ;;
|
||||
|
||||
-runstatedir | --runstatedir | --runstatedi | --runstated \
|
||||
| --runstate | --runstat | --runsta | --runst | --runs \
|
||||
| --run | --ru | --r)
|
||||
ac_prev=runstatedir ;;
|
||||
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
|
||||
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
|
||||
| --run=* | --ru=* | --r=*)
|
||||
runstatedir=$ac_optarg ;;
|
||||
|
||||
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
|
||||
ac_prev=sbindir ;;
|
||||
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
|
||||
|
@ -1062,7 +1072,7 @@ fi
|
|||
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
|
||||
datadir sysconfdir sharedstatedir localstatedir includedir \
|
||||
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
|
||||
libdir localedir mandir
|
||||
libdir localedir mandir runstatedir
|
||||
do
|
||||
eval ac_val=\$$ac_var
|
||||
# Remove trailing slashes.
|
||||
|
@ -1215,6 +1225,7 @@ Fine tuning of the installation directories:
|
|||
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
|
||||
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
|
||||
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
|
||||
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
|
||||
--libdir=DIR object code libraries [EPREFIX/lib]
|
||||
--includedir=DIR C header files [PREFIX/include]
|
||||
--oldincludedir=DIR C header files for non-gcc [/usr/include]
|
||||
|
@ -1670,8 +1681,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
|||
|
||||
|
||||
# NOTE: this file is not actually used. You need to edit configure as well!
|
||||
N2N_VERSION_SHORT=`grep N2N_VERSION_SHORT ../../Makefile | head -1| cut -d "=" -f 2`
|
||||
GIT_COMMITS=`grep GIT_COMMITS ../../Makefile | head -1| cut -d "=" -f 2`
|
||||
N2N_VERSION_RPM=$(../../scripts/version.sh |tr - _)
|
||||
|
||||
MACHINE=`uname -m`
|
||||
SHORT_MACHINE=`uname -m | cut -b1-3`
|
||||
|
@ -1717,7 +1727,6 @@ fi
|
|||
|
||||
|
||||
|
||||
|
||||
ac_config_files="$ac_config_files n2n.spec"
|
||||
|
||||
ac_config_files="$ac_config_files ../etc/systemd/system/edge.service"
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
AC_INIT([Makefile.in], 1.0)
|
||||
|
||||
# NOTE: this file is not actually used. You need to edit configure as well!
|
||||
N2N_VERSION_SHORT=`grep N2N_VERSION_SHORT ../../Makefile | head -1| cut -d "=" -f 2`
|
||||
GIT_COMMITS=`grep GIT_COMMITS ../../Makefile | head -1| cut -d "=" -f 2`
|
||||
N2N_VERSION_RPM=$(../../scripts/version.sh |tr - _)
|
||||
|
||||
MACHINE=`uname -m`
|
||||
SHORT_MACHINE=`uname -m | cut -b1-3`
|
||||
|
@ -43,8 +42,7 @@ fi
|
|||
|
||||
AC_SUBST(APP)
|
||||
AC_SUBST(MACHINE)
|
||||
AC_SUBST(N2N_VERSION_SHORT)
|
||||
AC_SUBST(GIT_COMMITS)
|
||||
AC_SUBST(N2N_VERSION_RPM)
|
||||
AC_SUBST(EXTN)
|
||||
AC_SUBST(DATE)
|
||||
AC_SUBST(RPM_SIGN_CMD)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
Summary: n2n peer-to-peer VPN
|
||||
Name: n2n
|
||||
Version: @N2N_VERSION_SHORT@
|
||||
Version: @N2N_VERSION_RPM@
|
||||
Release: 1
|
||||
License: GPL
|
||||
Group: Networking/Utilities
|
||||
|
|
|
@ -3,11 +3,7 @@
|
|||
# Specifically for windows, where installing autoconf looks suspiciously
|
||||
# like boiling the ocean.
|
||||
|
||||
VERSION=$(cat VERSION)
|
||||
|
||||
sed \
|
||||
-e "s%@N2N_VERSION_SHORT@%$VERSION%g" \
|
||||
-e "s%@GIT_COMMITS@%FIXME%g" \
|
||||
-e "s%@CC@%gcc%g" \
|
||||
-e "s%@AR@%ar%g" \
|
||||
-e "s%@CFLAGS@%$CFLAGS%g" \
|
||||
|
|
Loading…
Reference in New Issue
Block a user