dist/debian: use correct variable to detect distribution version

Since we switched to pbuilder and supported cross build, we no longer able to
use $DISTRIBUTION and $RELEASE in the script.
Use $TARGET instead.

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <1500540534-27951-1-git-send-email-syuu@scylladb.com>
This commit is contained in:
Takuya ASADA 2017-07-20 17:48:54 +09:00 committed by Avi Kivity
parent 8c32e4f8a4
commit 81b0d12dfe
1 changed files with 2 additions and 2 deletions

View File

@ -100,12 +100,12 @@ cp dist/debian/rules.in debian/rules
sed -i -e "s/@@VERSION@@/$SCYLLA_VERSION/g" debian/changelog
sed -i -e "s/@@RELEASE@@/$SCYLLA_RELEASE/g" debian/changelog
sed -i -e "s/@@CODENAME@@/$TARGET/g" debian/changelog
if [ "$DISTRIBUTION" = "Ubuntu" ]; then
if [ "$TARGET" = "trusty" ] || [ "$TARGET" = "xenial" ] || [ "$TARGET" = "yakkety" ] || [ "$TARGET" = "zesty" ] || [ "$TARGET" = "artful" ]; then
sed -i -e "s/@@REVISION@@/0ubuntu1/g" debian/changelog
else
sed -i -e "s/@@REVISION@@/1/g" debian/changelog
fi
if [ "$RELEASE" = "14.04" ]; then
if [ "$TARGET" = "trusty" ]; then
sed -i -e "s/@@DH_INSTALLINIT@@/--upstart-only/g" debian/rules
else
sed -i -e "s/@@DH_INSTALLINIT@@//g" debian/rules