Fix "make dist" to include version number, docouple it from rpm packaging

Change-Id: If2f9976d668089026c97b897cf449bff09050631
Signed-off-by: Damjan Marion <damarion@cisco.com>
This commit is contained in:
Damjan Marion
2017-04-18 15:26:39 +02:00
committed by Florin Coras
parent b59a705552
commit c06eeb0e3c
7 changed files with 60 additions and 69 deletions

View File

@ -1,31 +0,0 @@
#!/bin/bash
#
# Add version to dist tarball.
#
BR=$1
prefix=$2
verstring=$3
BASE=`pwd`
git rev-parse 2> /dev/null
if [ $? == 0 ]; then
git archive --prefix=${prefix}/ HEAD | gzip -9 > ${verstring}.tar.gz
else
cd ..
tar -c ${prefix} | gzip -9 > ${verstring}.tar.gz
cp ${verstring}.tar.gz $BASE
cd $BASE
fi
mkdir ${BASE}/tmp
cd ${BASE}/tmp
tar -xzf ${BASE}/${verstring}.tar.gz
rm ${BASE}/${verstring}.tar.gz
cp ${BR}/scripts/.version ${BASE}/tmp/${prefix}/build-root/scripts
tar -c ${prefix} | gzip -9 > ${verstring}.tar.gz
mv ${verstring}.tar.gz ${BASE}
cd ${BASE}
rm -rf tmp