#!/bin/sh

. config/options $1

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

mkdir -p $INSTALL/usr/lib
  cp -P $PKG_BUILD/glib/.libs/libpyglib*.so* $INSTALL/usr/lib

mkdir -p $PYTHON_LIB_DIR/site-packages
  cp $PKG_BUILD/pygtk.py $PYTHON_LIB_DIR/site-packages
  cp $PKG_BUILD/pygtk.pyc $PYTHON_LIB_DIR/site-packages
  echo "gtk-2.0" > $PYTHON_LIB_DIR/site-packages/pygtk.pth

mkdir -p $PYTHON_LIB_DIR/site-packages/gtk-2.0
  cp $PKG_BUILD/dsextras.py $PYTHON_LIB_DIR/site-packages/gtk-2.0
  cp $PKG_BUILD/dsextras.pyc $PYTHON_LIB_DIR/site-packages/gtk-2.0

mkdir -p $PYTHON_LIB_DIR/site-packages/gtk-2.0/gobject
  cp $PKG_BUILD/gobject/.libs/*.so $PYTHON_LIB_DIR/site-packages/gtk-2.0/gobject
  cp $PKG_BUILD/gobject/*.py $PYTHON_LIB_DIR/site-packages/gtk-2.0/gobject
  cp $PKG_BUILD/gobject/*.pyc $PYTHON_LIB_DIR/site-packages/gtk-2.0/gobject

mkdir -p $PYTHON_LIB_DIR/site-packages/gtk-2.0/glib
  cp $PKG_BUILD/glib/.libs/_glib.so $PYTHON_LIB_DIR/site-packages/gtk-2.0/glib
  cp $PKG_BUILD/glib/*.py $PYTHON_LIB_DIR/site-packages/gtk-2.0/glib
  cp $PKG_BUILD/glib/*.pyc $PYTHON_LIB_DIR/site-packages/gtk-2.0/glib

mkdir -p $PYTHON_LIB_DIR/site-packages/gtk-2.0/gio
  cp $PKG_BUILD/gio/.libs/_gio.so $PYTHON_LIB_DIR/site-packages/gtk-2.0/gio
  cp $PKG_BUILD/gio/.libs/unix.so $PYTHON_LIB_DIR/site-packages/gtk-2.0/gio
  cp $PKG_BUILD/gio/*.py $PYTHON_LIB_DIR/site-packages/gtk-2.0/gio
  cp $PKG_BUILD/gio/*.pyc $PYTHON_LIB_DIR/site-packages/gtk-2.0/gio
