#!/bin/sh
#
#  File:       postinstall
#  Project:    XIL
#  Revision:   1.8
#  Last Mod:   17:07:49, 04/27/01
#
#  Description:
#
#        This script is creating the symbolic link from
#        /opt/SUNWits/Graphics-sw/xil/lib/libxil.so.1 to 
#        /usr/openwin/lib/libxil.so.1
#        in order to preserve compatibility with XIL 1.2 applications.
#
#        XIL can only exist in /usr/openwin/lib on a Solaris system.
#        Anywhere else, and XIL will not run.  installf takes care of
#        Putting the symbolic link based on any -R flag used during
#        package addition.  The link ALWAYS points to
#        /usr/openwin/lib/libxil.so.1 because on a running Solaris
#        system, that is the ONLY location libxil.so.1 can exist.
#        There is no need for relative path names because libxil.so.1
#        can exist in only one place on a Solaris system.  XIL cannot
#        be executed while located anywhere else.
#
# create directories for the old /opt location of the libxil.so.1
#
installf $PKGINST /opt d 0755 root sys  || exit 2
installf $PKGINST /opt/SUNWits d 0755 root bin  || exit 2
installf $PKGINST /opt/SUNWits/Graphics-sw d 0755 root bin || exit 2
installf $PKGINST /opt/SUNWits/Graphics-sw/xil d 0755 root sys || exit 2
installf $PKGINST /opt/SUNWits/Graphics-sw/xil/lib d 0755 root sys || exit 2

installf $PKGINST /opt/SUNWits/Graphics-sw/xil/lib/libxil.so.1=/usr/openwin/lib/libxil.so.1 s || exit 2

installf $PKGINST /opt/SUNWits/Graphics-sw/xil/lib/libxil.so=/usr/openwin/lib/libxil.so.1 s || exit 2

installf -f $PKGINST || exit 2
