--rsynceable is a patch to gzip that not all distributors / packagers
add to gzip. (It has just bitten me on openSUSE.) This path first detects
whether gzip knows about --rsynceable and then calls gzip accordingly.
Michael
VERSION=$(grep ^Version ${DIRNAME}/${SPECFILE} | sed -e 's/^Version:\ \+//')
RELEASE=$(grep ^Release ${DIRNAME}/${SPECFILE} | sed -e 's/^Release:\ \+//')
+if gzip --rsyncable 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 -9 --rsyncable > ${SRCDIR}/ctdb-${VERSION}.tar.gz
+git archive --prefix=ctdb-${VERSION}/ HEAD | ${GZIP} > ${SRCDIR}/ctdb-${VERSION}.tar.gz
RC=$?
popd
echo "Done."