#!/bin/sh

rm -f libpsi/psiwidgets/Makefile
rm -f src/Makefile

cat >extra.pri <<EOT
DEFINES += HAVE_CONFIG

sharedfiles.path  = $LIBDIR
sharedfiles.files = ../README ../COPYING ../iconsets ../sound ../certs
INSTALLS += sharedfiles

widgets.path = $LIBDIR/designer
widgets.files = ../libpsi/psiwidgets/libpsiwidgets.so
INSTALLS += widgets

# icons and desktop files
dt.path=$PREFIX/share/applications/
dt.files = ../psi.desktop 
icon1.path=$PREFIX/share/icons/hicolor/16x16/apps
icon1.extra = cp -f ../iconsets/system/default/icon_16.png \$(INSTALL_ROOT)\$\$icon1.path/psi.png
icon2.path=$PREFIX/share/icons/hicolor/32x32/apps
icon2.extra = cp -f ../iconsets/system/default/icon_32.png \$(INSTALL_ROOT)\$\$icon2.path/psi.png
icon3.path=$PREFIX/share/icons/hicolor/48x48/apps
icon3.extra = cp -f ../iconsets/system/default/icon_48.png \$(INSTALL_ROOT)\$\$icon3.path/psi.png

INSTALLS += dt icon1 icon2 icon3

EOT

cat >src/config.h <<EOT
#define LIBDIR "$LIBDIR"
EOT
