dist/debian: apply generated package version for .orig.tar.gz file

Same as scylladb/scylla#6752,
we currently does not able to apply version number fixup for .orig.tar.gz file,
even we applied correct fixup on debian/changelog, becuase it just reading
SCYLLA-VERSION-FILE.
We should parse debian/{changelog,control} instead.

Fixes #120
This commit is contained in:
Takuya ASADA 2020-07-06 07:35:09 +09:00 committed by Avi Kivity
parent b2195734cc
commit 5820992a8e

View File

@ -89,12 +89,12 @@ if [ "$ID" = "debian" ] && [ ! -f /usr/share/keyrings/ubuntu-archive-keyring.gpg
sudo apt-get install -y ubuntu-archive-keyring
fi
RELOC_PKG_FULLPATH=$(readlink -f $RELOC_PKG)
RELOC_PKG_BASENAME=$(basename $RELOC_PKG)
SCYLLA_VERSION=$(cat scylla-jmx/SCYLLA-VERSION-FILE)
SCYLLA_RELEASE=$(cat scylla-jmx/SCYLLA-RELEASE-FILE)
RELOC_PKG=$(readlink -f $RELOC_PKG)
ln -fv $RELOC_PKG_FULLPATH ../$PRODUCT-jmx_$SCYLLA_VERSION-$SCYLLA_RELEASE.orig.tar.gz
cp -al scylla-jmx/debian debian
mv scylla-jmx/debian debian
PKG_NAME=$(dpkg-parsechangelog --show-field Source)
# XXX: Drop revision number from version string.
# Since it always '1', this should be okay for now.
PKG_VERSION=$(dpkg-parsechangelog --show-field Version |sed -e 's/-1$//')
ln -fv $RELOC_PKG ../"$PKG_NAME"_"$PKG_VERSION".orig.tar.gz
debuild -rfakeroot -us -uc