#!/bin/sh
# TODO: remove this file after releasing Squeeze
set -e

PYCENTRAL=/usr/bin/pycentral

if [ "$1" = upgrade ]
then
       if dpkg --compare-versions "$2" lt 1:1.4.1-1 ; then
	   if [ -x $PYCENTRAL ]; then
               # explicitly remove old python-central files
               pycentral pkgremove python-numpy
	   fi
	   # be really sure also removing left-over files and dirs
	   for pyversion in 2.4 2.5; do
                if [ -d /usr/lib/python$pyversion/site-packages/multiprocessing/ ]; then
                    rm -fr /usr/lib/python$pyversion/site-packages/numpy*
                fi
            done
       fi
fi

#DEBHELPER#
