#!/bin/sh

mingwb="i586-mingw32msvc"
rvern="$(bzr version-info | grep revno | sed 's/revno: //')"
make clean
rm Makefile*
rm release/*
lupdate unetbootin.pro
lrelease unetbootin.pro
./qmake-windows "DEFINES += SLITAZ" "RESOURCES += unetbootin-slitaz.qrc"
make
$mingwb-strip --strip-all release/unetbootin.exe
mv release/unetbootin.exe release/unetbootin-slitaz-windows-$rvern.exe
./upx --lzma release/unetbootin-slitaz-windows-$rvern.exe
./qmake-linux "DEFINES += SLITAZ" "RESOURCES += unetbootin-slitaz.qrc"
make
$mingwb-strip --strip-all unetbootin
mv unetbootin release/unetbootin-slitaz-linux-$rvern
./upx --lzma release/unetbootin-slitaz-linux-$rvern
qmake -spec linux-g++-32 "RESOURCES += unetbootin-linux.qrc"

