#! /bin/sh -e

PACKAGE=@PVER@-dbg

case "$1" in
    configure|abort-upgrade|abort-remove|abort-deconfigure)

        # Create empty debug directories in /usr/local
        if [ ! -e /usr/local/lib/@PVER@ ]; then
            mkdir -p /usr/local/lib/@PVER@
            chmod 2775 /usr/local/lib/@PVER@
            chown root:staff /usr/local/lib/@PVER@
        fi
        if [ ! -e /usr/local/lib/@PVER@/site-packages/debug ]; then
            mkdir -p /usr/local/lib/@PVER@/site-packages/debug
            chmod 2775 /usr/local/lib/@PVER@/site-packages/debug
            chown root:staff /usr/local/lib/@PVER@/site-packages/debug
        fi
    ;;

    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

#DEBHELPER#

exit 0
