summaryrefslogtreecommitdiff
path: root/ctdb/packaging
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2012-10-30 11:54:52 +1100
committerAmitay Isaacs <amitay@gmail.com>2012-10-30 18:01:38 +1100
commit79aeac6bfe89a99d3e73248cb30b22b973abaadc (patch)
tree58cdd46257734b3b3aab1dd9701f47e8e2c96907 /ctdb/packaging
parent49bddd6f1eddb252227d2e09526961b56c7c30fd (diff)
downloadsamba-79aeac6bfe89a99d3e73248cb30b22b973abaadc.tar.gz
packaging: Use maketarball.sh script to create tarball for RPM
This removes the duplicate code for building tarball and reuses existing script. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 16a91c2a4d03b46743611e2fe844bb2cef95e46a)
Diffstat (limited to 'ctdb/packaging')
-rwxr-xr-xctdb/packaging/RPM/makerpms.sh23
1 files changed, 5 insertions, 18 deletions
diff --git a/ctdb/packaging/RPM/makerpms.sh b/ctdb/packaging/RPM/makerpms.sh
index 254abde8486..c216185cca4 100755
--- a/ctdb/packaging/RPM/makerpms.sh
+++ b/ctdb/packaging/RPM/makerpms.sh
@@ -52,7 +52,7 @@ mkdir -p `rpm --eval %_rpmdir`/noarch
mkdir -p `rpm --eval %_rpmdir`/i386
mkdir -p `rpm --eval %_rpmdir`/x86_64
-VERSION=$(${TOPDIR}/packaging/mkversion.sh)
+VERSION=$(${TOPDIR}/packaging/mkversion.sh ${TOPDIR}/include/version.h)
if [ -z "$VERSION" ]; then
exit 1
fi
@@ -61,23 +61,10 @@ sed -e s/@VERSION@/$VERSION/g \
< ${DIRNAME}/${SPECFILE_IN} \
> ${DIRNAME}/${SPECFILE}
-VERSION=$(grep ^Version ${DIRNAME}/${SPECFILE} | sed -e 's/^Version:\ \+//')
-
-if echo | gzip -c --rsyncable - > /dev/null 2>&1 ; then
- GZIP="gzip -9 --rsyncable"
-else
- GZIP="gzip -9"
-fi
-
-pushd ${TOPDIR}
-echo -n "Creating ctdb-${VERSION}.tar.gz ... "
-git archive --prefix=ctdb-${VERSION}/ HEAD | ${GZIP} > ${SRCDIR}/ctdb-${VERSION}.tar.gz
-RC=$?
-popd
-echo "Done."
-if [ $RC -ne 0 ]; then
- echo "Build failed!"
- exit 1
+${TOPDIR}/packaging/maketarball.sh ${SRCDIR}
+if [ $? -ne 0 ]; then
+ echo "Build failed!"
+ exit 1
fi
# At this point the SPECDIR and SRCDIR vaiables must have a value!