summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-08-27 12:09:40 +0200
committerMichael Adam <obnox@samba.org>2008-08-29 18:00:52 +0200
commit8193b5694de1865a5038e10b7daabb2d6df7354b (patch)
treedfe2c3f6cc752e493033ba22c1617db03cccb95b /packaging
parentf9a0b1675e409a63797693f9d189e9728258ce73 (diff)
downloadsamba-8193b5694de1865a5038e10b7daabb2d6df7354b.tar.gz
samba-8193b5694de1865a5038e10b7daabb2d6df7354b.tar.bz2
samba-8193b5694de1865a5038e10b7daabb2d6df7354b.zip
packaging(RHEL-CTDB): auto-detect samba version from spec in makerpms.sh
Michael (This used to be commit d18075524fa6b83fbb86aa0010c6190136e99865)
Diffstat (limited to 'packaging')
-rwxr-xr-xpackaging/RHEL-CTDB/makerpms.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/packaging/RHEL-CTDB/makerpms.sh b/packaging/RHEL-CTDB/makerpms.sh
index 8a0345bbeb..421903258f 100755
--- a/packaging/RHEL-CTDB/makerpms.sh
+++ b/packaging/RHEL-CTDB/makerpms.sh
@@ -21,9 +21,11 @@ SRCDIR=`rpm --eval %_sourcedir`
# At this point the SPECDIR and SRCDIR variables must have a value!
-VERSION='3.3.0'
+DIRNAME=$(dirname $0)
+
REVISION='ctdb'
SPECFILE="samba.spec"
+VERSION=$(grep ^Version ${DIRNAME}/${SPECFILE} | sed -e 's/^Version:\ \+//')
DOCS="docs.tar.bz2"
RPMVER=`rpm --version | awk '{print $3}'`
RPM="rpmbuild"
@@ -41,8 +43,6 @@ case $RPMVER in
;;
esac
-DIRNAME=$(dirname $0)
-
pushd ${DIRNAME}/../..
echo -n "Creating samba-${VERSION}.tar.bz2 ... "
git archive --prefix=samba-${VERSION}/ HEAD | bzip2 > ${SRCDIR}/samba-${VERSION}.tar.bz2