Update MinGW-w64 zlib to newer version.
[msysgit/mtrensch.git] / src / mingw-w64 / release-zlib.sh
blob962bba1d1e2f59a1ce8a5d334614c5e9d89192b7
1 #!/bin/sh
3 cd "$(dirname "$0")"
4 srcdir=$(pwd)
6 mirror=http://www.zlib.net/
7 file=zlib-1.2.5.tar.gz
8 dir=${file%.tar.gz}
10 # download it
11 test -f $file || curl $mirror$file > $file || exit
13 # unpack it
14 test -d $dir || tar xzf $file || exit
16 # compile it
17 sysroot="$(pwd)/sysroot/x86_64-w64-mingw32"
18 cross="$(pwd)/sysroot/bin/x86_64-w64-mingw32"
19 test -f $dir/example.exe || {
20 (cd $dir &&
21 CC="$cross-gcc.exe" AR="$cross-ar.exe rc" RANLIB="$cross-ranlib.exe" \
22 ./configure --prefix=$sysroot &&
23 make) || exit
26 # install it
27 test -f $sysroot/lib/libz.a ||
28 (cd $dir &&
29 make install)