if [ "$1" = "-h" -o "$1" = "--help" ]; then
  echo "All parameters will be passed to checkinstall, call as 'root' - e.g.:"
  echo "  ./checkinstall.sh --pkgname=cross-mingw-mrw-c++ --pkgversion=3.2.4 -y"
  exit 0
fi
TMP=/tmp/mrw-c++-checkinstall
rm -rf $TMP
DESTDIR=$TMP make install
cd $TMP
checkinstall $* cp -r * /
rm -rf $TMP
