#!/bin/sh

. config/options

$SCRIPTS/install Python
$SCRIPTS/install gtk+
$SCRIPTS/install pygobject
$SCRIPTS/install pycairo
[ "$MEDIACENTER" = entertainer ] && \
  $SCRIPTS/install libglade

PYTHON_LIB_DIR=`ls -d $INSTALL/usr/lib/python*`
PYTHON_SYSROOTLIB_DIR=`ls -d $SYSROOT_PREFIX/usr/lib/python*`

mkdir -p $PYTHON_LIB_DIR/site-packages/gtk-2.0/
  cp $PKG_BUILD/gtk/.libs/gtkunixprint.so $PYTHON_LIB_DIR/site-packages/gtk-2.0
  cp $PKG_BUILD/.libs/atk.so $PYTHON_LIB_DIR/site-packages/gtk-2.0
  cp $PKG_BUILD/.libs/pango.so $PYTHON_LIB_DIR/site-packages/gtk-2.0
  cp $PKG_BUILD/.libs/pangocairo.so $PYTHON_LIB_DIR/site-packages/gtk-2.0

mkdir -p $PYTHON_LIB_DIR/site-packages/gtk-2.0/gtk
  cp $PKG_BUILD/gtk/.libs/_gtk.so $PYTHON_LIB_DIR/site-packages/gtk-2.0/gtk
  [ "$MEDIACENTER" = entertainer ] && \
    cp $PKG_BUILD/gtk/.libs/glade.so $PYTHON_LIB_DIR/site-packages/gtk-2.0/gtk
  cp $PKG_BUILD/gtk/*.pyc $PYTHON_LIB_DIR/site-packages/gtk-2.0/gtk
  cp $PYTHON_SYSROOTLIB_DIR/site-packages/pygtk.pyc $PYTHON_LIB_DIR/site-packages
  cp $PYTHON_SYSROOTLIB_DIR/site-packages/pygtk.pth $PYTHON_LIB_DIR/site-packages
