Set release details for 0.2.13
[quvi.git] / w32 / make-w32.sh
blob87fd83ea0508aaca4184093daab96476d1e94d30
1 #!/bin/sh
3 PREFIX=`pwd`/dist
4 MINGW=/opt/mingw32
6 export CFLAGS="-Wall -Werror -Os -pipe -march=i686"
8 export libcurl_CFLAGS="`$MINGW/bin/curl-config --cflags`"
9 export libcurl_LIBS="`$MINGW/bin/curl-config --libs`"
11 export liblua_CFLAGS="-I$MINGW/include"
12 export liblua_LIBS="-L$MINGW/lib -llua51"
14 pack_it()
16 version=`awk '/PACKAGE_VERSION = / {print $3}' Makefile`
17 archive="quvi-$version-win32-i686-bin.7z"
18 distdir="quvi-$version"
20 rm -rf dist quvi-$version $archive \
21 && make install-strip \
22 && make pod2html \
23 && cp -v $MINGW/bin/libcurl-4.dll dist/bin \
24 && cp -v $MINGW/bin/libiconv-2.dll dist/bin \
25 && cp -v $MINGW/bin/lua51.dll dist/bin \
26 && mkdir -p dist/licenses \
27 && cp -v -r licenses dist/licenses \
28 && mv dist/share/quvi/lua dist/bin \
29 && rm -r dist/share/man dist/share/quvi \
30 && rm -rf dist/lib/pkgconfig \
31 && cp -v ChangeLog dist/ChangeLog.txt \
32 && cp -v ChangeLog.w32.txt dist/ \
33 && cp -v ../NEWS dist/NEWS.txt \
34 && cp -v man1/quvi.1.html dist/share/doc/quvi \
35 && mv dist $distdir \
36 && 7za a $archive $distdir
37 exit $?
40 clean_up() {
41 make distclean 2>/dev/null
42 rm -rf doc examples include lib src tests share man1 ChangeLog
43 exit $?
46 pack_flag=off
47 clean_flag=off
48 while [ $# -gt 0 ]
50 case "$1" in
51 -p) pack_flag=on;;
52 -c) clean_flag=on;;
53 *) break;;
54 esac
55 shift
56 done
58 if [ x"$pack_flag" = "xon" ]; then
59 pack_it
62 if [ x"$clean_flag" = "xon" ]; then
63 clean_up
66 ../configure \
67 --host=i486-mingw32 \
68 --prefix=$PREFIX \
69 --with-libiconv-prefix=$MINGW \
70 --without-man \
71 && make dist