summaryrefslogtreecommitdiff
path: root/packaging/RHEL-CTDB
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2009-11-04 12:26:46 +0100
committerMichael Adam <obnox@samba.org>2009-11-13 16:19:40 +0100
commit27f988c23414a6eda49b6b9afc6ef6ffd1a26535 (patch)
treed6f67d4b3b866b5140e2e3faca7b29c2762053ab /packaging/RHEL-CTDB
parent05ba2ee810842bbe8333e70d3c6bd6217378698d (diff)
downloadsamba-27f988c23414a6eda49b6b9afc6ef6ffd1a26535.tar.gz
samba-27f988c23414a6eda49b6b9afc6ef6ffd1a26535.tar.bz2
samba-27f988c23414a6eda49b6b9afc6ef6ffd1a26535.zip
packaging(RHEL-CTDB): add the current githash to the rpm release number by default
Disable this (to build a release-rpm) by calling USE_GITHASH=no makerpms.sh Michael
Diffstat (limited to 'packaging/RHEL-CTDB')
-rwxr-xr-xpackaging/RHEL-CTDB/makespec.sh13
-rw-r--r--packaging/RHEL-CTDB/samba.spec.tmpl2
2 files changed, 14 insertions, 1 deletions
diff --git a/packaging/RHEL-CTDB/makespec.sh b/packaging/RHEL-CTDB/makespec.sh
index e47f44936a..29dcbeb30e 100755
--- 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}"
+
+# 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 \
+ -e s/GITHASH/${GITHASH}/g \
< ${SPECFILE}.tmpl \
> ${SPECFILE}
diff --git a/packaging/RHEL-CTDB/samba.spec.tmpl b/packaging/RHEL-CTDB/samba.spec.tmpl
index 48b2c5c4b9..a02244a63c 100644
--- a/packaging/RHEL-CTDB/samba.spec.tmpl
+++ b/packaging/RHEL-CTDB/samba.spec.tmpl
@@ -6,7 +6,7 @@ Vendor: Samba Team
Packager: Samba Team <samba@samba.org>
Name: samba
Version: PVERSION
-Release: 1
+Release: 1GITHASH
Epoch: 0
License: GNU GPL version 3
Group: System Environment/Daemons