scst.spec: Make version numbers monotonically increasing for the git tree

Additionally, make the fourth component of the version number configurable.
An example: make RPM REVISION=r733

Reported-by: Consus <consus@gmx.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6491 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2015-08-31 15:03:20 +00:00
parent 42cd180a9e
commit 6c6a6e6ba3
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -54,11 +54,11 @@ EMULEX_DIR=emulex
ISCSI_DIR=iscsi-scst
VERSION = $(shell echo -n "$$(sed -n 's/^\#define[[:blank:]]SCST_VERSION_NAME[[:blank:]]*\"\([^-]*\).*\"/\1/p' scst/include/scst_const.h)."; \
if svn info >/dev/null 2>&1; \
REVISION ?= $(shell if svn info >/dev/null 2>&1; \
then svn info | sed -n 's/^Revision:[[:blank:]]*/r/p';\
else git show | sed -n 's/^commit[[:blank:]]*\(.......\).*/\1/p'; \
else echo -n r; git log | grep -c ^commit; \
fi)
VERSION = $(shell echo -n "$$(sed -n 's/^\#define[[:blank:]]SCST_VERSION_NAME[[:blank:]]*\"\([^-]*\).*\"/\1/p' scst/include/scst_const.h).$(REVISION)")
help:
@echo " all : make all"
+3 -3
View File
@@ -2,11 +2,11 @@ ifndef PREFIX
PREFIX=/usr/local
endif
VERSION = $(shell echo -n "$$(sed -n 's/^[[:blank:]]*\$$VERSION[[:blank:]]*=[[:blank:]]*[\"'"'"']\([0-9.]*\)[\"'"'"'];$$/\1/p' scstadmin/scst-*/lib/SCST/SCST.pm)."; \
if svn info >/dev/null 2>&1; \
REVISION ?= $(shell if svn info >/dev/null 2>&1; \
then svn info | sed -n 's/^Revision:[[:blank:]]*/r/p';\
else git show | sed -n 's/^commit[[:blank:]]*\(.......\).*/\1/p'; \
else echo -n r; git log | grep -c ^commit; \
fi)
VERSION = $(shell echo -n "$$(sed -n 's/^[[:blank:]]*\$$VERSION[[:blank:]]*=[[:blank:]]*[\"'"'"']\([0-9.]*\)[\"'"'"'];$$/\1/p' scstadmin/scst-*/lib/SCST/SCST.pm).$(REVISION)")
SCSTADMIN_DIR = $(shell if [ ! -h scstadmin ]; then \
rm -f scstadmin; \