~mythbuntu/mythbuntu/mythbuntu-default-settings

2 by Mario Limonciello
add debian directory to bzr
1
#! /bin/sh
2
3
set -e
4
101.1.1 by Lionel Le Folgoc
* Rename etc/xdg/mythbuntu to etc/xdg/xdg-mythbuntu lp: #327926
5
# Move a conffile without triggering a dpkg question
6
mv_conffile() {
7
    local OLDCONFFILE="$1"
8
    local NEWCONFFILE="$2"
9
10
    [ -e "$OLDCONFFILE" ] || return 0
11
12
    echo "Preserving user changes to $NEWCONFFILE ..."
13
    mv -f "$NEWCONFFILE" "$NEWCONFFILE".dpkg-new
14
    mv -f "$OLDCONFFILE" "$NEWCONFFILE"
15
}
16
2 by Mario Limonciello
add debian directory to bzr
17
case "$1" in
81 by Mario Limonciello
clean up diversions in postinst for upgrades from anything less than 0.82
18
  configure|upgrade)
102 by Mario Limonciello
Merge Lionel's branch to fix usage w/ xfconf with some minor changes
19
        if dpkg --compare-versions "${2}" le-nl "0.59-0ubuntu1" && [ -f /etc/xdg/mythbuntu/autostart/Network\ Manager.desktop ]; then
20
            rm /etc/xdg/mythbuntu/autostart/Network\ Manager.desktop
21
        fi
70 by Mario Limonciello
* preinst, postinst:
22
        if dpkg --compare-versions "${2}" le-nl "0.79-0ubuntu1";
102 by Mario Limonciello
Merge Lionel's branch to fix usage w/ xfconf with some minor changes
23
            then update-alternatives --remove gdm-config-derivative /etc/xdg/mythbuntu/gdm/gdm.conf
70 by Mario Limonciello
* preinst, postinst:
24
        fi
81 by Mario Limonciello
clean up diversions in postinst for upgrades from anything less than 0.82
25
        if dpkg --compare-versions "${2}" le-nl "0.82-0ubuntu1"; then
26
            dpkg-divert --package mythbuntu-default-settings --remove --rename\
27
                        --divert /usr/share/xsessions/gnome.desktop.diverted /usr/share/xsessions/gnome.desktop
28
        fi
98 by Mario Limonciello
- rename usr/share/xsessions/default.desktop to mythbuntu.desktop
29
        if [ -x /usr/lib/gdm/gdm-set-default-session ] ; then
30
            /usr/lib/gdm/gdm-set-default-session --keep-old mythbuntu || true
31
        fi
102 by Mario Limonciello
Merge Lionel's branch to fix usage w/ xfconf with some minor changes
32
        if dpkg --compare-versions "$2" lt "0.86-0ubuntu2"; then
33
            mv_conffile "/etc/xdg/mythbuntu/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml" "/etc/xdg/xdg-mythbuntu/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml"
34
            mv_conffile "/etc/xdg/mythbuntu/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml" "/etc/xdg/xdg-mythbuntu/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml"
35
            mv_conffile "/etc/xdg/mythbuntu/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml" "/etc/xdg/xdg-mythbuntu/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml"
36
            mv_conffile "/etc/xdg/mythbuntu/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml" "/etc/xdg/xdg-mythbuntu/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml"
37
            mv_conffile "/etc/xdg/mythbuntu/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml" "/etc/xdg/xdg-mythbuntu/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml"
38
            mv_conffile "/etc/xdg/mythbuntu/xfce4/xfconf/xfce-perchannel-xml/xfprint.xml" "/etc/xdg/xdg-mythbuntu/xfce4/xfconf/xfce-perchannel-xml/xfprint.xml"
39
            mv_conffile "/etc/xdg/mythbuntu/xfce4/panel/tasklist-2.rc" "/etc/xdg/xdg-mythbuntu/xfce4/panel/tasklist-2.rc"
40
            mv_conffile "/etc/xdg/mythbuntu/xfce4/panel/separator-3.rc" "/etc/xdg/xdg-mythbuntu/xfce4/panel/separator-3.rc"
41
            mv_conffile "/etc/xdg/mythbuntu/xfce4/panel/pager-3.rc" "/etc/xdg/xdg-mythbuntu/xfce4/panel/pager-3.rc"
42
            mv_conffile "/etc/xdg/mythbuntu/xfce4/panel/actions-6.rc" "/etc/xdg/xdg-mythbuntu/xfce4/panel/actions-6.rc"
43
            mv_conffile "/etc/xdg/mythbuntu/xfce4/panel/xfce4-menu-1.rc" "/etc/xdg/xdg-mythbuntu/xfce4/panel/xfce4-menu-1.rc"
44
            mv_conffile "/etc/xdg/mythbuntu/xfce4/panel/clock-5.rc" "/etc/xdg/xdg-mythbuntu/xfce4/panel/clock-5.rc"
45
            mv_conffile "/etc/xdg/mythbuntu/xfce4/panel/systray-4.rc" "/etc/xdg/xdg-mythbuntu/xfce4/panel/systray-4.rc"
46
            mv_conffile "/etc/xdg/mythbuntu/xfce4/panel/panels.xml" "/etc/xdg/xdg-mythbuntu/xfce4/panel/panels.xml"
47
            mv_conffile "/etc/xdg/mythbuntu/xfce4/panel/launcher-2.rc" "/etc/xdg/xdg-mythbuntu/xfce4/panel/launcher-2.rc"
48
            mv_conffile "/etc/xdg/mythbuntu/xfce4/panel/launcher-3.rc" "/etc/xdg/xdg-mythbuntu/xfce4/panel/launcher-3.rc"
49
            mv_conffile "/etc/xdg/mythbuntu/xfce4/panel/tasklist-11907684281.rc" "/etc/xdg/xdg-mythbuntu/xfce4/panel/tasklist-11907684281.rc"
50
            mv_conffile "/etc/xdg/mythbuntu/applications/defaults.list" "/etc/xdg/xdg-mythbuntu/applications/defaults.list"
51
            mv_conffile "/etc/xdg/mythbuntu/menus/xfce-applications.menu" "/etc/xdg/xdg-mythbuntu/menus/xfce-applications.menu"
52
            mv_conffile "/etc/xdg/mythbuntu/Thunar/volmanrc" "/etc/xdg/xdg-mythbuntu/Thunar/volmanrc"
53
            mv_conffile "/etc/xdg/mythbuntu/Thunar/thunarrc" "/etc/xdg/xdg-mythbuntu/Thunar/thunarrc"
54
        fi
111 by Mario Limonciello
* debian/control:
55
        update-alternatives \
56
            --install /lib/plymouth/themes/default.plymouth default.plymouth \
57
            /lib/plymouth/themes/mythbuntu-logo/mythbuntu-logo.plymouth 150
58
59
        if which update-initramfs >/dev/null 2>&1
60
        then
61
            update-initramfs -u
62
        fi
2 by Mario Limonciello
add debian directory to bzr
63
    ;;
64
esac
53 by Mario Limonciello
move debhelper clause to end of postinst
65
66
67
#DEBHELPER#