git.samba.org
/
kai
/
samba.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
packaging(RHEL-CTDB): add the current githash to the rpm release number by default
[kai/samba.git]
/
packaging
/
RHEL-CTDB
/
makespec.sh
diff --git
a/packaging/RHEL-CTDB/makespec.sh
b/packaging/RHEL-CTDB/makespec.sh
index e47f44936a53be81973d6531d17eb7f6fdf8b8c4..29dcbeb30e495909bd5c27015ed9d2134955abf1 100755
(executable)
--- a/
packaging/RHEL-CTDB/makespec.sh
+++ b/
packaging/RHEL-CTDB/makespec.sh
@@
-33,7
+33,20
@@
fi
VERSION=`echo ${VERSION} | sed 's/-/_/g'`
VERSION=`echo ${VERSION} | sed 's/\"//g'`
echo "VERSION: ${VERSION}"
VERSION=`echo ${VERSION} | sed 's/-/_/g'`
VERSION=`echo ${VERSION} | sed 's/\"//g'`
echo "VERSION: ${VERSION}"
+
+# to build a release-rpm, set USE_GITHASH="no"
+# in the environmet
+#
+if test "x$USE_GITHASH" = "xno" ; then
+ GITHASH=""
+ echo "GITHASH: not used"
+else
+ GITHASH=".$(git log --pretty=format:%h -1)"
+ echo "GITHASH: ${GITHASH}"
+fi
+
sed -e s/PVERSION/${VERSION}/g \
sed -e s/PVERSION/${VERSION}/g \
+ -e s/GITHASH/${GITHASH}/g \
< ${SPECFILE}.tmpl \
> ${SPECFILE}
< ${SPECFILE}.tmpl \
> ${SPECFILE}