#!/bin/sh

set -e

if [ "$1" = "configure" ]; then
    # Manually create /usr/include/qt4/phonon symlink on upgrades.
    # See #404850 why dpkg does not create it by itself.
    qtphonon="/usr/include/qt4/phonon"
    if [ -d $qtphonon ] && [ ! -L $qtphonon ]; then
        if rmdir $qtphonon 2>/dev/null; then
            ln -s ../phonon $qtphonon
        else
            echo "Unable to create $qtphonon symlink due to error above" >&2
            exit 1
        fi
    fi
fi

#DEBHELPER#

exit 0
