openbsd-ports/databases/freetds/pkg/INSTALL
naddy 878bdc4341 Import of FreeTDS 0.52.
Submitted by Joshua Stein <jcs@rt.fm>.

FreeTDS is a project to document and implement the TDS (Tabular
DataStream) protocol.  TDS is used by Sybase and Microsoft for
client to database server communications.
2001-08-11 15:31:43 +00:00

68 lines
1.5 KiB
Plaintext

#!/bin/sh
# vim:ts=4:et
# $OpenBSD: INSTALL,v 1.1.1.1 2001/08/11 15:31:43 naddy Exp $
#
# Pre/post-installation setup of freetds
# exit on errors, use a sane path and install prefix
#
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
CONFIG_DIR=${SYSCONFDIR}
SAMPLE_CONFIG_DIR=$PREFIX/share/examples/freetds
do_notice()
{
echo
echo "+---------------"
echo "| The existing $1 configuration file in $CONFIG_DIR has"
echo "| NOT been changed. You may want to compare it to the current"
echo "| sample file, $SAMPLE_CONFIG_DIR/freetds.conf-sample,"
echo "| and update your configuration as needed."
echo "+---------------"
echo
}
do_install()
{
install -o root -g wheel -m 644 $SAMPLE_CONFIG_DIR/freetds.conf-sample \
$CONFIG_DIR/freetds.conf
echo
echo "+---------------"
echo "| The $1 configuration file, $CONFIG_DIR/freetds.conf,"
echo "| has been installed. Please view this file and change"
echo "| the configuration to meet your needs."
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)
if [ -f $CONFIG_DIR/freetds.conf ]; then
do_notice $1
else
do_install $1
fi
;;
*)
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
;;
esac
exit 0