Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-testing > by-pkgid > 1b73e9078478c7a9b5bb97cd8bcda38d > scriptlet

x11-server-common-1.4.0.90-14.3mdv2008.1.x86_64.rpm

PREIN

/bin/sh
if [ -L /usr/lib64/X11 ]; then 
	rm -f /usr/lib64/X11
fi
if [ -d /usr/X11R6/lib/X11 ]; then
	mkdir -p /usr/lib64/X11
	rm -f /usr/X11R6/lib/X11/fs # old symlink, already on the target dir
	mv -f /usr/X11R6/lib/X11/* /usr/lib64/X11/ 2> /dev/null
	rm -rf /usr/X11R6/lib/X11
fi

POSTIN

/bin/sh
/usr/sbin/update-alternatives \
	--install /etc/ld.so.conf.d/GL.conf gl_conf /etc/ld.so.conf.d/GL/standard.conf 500 \
	--slave /usr/lib64/xorg/modules/extensions/libglx.so libglx /usr/lib64/xorg/modules/extensions/standard/libglx.so

# (anssi)

POSTUN

/bin/sh
if [ ! -f /etc/ld.so.conf.d/GL/standard.conf ]; then
	/usr/sbin/update-alternatives --remove gl_conf /etc/ld.so.conf.d/GL/standard.conf
fi

Triggers

x11-server-common < 1.3.0.0-17

/bin/sh
[ $1 -eq 2 ] || exit 0 # do not run if downgrading
[ -L /usr/lib64/xorg/modules/extensions/libglx.so ] || rm -f /usr/lib64/xorg/modules/extensions/libglx.so
current_glconf="$(readlink -e /etc/ld.so.conf.d/GL.conf)"
if [ "${current_glconf#*mesa}" == "gl1.conf" ]; then
	# This an upgrade of a system with no proprietary drivers enabled, update
	# the link to point to the new standard.conf instead of libmesagl1.conf (2008.0 change).
	# This also replaces old libglx.so with a symlink.
	/usr/sbin/update-alternatives --set gl_conf /etc/ld.so.conf.d/GL/standard.conf
else
	# XFdrake did not set symlink to manual mode before 2008.0, so we ensure it here.
	# This also replaces old libglx.so with a symlink.
	/usr/sbin/update-alternatives --set gl_conf "${current_glconf}"
fi
true