mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
r13093: adding vendor patch level string as announced on samba-technical ml
(This used to be commit d40f06018b9197c35a10cc9ab284dd596244f47b)
This commit is contained in:
parent
bdc6f05af5
commit
19907887fc
@ -1,6 +1,12 @@
|
||||
########################################################
|
||||
# SAMBA Version #
|
||||
# #
|
||||
# Samba versions are as follows #
|
||||
# 3.0.x New production series #
|
||||
# 3.0.x{pre,rc}y Preview/Testing & RC #
|
||||
# 3.0.x[a-z] Patch releases #
|
||||
# 3.0.x[a-z]-VENDOR-z Vendor patch releases #
|
||||
# #
|
||||
# script/mkversion.sh #
|
||||
# will use this file to create #
|
||||
# include/version.h #
|
||||
@ -91,3 +97,4 @@ SAMBA_VERSION_IS_SVN_SNAPSHOT=yes
|
||||
# -> "CVS 3.0.0rc2-VendorVersion" #
|
||||
########################################################
|
||||
SAMBA_VERSION_VENDOR_SUFFIX=
|
||||
SAMBA_VENDOR_PATCH=
|
||||
|
@ -27,6 +27,7 @@ const char *samba_version_string(void)
|
||||
return SAMBA_VERSION_OFFICIAL_STRING;
|
||||
#else
|
||||
static fstring samba_version;
|
||||
fstring tmp_version;
|
||||
static BOOL init_samba_version;
|
||||
|
||||
if (init_samba_version)
|
||||
@ -36,6 +37,11 @@ const char *samba_version_string(void)
|
||||
SAMBA_VERSION_OFFICIAL_STRING,
|
||||
SAMBA_VERSION_VENDOR_SUFFIX);
|
||||
|
||||
#ifdef SAMBA_VENDOR_PATCH
|
||||
fstr_sprintf( tmp_version, "-%d", SAMBA_VENDOR_PATCH );
|
||||
fstrcat( samba_version, tmp_version );
|
||||
#endif
|
||||
|
||||
init_samba_version = True;
|
||||
return samba_version;
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
|
||||
VERSION_FILE=$1
|
||||
OUTPUT_FILE=$2
|
||||
@ -17,16 +16,12 @@ SOURCE_DIR=$3
|
||||
SAMBA_VERSION_MAJOR=`sed -n 's/^SAMBA_VERSION_MAJOR=//p' $SOURCE_DIR$VERSION_FILE`
|
||||
SAMBA_VERSION_MINOR=`sed -n 's/^SAMBA_VERSION_MINOR=//p' $SOURCE_DIR$VERSION_FILE`
|
||||
SAMBA_VERSION_RELEASE=`sed -n 's/^SAMBA_VERSION_RELEASE=//p' $SOURCE_DIR$VERSION_FILE`
|
||||
|
||||
SAMBA_VERSION_REVISION=`sed -n 's/^SAMBA_VERSION_REVISION=//p' $SOURCE_DIR$VERSION_FILE`
|
||||
|
||||
SAMBA_VERSION_PRE_RELEASE=`sed -n 's/^SAMBA_VERSION_PRE_RELEASE=//p' $SOURCE_DIR$VERSION_FILE`
|
||||
|
||||
SAMBA_VERSION_RC_RELEASE=`sed -n 's/^SAMBA_VERSION_RC_RELEASE=//p' $SOURCE_DIR$VERSION_FILE`
|
||||
|
||||
SAMBA_VERSION_IS_SVN_SNAPSHOT=`sed -n 's/^SAMBA_VERSION_IS_SVN_SNAPSHOT=//p' $SOURCE_DIR$VERSION_FILE`
|
||||
|
||||
SAMBA_VERSION_VENDOR_SUFFIX=`sed -n 's/^SAMBA_VERSION_VENDOR_SUFFIX=//p' $SOURCE_DIR$VERSION_FILE`
|
||||
SAMBA_VENDOR_PATCH=`sed -n 's/^SAMBA_VENDOR_PATCH=//p' $SOURCE_DIR$VERSION_FILE`
|
||||
|
||||
echo "/* Autogenerated by script/mkversion.sh */" > $OUTPUT_FILE
|
||||
|
||||
@ -35,13 +30,21 @@ echo "#define SAMBA_VERSION_MINOR ${SAMBA_VERSION_MINOR}" >> $OUTPUT_FILE
|
||||
echo "#define SAMBA_VERSION_RELEASE ${SAMBA_VERSION_RELEASE}" >> $OUTPUT_FILE
|
||||
|
||||
|
||||
##
|
||||
## start with "3.0.22"
|
||||
##
|
||||
SAMBA_VERSION_STRING="${SAMBA_VERSION_MAJOR}.${SAMBA_VERSION_MINOR}.${SAMBA_VERSION_RELEASE}"
|
||||
|
||||
|
||||
##
|
||||
## maybe add "3.0.22a" or "3.0.22pre1" or "3.0.22rc1"
|
||||
## We do not do pre or rc version on patch/letter releases
|
||||
##
|
||||
if test -n "${SAMBA_VERSION_REVISION}";then
|
||||
SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}${SAMBA_VERSION_REVISION}"
|
||||
echo "#define SAMBA_VERSION_REVISION \"${SAMBA_VERSION_REVISION}\"" >> $OUTPUT_FILE
|
||||
elif test -n "${SAMBA_VERSION_PRE_RELEASE}";then
|
||||
## maybe add "3.0.22pre2"
|
||||
SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}pre${SAMBA_VERSION_PRE_RELEASE}"
|
||||
echo "#define SAMBA_VERSION_PRE_RELEASE ${SAMBA_VERSION_PRE_RELEASE}" >> $OUTPUT_FILE
|
||||
elif test -n "${SAMBA_VERSION_RC_RELEASE}";then
|
||||
@ -49,7 +52,21 @@ elif test -n "${SAMBA_VERSION_RC_RELEASE}";then
|
||||
echo "#define SAMBA_VERSION_RC_RELEASE ${SAMBA_VERSION_RC_RELEASE}" >> $OUTPUT_FILE
|
||||
fi
|
||||
|
||||
##
|
||||
## Add the vendor string if present
|
||||
##
|
||||
if test -n "${SAMBA_VERSION_VENDOR_SUFFIX}";then
|
||||
echo "#define SAMBA_VERSION_VENDOR_SUFFIX ${SAMBA_VERSION_VENDOR_SUFFIX}" >> $OUTPUT_FILE
|
||||
if test -n "${SAMBA_VENDOR_PATCH}";then
|
||||
echo "#define SAMBA_VENDOR_PATCH ${SAMBA_VENDOR_PATCH}" >> $OUTPUT_FILE
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
##
|
||||
## SVN revision number?
|
||||
##
|
||||
if test x"${SAMBA_VERSION_IS_SVN_SNAPSHOT}" = x"yes";then
|
||||
_SAVE_LANG=${LANG}
|
||||
LANG=""
|
||||
@ -78,10 +95,6 @@ if test x"${SAMBA_VERSION_IS_SVN_SNAPSHOT}" = x"yes";then
|
||||
LANG=${_SAVE_LANG}
|
||||
fi
|
||||
|
||||
if test -n "${SAMBA_VERSION_VENDOR_SUFFIX}";then
|
||||
echo "#define SAMBA_VERSION_VENDOR_SUFFIX ${SAMBA_VERSION_VENDOR_SUFFIX}" >> $OUTPUT_FILE
|
||||
fi
|
||||
|
||||
echo "#define SAMBA_VERSION_OFFICIAL_STRING \"${SAMBA_VERSION_STRING}\"" >> $OUTPUT_FILE
|
||||
|
||||
echo "#define SAMBA_VERSION_STRING samba_version_string()" >> $OUTPUT_FILE
|
||||
|
Loading…
x
Reference in New Issue
Block a user