#!/bin/sh

# Build zipfiles for mate-vfs on Win32. Separate runtime and
# developer ones.  After running make install, run this.

ZIP=/tmp/mate-vfs-@VERSION@.zip
DEVZIP=/tmp/mate-vfs-dev-@VERSION@.zip

cd @prefix@
rm $ZIP

current_minus_age=`expr @LIBMATEVFS_CURRENT@ - @LIBMATEVFS_AGE@`

zip $ZIP -@ <<EOF
bin/libmatevfs-2-$current_minus_age.dll
etc/mateconf/schemas/system_http_proxy.schemas
etc/mate-vfs-2.0/modules/default-modules.conf
EOF

zip $ZIP lib/mate-vfs-2.0/modules/*.dll

if [ -f share/locale/de/LC_MESSAGES/mate-vfs-2.0.mo ]; then
  zip $ZIP share/locale/*/LC_MESSAGES/mate-vfs-2.0.mo
else
  zip $ZIP lib/locale/*/LC_MESSAGES/mate-vfs-2.0.mo
fi

rm $DEVZIP
zip -r $DEVZIP -@ <<EOF
bin/matevfs-cat.exe
bin/matevfs-copy.exe
bin/matevfs-info.exe
bin/matevfs-ls.exe
bin/matevfs-mkdir.exe
bin/matevfs-monitor.exe
bin/matevfs-mv.exe
lib/libmatevfs-2.dll.a
lib/pkgconfig/mate-vfs-2.0.pc
lib/pkgconfig/mate-vfs-module-2.0.pc
include/mate-vfs-2.0
include/mate-vfs-module-2.0
share/gtk-doc/html/mate-vfs-2.0
EOF
