summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-08-14 14:09:46 (GMT)
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-08-14 14:09:46 (GMT)
commit11a82f2ab78a11a801155433eec43ff39b401db4 (patch)
tree778828f19e538750393f02c5d269c3e65001bd81 /autogen.sh
parent9c81b10bfafddd0c3c329731da89887c2538aabf (diff)
downloadlibkolabxml-11a82f2ab78a11a801155433eec43ff39b401db4.tar.gz
Use the version listed in CMakelists.txt
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh16
1 files changed, 14 insertions, 2 deletions
diff --git a/autogen.sh b/autogen.sh
index e7b3bbb..74415ab 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -39,6 +39,16 @@ if [ ${dobuild} -eq 0 -a ${doprep} -eq 0 -a ${dotest} -eq 0 -a ${doinstall} -eq
doinstall=1
fi
+version_major=`grep -E "^set \(Libkolabxml_VERSION_MAJOR [0-9]+\)" CMakeLists.txt | sed -r -e 's/^set \(Libkolabxml_VERSION_MAJOR ([0-9]+)\)/\1/g'`
+version_minor=`grep -E "^set \(Libkolabxml_VERSION_MINOR [0-9]+\)" CMakeLists.txt | sed -r -e 's/^set \(Libkolabxml_VERSION_MINOR ([0-9]+)\)/\1/g'`
+version_teeny=`grep -E "^set \(Libkolabxml_VERSION_TEENY [0-9]+\)" CMakeLists.txt | sed -r -e 's/^set \(Libkolabxml_VERSION_TEENY ([0-9]+)\)/\1/g'`
+
+if [ -z "${version_teeny}" ]; then
+ version="${version_major}.${version_minor}"
+else
+ version="${version_major}.${version_minor}.${version_teeny}"
+fi
+
# Rebuilds the entire foo in one go. One shot, one kill.
rm -rf build/
mkdir -p build
@@ -88,7 +98,9 @@ fi
cd ..
-git archive --prefix=libkolabxml-0.8/ HEAD | gzip -c > libkolabxml-0.8.tar.gz
+rm -rf libkolabxml-${version}.tar.gz
+git archive --prefix=libkolabxml-${version}/ HEAD | gzip -c > libkolabxml-${version}.tar.gz
-cp libkolabxml-0.8.tar.gz `rpm --eval='%{_sourcedir}'`
+rm -rf `rpm --eval='%{_sourcedir}'`/libkolabxml-${version}.tar.gz
+cp libkolabxml-${version}.tar.gz `rpm --eval='%{_sourcedir}'`