mirror of
https://github.com/samba-team/samba.git
synced 2025-02-04 17:47:26 +03:00
r13112: merge over some stuff from samba3
metze (This used to be commit 7cb4e1bd0471f0c03fde25f6171565d74ab0549f)
This commit is contained in:
parent
d5ae1a0387
commit
ca649f797c
@ -1,6 +1,12 @@
|
||||
########################################################
|
||||
# SAMBA Version #
|
||||
# #
|
||||
# Samba versions are as follows #
|
||||
# 3.0.x New production series #
|
||||
# 3.0.x{tp,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 #
|
||||
@ -38,7 +44,7 @@ SAMBA_VERSION_REVISION=
|
||||
# #
|
||||
# <MAJOR>.<MINOR>.<RELEASE>tp<TP_RELEASE> #
|
||||
# #
|
||||
# e.g. SAMBA_VERSION_PRE_RELEASE=1 #
|
||||
# e.g. SAMBA_VERSION_TP_RELEASE=1 #
|
||||
# -> "4.0.0tp1" #
|
||||
########################################################
|
||||
SAMBA_VERSION_TP_RELEASE=
|
||||
@ -110,3 +116,4 @@ SAMBA_VERSION_RELEASE_NICKNAME=
|
||||
# -> "CVS 3.0.0rc2-VendorVersion" #
|
||||
########################################################
|
||||
SAMBA_VERSION_VENDOR_SUFFIX=
|
||||
SAMBA_VERSION_VENDOR_PATCH=
|
||||
|
@ -34,6 +34,11 @@ const char *samba_version_string(void)
|
||||
const char *vendor_suffix = SAMBA_VERSION_VENDOR_SUFFIX;
|
||||
#else
|
||||
const char *vendor_suffix = NULL;
|
||||
#endif
|
||||
#ifdef SAMBA_VERSION_VENDOR_PATCH
|
||||
const char *vendor_patch = SAMBA_VERSION_VENDOR_PATCH;
|
||||
#else
|
||||
const char *vendor_patch = NULL;
|
||||
#endif
|
||||
static char *samba_version;
|
||||
static BOOL init_samba_version;
|
||||
@ -43,10 +48,12 @@ const char *samba_version_string(void)
|
||||
}
|
||||
|
||||
samba_version = talloc_asprintf(talloc_autofree_context(),
|
||||
"%s%s%s%s%s%s",
|
||||
"%s%s%s%s%s%s%s%s",
|
||||
official_string,
|
||||
(vendor_suffix?"-":""),
|
||||
(vendor_suffix?vendor_suffix:""),
|
||||
(vendor_patch?"-":""),
|
||||
(vendor_patch?vendor_patch:""),
|
||||
(release_nickname?" (":""),
|
||||
(release_nickname?release_nickname:""),
|
||||
(release_nickname?")":""));
|
||||
|
@ -20,9 +20,7 @@ SAMBA_VERSION_RELEASE=`sed -n 's/^SAMBA_VERSION_RELEASE=//p' $SOURCE_DIR$VERSION
|
||||
SAMBA_VERSION_REVISION=`sed -n 's/^SAMBA_VERSION_REVISION=//p' $SOURCE_DIR$VERSION_FILE`
|
||||
|
||||
SAMBA_VERSION_TP_RELEASE=`sed -n 's/^SAMBA_VERSION_TP_RELEASE=//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`
|
||||
@ -30,6 +28,7 @@ SAMBA_VERSION_IS_SVN_SNAPSHOT=`sed -n 's/^SAMBA_VERSION_IS_SVN_SNAPSHOT=//p' $SO
|
||||
SAMBA_VERSION_RELEASE_NICKNAME=`sed -n 's/^SAMBA_VERSION_RELEASE_NICKNAME=//p' $SOURCE_DIR$VERSION_FILE`
|
||||
|
||||
SAMBA_VERSION_VENDOR_SUFFIX=`sed -n 's/^SAMBA_VERSION_VENDOR_SUFFIX=//p' $SOURCE_DIR$VERSION_FILE`
|
||||
SAMBA_VERSION_VENDOR_PATCH=`sed -n 's/^SAMBA_VERSION_VENDOR_PATCH=//p' $SOURCE_DIR$VERSION_FILE`
|
||||
|
||||
echo "/* Autogenerated by script/mkversion.sh */" > $OUTPUT_FILE
|
||||
|
||||
@ -38,9 +37,16 @@ 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 "4.0.0tp11" 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
|
||||
@ -48,12 +54,18 @@ elif test -n "${SAMBA_VERSION_TP_RELEASE}";then
|
||||
SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}tp${SAMBA_VERSION_TP_RELEASE}"
|
||||
echo "#define SAMBA_VERSION_TP_RELEASE ${SAMBA_VERSION_TP_RELEASE}" >> $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
|
||||
SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}rc${SAMBA_VERSION_RC_RELEASE}"
|
||||
echo "#define SAMBA_VERSION_RC_RELEASE ${SAMBA_VERSION_RC_RELEASE}" >> $OUTPUT_FILE
|
||||
elif test x"${SAMBA_VERSION_IS_SVN_SNAPSHOT}" = x"yes";then
|
||||
fi
|
||||
|
||||
##
|
||||
## SVN revision number?
|
||||
##
|
||||
if test x"${SAMBA_VERSION_IS_SVN_SNAPSHOT}" = x"yes";then
|
||||
_SAVE_LANG=${LANG}
|
||||
LANG=""
|
||||
HAVESVN=no
|
||||
@ -81,12 +93,21 @@ elif test x"${SAMBA_VERSION_IS_SVN_SNAPSHOT}" = x"yes";then
|
||||
LANG=${_SAVE_LANG}
|
||||
fi
|
||||
|
||||
##
|
||||
## Add a release nickname
|
||||
##
|
||||
if test -n "${SAMBA_VERSION_RELEASE_NICKNAME}";then
|
||||
echo "#define SAMBA_VERSION_RELEASE_NICKNAME ${SAMBA_VERSION_RELEASE_NICKNAME}" >> $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_VERSION_VENDOR_PATCH}";then
|
||||
echo "#define SAMBA_VERSION_VENDOR_PATCH ${SAMBA_VERSION_VENDOR_PATCH}" >> $OUTPUT_FILE
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "#define SAMBA_VERSION_OFFICIAL_STRING \"${SAMBA_VERSION_STRING}\"" >> $OUTPUT_FILE
|
||||
@ -101,6 +122,9 @@ fi
|
||||
|
||||
if test -n "${SAMBA_VERSION_VENDOR_SUFFIX}";then
|
||||
echo "$0: with VENDOR_SUFFIX = ${SAMBA_VERSION_VENDOR_SUFFIX}"
|
||||
if test -n "${SAMBA_VERSION_VENDOR_PATCH}";then
|
||||
echo "$0: with VENDOR_PATCH = ${SAMBA_VERSION_VENDOR_PATCH}"
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user