79ab293252
- Rebase libpsm2-include-ioctl_h.patch, libpsm2-use_RPM_OPT_FLAGS.patch and libpsm2-use-exported-variable-for-version-and-release.patch to the latest sources. OBS-URL: https://build.opensuse.org/request/show/544098 OBS-URL: https://build.opensuse.org/package/show/science:HPC/libpsm2?expand=0&rev=35
37 lines
1.4 KiB
Diff
37 lines
1.4 KiB
Diff
commit c812d7da24984926e683e99aa5d3ef8a1d372774
|
|
Author: Nicolas Morey-Chaisemartin <NMoreyChaisemartin@suse.com>
|
|
Date: Mon Nov 20 17:59:13 2017 +0100
|
|
|
|
libpsm2: use exported variable for version and release
|
|
|
|
Allow to override VERSION and RELEASE variable through the command line.
|
|
|
|
Signed-off-by: Nicolas Morey-Chaisemartin <NMoreyChaisemartin@suse.com>
|
|
|
|
diff --git Makefile Makefile
|
|
index 8db7c1d..b460785 100644
|
|
--- Makefile
|
|
+++ Makefile
|
|
@@ -180,10 +180,10 @@ export LIBPSM2_COMPAT_CONF_DIR
|
|
ifeq (true, $(shell git rev-parse --is-inside-work-tree 2>/dev/null))
|
|
ISGIT := 1 # Cache the result for later
|
|
# Note, we don't define ISGIT if we are not in a git folder
|
|
-VERSION := $(shell git describe --tags --abbrev=0 --match='psm-v*' | sed -e 's/^psm-v//' -e 's/-/_/')
|
|
+VERSION ?= $(shell git describe --tags --abbrev=0 --match='psm-v*' | sed -e 's/^psm-v//' -e 's/-/_/')
|
|
else
|
|
ISGIT := 0
|
|
-VERSION := version
|
|
+VERSION ?= version
|
|
endif
|
|
|
|
# If we have a file called 'rpm_release_extension' (as on github),
|
|
@@ -213,7 +213,7 @@ endif
|
|
# is the number of commits since the version tag was planted suffixed by the g<commitid>
|
|
ifndef RELEASE
|
|
RELTAG := "psm-v$(VERSION)"
|
|
-RELEASE := $(shell if [ -f rpm_release_extension ]; then cat rpm_release_extension;\
|
|
+RELEASE ?= $(shell if [ -f rpm_release_extension ]; then cat rpm_release_extension;\
|
|
elif [ $(ISGIT) = 1 ] ; then git rev-list $(RELTAG)..HEAD -- . | wc -l; \
|
|
else echo "release" ; fi)
|
|
endif
|