1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

makerpms: fix creation of tarball when gzip does not know "--rsynceable"

--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

(This used to be ctdb commit 62eccefc15e2ca737098980aa0b7d226df73a456)
This commit is contained in:
Michael Adam 2008-12-17 16:01:49 +01:00 committed by Ronnie Sahlberg
parent 68b9c87674
commit dc956da422

View File

@ -28,9 +28,15 @@ RPMBUILD="rpmbuild"
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."