#!/bin/sh

# Build zipfile distribution of gtksourceview for Win32

ZIP=/tmp/gtksourceview-@VERSION@.zip
DEVZIP=/tmp/gtksourceview-dev-@VERSION@.zip
cd @prefix@

rm $ZIP

zip $ZIP -@ <<EOF
bin/libgtksourceview-2.0-0.dll
EOF

zip $ZIP share/gtksourceview-2.0/language-specs/*.lang
zip $ZIP share/gtksourceview-2.0/language-specs/*.dtd
zip $ZIP share/gtksourceview-2.0/language-specs/*.rng
zip $ZIP share/gtksourceview-2.0/styles/*.xml
zip $ZIP share/gtksourceview-2.0/styles/*.rng

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

rm $DEVZIP

zip -r $DEVZIP -@ <<EOF
include/gtksourceview-2.0
lib/libgtksourceview-2.0.dll.a
lib/pkgconfig/gtksourceview-2.0.pc
share/gtk-doc/html/gtksourceview-2.0
EOF
