diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-03-28 14:13:18 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-03-28 14:13:18 -0500 |
commit | 4bc22e8b188aa26df8b1a23c39bb0f3c5b05b8b6 (patch) | |
tree | c6f53decaabed9678523a8bbd6a1000a9f3bf78f /ubuntu/raring/tdebase/debian/ksmserver-trinity.preinst | |
parent | 211d261d7778de1d9a773e7ec43a4e97b4bd7e57 (diff) | |
download | tde-packaging-4bc22e8b188aa26df8b1a23c39bb0f3c5b05b8b6.tar.gz tde-packaging-4bc22e8b188aa26df8b1a23c39bb0f3c5b05b8b6.zip |
Split raring packaging into new directory due to defoma changes
Diffstat (limited to 'ubuntu/raring/tdebase/debian/ksmserver-trinity.preinst')
-rw-r--r-- | ubuntu/raring/tdebase/debian/ksmserver-trinity.preinst | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/ubuntu/raring/tdebase/debian/ksmserver-trinity.preinst b/ubuntu/raring/tdebase/debian/ksmserver-trinity.preinst new file mode 100644 index 000000000..f4443b487 --- /dev/null +++ b/ubuntu/raring/tdebase/debian/ksmserver-trinity.preinst @@ -0,0 +1,101 @@ +#! /bin/sh -e + +package_name=ksmserver-trinity + +case "$1" in + + upgrade) + rm -f /etc/gdm/Sessions/KDE + rm -f /etc/trinity/debian/starttde + /usr/sbin/update-alternatives --remove x-session-manager /usr/bin/kde2 + /usr/sbin/update-alternatives --remove x-session-manager /usr/bin/trinity + mkdir -p /usr/share/autostart + + # Intrepid plasma + divert=`dpkg-divert --listpackage /usr/share/autostart/plasma.desktop` + if [ -n "$divert" ] && [ "$divert" = "LOCAL" ]; then + dpkg-divert --remove --local --rename /usr/share/autostart/plasma.desktop + fi + divert=`dpkg-divert --listpackage /usr/bin/plasma` + if [ -n "$divert" ] && [ "$divert" = "LOCAL" ]; then + if [ -L /usr/bin/plasma ]; then + rm -f /usr/bin/plasma + fi + dpkg-divert --remove --local --rename /usr/bin/plasma + divert="" + fi + if [ -z "$divert" ]; then + dpkg-divert --package $package_name --rename \ + --divert /usr/bin/plasma.kde4 \ + --add /usr/bin/plasma + fi + + # Jaunty plasma-desktop + divert=`dpkg-divert --listpackage /usr/share/autostart/plasma-desktop.desktop` + if [ -n "$divert" ] && [ "$divert" = "LOCAL" ]; then + dpkg-divert --remove --local --rename /usr/share/autostart/plasma-desktop.desktop + fi + divert=`dpkg-divert --listpackage /usr/bin/plasma-desktop` + if [ -n "$divert" ] && [ "$divert" = "LOCAL" ]; then + if [ -L /usr/bin/plasma-desktop ]; then + rm -f /usr/bin/plasma-desktop + fi + dpkg-divert --remove --local --rename /usr/bin/plasma-desktop + divert="" + fi + if [ -z "$divert" ]; then + dpkg-divert --package $package_name --rename \ + --divert /usr/bin/plasma-desktop.kde4 \ + --add /usr/bin/plasma-desktop + fi + ;; + + install) + # Intrepid plasma + divert=`dpkg-divert --listpackage /usr/share/autostart/plasma.desktop` + if [ -n "$divert" ] && [ "$divert" = "LOCAL" ]; then + dpkg-divert --remove --local --rename /usr/share/autostart/plasma.desktop + fi + divert=`dpkg-divert --listpackage /usr/bin/plasma` + if [ -n "$divert" ] && [ "$divert" = "LOCAL" ]; then + if [ -L /usr/bin/plasma ]; then + rm -f /usr/bin/plasma + fi + dpkg-divert --remove --local --rename /usr/bin/plasma + divert="" + fi + dpkg-divert --package $package_name --rename \ + --divert /usr/bin/plasma.kde4 \ + --add /usr/bin/plasma + + # Jaunty plasma-desktop + divert=`dpkg-divert --listpackage /usr/share/autostart/plasma-desktop.desktop` + if [ -n "$divert" ] && [ "$divert" = "LOCAL" ]; then + dpkg-divert --remove --local --rename /usr/share/autostart/plasma-desktop.desktop + fi + divert=`dpkg-divert --listpackage /usr/bin/plasma-desktop` + if [ -n "$divert" ] && [ "$divert" = "LOCAL" ]; then + if [ -L /usr/bin/plasma-desktop ]; then + rm -f /usr/bin/plasma-desktop + fi + dpkg-divert --remove --local --rename /usr/bin/plasma-desktop + divert="" + fi + dpkg-divert --package $package_name --rename \ + --divert /usr/bin/plasma-desktop.kde4 \ + --add /usr/bin/plasma-desktop + ;; + + abort-upgrade) + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 1 + ;; + +esac + +#DEBHELPER# + +exit 0 |