mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
Switch to the new automagic beta numbering scheme.
* configure.ac: Add all the required m4 magic. -- This also removes the hack to allow custom version numbers which are not considered a development version. A custom version number can be done anyway by simply setting the version to it and tag the release with it. This is a backport from master including the later patch to use rev-parse.
This commit is contained in:
parent
681338bfd3
commit
18ae751f28
4
README.maint
Normal file
4
README.maint
Normal file
@ -0,0 +1,4 @@
|
||||
Notes for the GnuPG maintainer (GIT only)
|
||||
============================================
|
||||
|
||||
Please see GIT master for the current version of this file.
|
52
configure.ac
52
configure.ac
@ -22,24 +22,27 @@
|
||||
AC_PREREQ(2.61)
|
||||
min_automake_version="1.10"
|
||||
|
||||
# Remember to change the version number immediately *after* a release.
|
||||
# Set my_issvn to "yes" for non-released code. Remember to run an
|
||||
# "svn up" and "autogen.sh" right before creating a distribution.
|
||||
m4_define([my_version], [2.0.20])
|
||||
m4_define([my_issvn], [yes])
|
||||
# To build a release you need to create a tag with the version number
|
||||
# (git tag -s gnupg-2.n.m) and run "./autogen.sh --force". Please
|
||||
# bump the version number immediately *after* the release and do
|
||||
# another commit and push so that the git magic is able to work.
|
||||
m4_define([mym4_version], [2.0.20])
|
||||
|
||||
m4_define([svn_revision], m4_esyscmd([printf "%d" $(svn info 2>/dev/null \
|
||||
| sed -n '/^Revision:/ s/[^0-9]//gp'|head -1)]))
|
||||
m4_define([git_revision], m4_esyscmd([git branch -v 2>/dev/null \
|
||||
| awk '/^\* / {printf "%s",$3}']))
|
||||
m4_define([my_full_version], [my_version[]m4_if(my_issvn,[yes],
|
||||
[m4_if(git_revision,[],[-svn[]svn_revision],[-git[]git_revision])])])
|
||||
# Below is m4 magic to extract and compute the git revision number,
|
||||
# the decimalized short revision number, a beta version string and a
|
||||
# flag indicating a development version (mym4_isgit). Note that the
|
||||
# m4 processing is done by autoconf and not during the configure run.
|
||||
m4_define([mym4_revision],
|
||||
m4_esyscmd([git rev-parse --short HEAD | tr -d '\n\r']))
|
||||
m4_define([mym4_revision_dec],
|
||||
m4_esyscmd_s([echo $((0x$(echo ]mym4_revision[|head -c 4)))]))
|
||||
m4_define([mym4_betastring],
|
||||
m4_esyscmd_s([git describe --match 'gnupg-2.[0-9].*[0-9]' --long|\
|
||||
awk -F- '$3!=0{print"-beta"$3}']))
|
||||
m4_define([mym4_isgit],m4_if(mym4_betastring,[],[no],[yes]))
|
||||
m4_define([mym4_full_version],[mym4_version[]mym4_betastring])
|
||||
|
||||
AC_INIT([gnupg],[my_full_version],[http://bugs.gnupg.org])
|
||||
# Set development_version to yes if the minor number is odd or you
|
||||
# feel that the default check for a development version is not
|
||||
# sufficient.
|
||||
development_version=no
|
||||
AC_INIT([gnupg],[mym4_full_version], [http://bugs.gnupg.org])
|
||||
|
||||
NEED_GPG_ERROR_VERSION=1.7
|
||||
|
||||
@ -52,7 +55,7 @@ NEED_LIBASSUAN_VERSION=2.0.0
|
||||
NEED_KSBA_API=1
|
||||
NEED_KSBA_VERSION=1.0.7
|
||||
|
||||
|
||||
development_version=mym4_isgit
|
||||
PACKAGE=$PACKAGE_NAME
|
||||
PACKAGE_GT=${PACKAGE_NAME}2
|
||||
VERSION=$PACKAGE_VERSION
|
||||
@ -1252,19 +1255,7 @@ AC_SUBST(ZLIBS)
|
||||
# Check for readline support
|
||||
GNUPG_CHECK_READLINE
|
||||
|
||||
#
|
||||
# Allow users to append something to the version string without
|
||||
# flagging it as development version. The user version parts is
|
||||
# considered everything after a dash.
|
||||
#
|
||||
if test "$development_version" != yes; then
|
||||
changequote(,)dnl
|
||||
tmp_pat='[a-zA-Z]'
|
||||
changequote([,])dnl
|
||||
if echo "$VERSION" | sed 's/-.*//' | grep "$tmp_pat" >/dev/null ; then
|
||||
development_version=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$development_version" = yes; then
|
||||
AC_DEFINE(IS_DEVELOPMENT_VERSION,1,
|
||||
[Defined if this is not a regular release])
|
||||
@ -1521,6 +1512,7 @@ AC_OUTPUT
|
||||
echo "
|
||||
GnuPG v${VERSION} has been configured as follows:
|
||||
|
||||
Revision: mym4_revision (mym4_revision_dec)
|
||||
Platform: $PRINTABLE_OS_NAME ($host)
|
||||
|
||||
OpenPGP: $build_gpg
|
||||
|
Loading…
x
Reference in New Issue
Block a user