File libpsm2-use-exported-variable-for-version-and-release.patch of Package libpsm2
From b231e55f53c1257c76ecb0805f5fb380de230b2d Mon Sep 17 00:00:00 2001
From: Nirmoy Das <ndas@suse.de>
Date: Thu, 9 Jun 2016 14:15:39 +0200
Subject: [PATCH] use exported variable for version and release
---
Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 8845901..1b792a4 100644
--- a/Makefile
+++ b/Makefile
@@ -106,11 +106,11 @@ MINOR := $(PSM2_LIB_MINOR)
nthreads := $(shell echo $$(( `nproc` * 2 )) )
# The desired version number comes from the most recent tag starting with "v"
-VERSION := $(shell if [ -e .git ] ; then git describe --tags --abbrev=0 --match='v*' | sed -e 's/^v//' -e 's/-/_/'; else echo "version" ; fi)
+VERSION ?= $(shell if [ -e .git ] ; then git describe --tags --abbrev=0 --match='v*' | sed -e 's/^v//' -e 's/-/_/'; else echo "version" ; fi)
#
# The desired release number comes the git describe following the version which
# is the number of commits since the version tag was planted suffixed by the g<commitid>
-RELEASE := $(shell if [ -e .git ] ; then git describe --tags --long --match='v*' | sed -e 's/v[0-9.]*-\(.*\)/\1/' -e 's/-/_/' | sed -e 's/_g.*$$//'; else echo "release" ; fi)
+RELEASE ?= $(shell if [ -e .git ] ; then git describe --tags --long --match='v*' | sed -e 's/v[0-9.]*-\(.*\)/\1/' -e 's/-/_/' | sed -e 's/_g.*$$//'; else echo "release" ; fi)
#
# Concatenated version and release
--
2.6.2