~ubuntu-branches/ubuntu/trusty/glx-alternatives/trusty

« back to all changes in this revision

Viewing changes to debian/glx-alternative-nvidia.postinst

  • Committer: Package Import Robot
  • Author(s): Andreas Beckmann
  • Date: 2013-05-05 15:25:15 UTC
  • mfrom: (2.1.3 experimental)
  • Revision ID: package-import@ubuntu.com-20130505152515-ouel4r5hvhbmebkq
Tags: 0.3.0
* glx-diversions: Divert libGL.so.1.2.0 from MESA 9.x.  (Closes: #704914)
* Drop maintainer script parts intended for updates from versions predating
  wheezy.
* Use canonical Vcs-* URLs.
* Bump Standards-Version to 3.9.4. No changes needed. 
* Switch to debhelper 9.
* Update my email address and remove DMUA. 
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
# * /usr/lib/xorg/modules/linux/libglx.so
44
44
# * /usr/lib/xorg/modules/drivers/nvidia_drv.so 
45
45
# * several more NVIDIA libraries etc.
 
46
# * /etc/modprobe.d/nvidia-blacklists-nouveau.conf
46
47
setup_alternatives()
47
48
{
48
49
        slaves="
58
59
                $(add_multiarch_slave /usr/lib "" libXvMCNVIDIA_dynamic.so.1 /usr/lib nvidia/)
59
60
                $(add_slave /usr/lib/xorg/modules/linux/libglx.so linux-libglx.so /usr/lib/nvidia/libglx.so)
60
61
                $(add_slave /usr/bin/nvidia-bug-report.sh nvidia-bug-report.sh /usr/lib/nvidia/nvidia-bug-report.sh)
 
62
                $(add_slave /etc/modprobe.d/nvidia-blacklists-nouveau.conf nvidia-blacklists-nouveau.conf /etc/nvidia/nvidia-blacklists-nouveau.conf)
61
63
"
62
64
 
63
65
        if echo "$slaves" | grep -q "slave" ; then
67
69
        fi
68
70
 
69
71
        ldconfig
 
72
 
 
73
        # trigger rebuilding the initrd to (de-)activate the nouveau blacklist
 
74
        if [ -x /usr/sbin/update-initramfs ]; then
 
75
                update-initramfs -u
 
76
        fi
70
77
}
71
78
 
72
 
if [ "$1" = "triggered" ]; then
73
 
 
74
 
        setup_alternatives
75
 
 
76
 
fi
77
 
 
78
 
 
79
 
# <target: wheezy>
80
 
if [ "$1" = "configure" ]; then
81
 
 
82
 
        # remove alternatives set up by libgl1-nvidia-alternatives, libgl1-nvidia-glx*-glx
83
 
        if update-alternatives --list libGL.so.1 >/dev/null 2>&1 ; then
84
 
                update-alternatives --remove-all libGL.so.1
85
 
        fi
86
 
 
87
 
        # remove alternatives set up by libglx-nvidia-alternatives, nvidia-glx*
88
 
        if update-alternatives --list libglx.so >/dev/null 2>&1 ; then
89
 
                update-alternatives --remove-all libglx.so
90
 
        fi
91
 
 
92
 
fi
93
 
# </target: wheezy>
94
 
 
95
 
 
96
 
if [ "$1" = "configure" ]; then
 
79
if [ "$1" = "triggered" ] || [ "$1" = "configure" ]; then
97
80
 
98
81
        setup_alternatives
99
82
 
101
84
 
102
85
 
103
86
#DEBHELPER#
104
 
 
105
 
exit 0