summaryrefslogtreecommitdiff
path: root/binary/mingw/build-dist
diff options
context:
space:
mode:
Diffstat (limited to 'binary/mingw/build-dist')
-rwxr-xr-xbinary/mingw/build-dist45
1 files changed, 26 insertions, 19 deletions
diff --git a/binary/mingw/build-dist b/binary/mingw/build-dist
index 59ed868..a784fd6 100755
--- a/binary/mingw/build-dist
+++ b/binary/mingw/build-dist
@@ -50,16 +50,21 @@ while [ $# -gt 0 ]; do
done
-out_root=`pwd`
-version=`cat $HOME/work/odb/odb/version`
-install_root="/tmp/odb-$version-i686-windows"
-
if [ $pack = n ]; then
src_root=$HOME/work
+
+ over=`cat $HOME/work/odb/odb/version`
else
src_root=/tmp
+
+ cver=`echo $src_root/libcutl-?.*.tar.gz | sed -e "s%$src_root/libcutl-\(.*\).tar.gz%\1%"`
+ over=`echo $src_root/pack/odb-?.*.tar.gz | sed -e "s%$src_root/pack/odb-\(.*\).tar.gz%\1%"`
+ mver=`echo $over | sed -e 's%\([0-9]*\.[0-9]*\).*%\1%'`
fi
+out_root=`pwd`
+install_root="/tmp/odb-$over-i686-windows"
+
export PATH=$out_root/cross/mingw/bin:$PATH
# Clean everything up if we are rebuilding.
@@ -82,9 +87,9 @@ if [ $rebuild = y ]; then
fi
if [ $pack = n ]; then
- rm -f /tmp/odb-$version-i686-windows.zip
+ rm -f /tmp/odb-$over-i686-windows.zip
else
- rm -f /tmp/pack/odb-$version-i686-windows.zip
+ rm -f /tmp/pack/odb-$over-i686-windows.zip
fi
# Build libplugin-stub
@@ -113,8 +118,9 @@ if [ $pack = n ]; then
cd ..
fi
else
- tar xfz $src_root/pack/libodb-$version.tar.gz
- mv libodb-$version libodb
+ libodb=`echo $src_root/pack/libodb-$mver.*.tar.gz | sed -e "s%$src_root/pack/\(.*\)\.tar\.gz%\1%"`
+ tar xfz $src_root/pack/$libodb.tar.gz
+ mv $libodb libodb
fi
cd libodb
@@ -140,8 +146,9 @@ if [ $pack = n ]; then
cd ..
fi
else
- tar xfz $src_root/pack/libodb-boost-$version.tar.gz
- mv libodb-boost-$version libodb-boost
+ libodb_boost=`echo $src_root/pack/libodb-boost-$mver.*.tar.gz | sed -e "s%$src_root/pack/\(.*\)\.tar\.gz%\1%"`
+ tar xfz $src_root/pack/$libodb_boost.tar.gz
+ mv $libodb_boost libodb-boost
fi
cd libodb-boost
@@ -166,8 +173,9 @@ if [ $pack = n ]; then
cd ..
fi
else
- tar xfz $src_root/pack/libodb-qt-$version.tar.gz
- mv libodb-qt-$version libodb-qt
+ libodb_qt=`echo $src_root/pack/libodb-qt-$mver.*.tar.gz | sed -e "s%$src_root/pack/\(.*\)\.tar\.gz%\1%"`
+ tar xfz $src_root/pack/$libodb_qt.tar.gz
+ mv $libodb_qt libodb-qt
fi
cd libodb-qt
@@ -191,9 +199,8 @@ if [ $pack = n ]; then
cd ..
fi
else
- cutl_version=`cat $HOME/work/cutl/libcutl/version`
- tar xfz $src_root/libcutl-$cutl_version.tar.gz
- mv libcutl-$cutl_version libcutl
+ tar xfz $src_root/libcutl-$cver.tar.gz
+ mv libcutl-$cver libcutl
fi
cd libcutl
@@ -216,15 +223,15 @@ if [ $pack = n ]; then
cd ..
fi
else
- tar xfz $src_root/pack/odb-$version.tar.gz
- mv odb-$version odb
+ tar xfz $src_root/pack/odb-$over.tar.gz
+ mv odb-$over odb
fi
mkdir -p odb-build
cd odb-build
if [ $rebuild = y ]; then
- ../odb-configure $version
+ ../odb-configure $over
fi
make
@@ -291,5 +298,5 @@ todos $install_root/README
#
cd /tmp
mkdir -p pack
-zip -r pack/odb-$version-i686-windows.zip odb-$version-i686-windows
+zip -r pack/odb-$over-i686-windows.zip odb-$over-i686-windows
cd $out_root