#!/bin/sh
# $OpenBSD: INSTALL,v 1.2 2000/03/29 20:23:04 form Exp $
#
# Pre/post-installation setup of xcyrillic

# exit on errors, use a sane path and install prefix
#
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}

# Function: tell the user what s/he needs to do to use the port just installed
#
do_notice()
{
	echo
	echo "+---------------"
	echo "| For proper use of $1 you should notify the X-Windows system"
	echo "| that cyrillic fonts are installed. To do this, add the"
	echo "| following lines to /etc/XF86Config file:"
	echo "|"
	echo "|     FontPath \"${PREFIX}/lib/X11/fonts/xcyrillic/misc/\""
	echo "|     FontPath \"${PREFIX}/lib/X11/fonts/xcyrillic/75dpi/\""
	echo "|     FontPath \"${PREFIX}/lib/X11/fonts/xcyrillic/100dpi/\""
	echo "|"
	echo "| and restart the X-Windows system."
	echo "| Please note that if you wish to use these fonts by default,"
	echo "| you should add these lines before other 'FontPath' directives."
	echo "+---------------"
	echo
}

# verify proper execution
#
if [ $# -ne 2 ]; then
	echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
	exit 1
fi

# Verify/process the command
#
case $2 in
	PRE-INSTALL)
		: nothing to pre-install for this port
		;;
	POST-INSTALL)
		do_notice $1
		;;
	*)
		echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
		exit 1
		;;
esac

exit 0
