Added script to get the package version
This commit is contained in:
Vendored
+15
-6
@@ -584,7 +584,6 @@ PACKAGE_URL=''
|
||||
ac_subst_vars='LTLIBOBJS
|
||||
LIBOBJS
|
||||
GIT_REVISION
|
||||
GIT_RELEASE
|
||||
KERNEL
|
||||
DATE
|
||||
EXTN
|
||||
@@ -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]
|
||||
@@ -1694,9 +1705,8 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
PACKAGE_VERSION=`cat ../../configure.ac|grep C_INIT|cut -c 21-|rev|cut -c 3-|rev`
|
||||
GIT_RELEASE=`git rev-parse HEAD`
|
||||
GIT_REVISION=`git rev-list --all |wc -l | tr -d '[:space:]'`
|
||||
PACKAGE_VERSION=`../version.sh --release`
|
||||
GIT_REVISION=`../version.sh --revision`
|
||||
|
||||
ac_config_files="$ac_config_files Makefile ndpi.spec"
|
||||
|
||||
@@ -1709,7 +1719,6 @@ ac_config_files="$ac_config_files Makefile ndpi.spec"
|
||||
|
||||
|
||||
|
||||
|
||||
cat >confcache <<\_ACEOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
# tests run on this system so they can be shared between configure
|
||||
|
||||
@@ -25,9 +25,8 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
PACKAGE_VERSION=`cat ../../configure.ac|grep C_INIT|cut -c 21-|rev|cut -c 3-|rev`
|
||||
GIT_RELEASE=`git rev-parse HEAD`
|
||||
GIT_REVISION=`git rev-list --all |wc -l | tr -d '[[:space:]]'`
|
||||
PACKAGE_VERSION=`../version.sh --release`
|
||||
GIT_REVISION=`../version.sh --revision`
|
||||
|
||||
AC_CONFIG_FILES([Makefile ndpi.spec])
|
||||
|
||||
@@ -37,7 +36,6 @@ AC_SUBST(MACHINE)
|
||||
AC_SUBST(EXTN)
|
||||
AC_SUBST(DATE)
|
||||
AC_SUBST(KERNEL)
|
||||
AC_SUBST(GIT_RELEASE)
|
||||
AC_SUBST(GIT_REVISION)
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
Vendored
+15
-6
@@ -584,7 +584,6 @@ PACKAGE_URL=''
|
||||
ac_subst_vars='LTLIBOBJS
|
||||
LIBOBJS
|
||||
GIT_REVISION
|
||||
GIT_RELEASE
|
||||
KERNEL
|
||||
DATE
|
||||
EXTN
|
||||
@@ -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]
|
||||
@@ -1693,9 +1704,8 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
NDPI_VERS=`cat ../../configure.ac|grep C_INIT|cut -c 21-|rev|cut -c 3-|rev`
|
||||
GIT_RELEASE=`git rev-parse HEAD`
|
||||
GIT_REVISION=`git rev-list --all |wc -l | tr -d '[:space:]'`
|
||||
NDPI_VERS=`../version.sh --release`
|
||||
GIT_REVISION=`../version.sh --revision`
|
||||
|
||||
ac_config_files="$ac_config_files Makefile debian/changelog debian/files debian/control"
|
||||
|
||||
@@ -1707,7 +1717,6 @@ ac_config_files="$ac_config_files Makefile debian/changelog debian/files debian/
|
||||
|
||||
|
||||
|
||||
|
||||
cat >confcache <<\_ACEOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
# tests run on this system so they can be shared between configure
|
||||
|
||||
@@ -24,9 +24,8 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
NDPI_VERS=`cat ../../configure.ac|grep C_INIT|cut -c 21-|rev|cut -c 3-|rev`
|
||||
GIT_RELEASE=`git rev-parse HEAD`
|
||||
GIT_REVISION=`git rev-list --all |wc -l | tr -d '[[:space:]]'`
|
||||
NDPI_VERS=`../version.sh --release`
|
||||
GIT_REVISION=`../version.sh --revision`
|
||||
|
||||
AC_CONFIG_FILES([Makefile debian/changelog debian/files debian/control])
|
||||
|
||||
@@ -35,7 +34,6 @@ AC_SUBST(MACHINE)
|
||||
AC_SUBST(EXTN)
|
||||
AC_SUBST(DATE)
|
||||
AC_SUBST(KERNEL)
|
||||
AC_SUBST(GIT_RELEASE)
|
||||
AC_SUBST(GIT_REVISION)
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
Executable
+37
@@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
|
||||
SCRIPTPATH="$(cd "$(dirname "$0")"; pwd -P)"
|
||||
RELEASE="$(cd ${SCRIPTPATH}; cat ../configure.ac|grep C_INIT|cut -c 21-|rev|cut -c 3-|rev)"
|
||||
REVISION="$(cd ${SCRIPTPATH}; git rev-list --all |wc -l | tr -d '[[:space:]]')"
|
||||
|
||||
get_release() {
|
||||
echo "${RELEASE}"
|
||||
exit 0
|
||||
}
|
||||
|
||||
get_revision() {
|
||||
echo "${REVISION}"
|
||||
exit 0
|
||||
}
|
||||
|
||||
get_version() {
|
||||
echo "${RELEASE}-${REVISION}"
|
||||
exit 0
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
--release)
|
||||
get_release;
|
||||
;;
|
||||
--revision)
|
||||
get_revision;
|
||||
;;
|
||||
--version)
|
||||
get_version;
|
||||
;;
|
||||
*)
|
||||
echo "Usage: ${0} {--release|--revision|--version}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user