#!/bin/sh
set -e

MAJOR=1
MINOR=2.8
VERSION=$MAJOR.$MINOR

# move new stuff over the previous revision
if [ -f /usr/lib/libvga.so.$VERSION.new ]
then
  mv -f /usr/lib/libvga.so.$VERSION.new /usr/lib/libvga.so.$VERSION
fi
if [ -f /usr/lib/libvgagl.so.$VERSION.new ]
then
  mv -f /usr/lib/libvgagl.so.$VERSION.new /usr/lib/libvgagl.so.$VERSION
fi

# create appropriate symbolic links
ln -sf libvga.so.$VERSION /usr/lib/libvga.so
ln -sf libvga.so.$VERSION /usr/lib/libvga.so.$MAJOR
ln -sf libvgagl.so.$VERSION /usr/lib/libvgagl.so
ln -sf libvgagl.so.$VERSION /usr/lib/libvgagl.so.$MAJOR

# fix up
ldconfig

# remove old versions...... there are none just now, 1.2.8 is the first
# Debian ELF svgalib
#for i in
#do
#  rm -f /usr/lib/libvga.so.$i
#  rm -f /usr/lib/libvgagl.so.$i
#done
