openbsd-ports/lang/python/pkg/INSTALL
2001-08-21 04:10:24 +00:00

64 lines
1.1 KiB
Plaintext

#! /bin/sh
#
# $OpenBSD: INSTALL,v 1.3 2001/08/21 04:10:24 jasoni Exp $
#
# python2 installation
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
do_notice_top()
{
echo
echo "+---------------"
echo "|"
echo "| $1 installation status:"
echo "|"
echo "| - the man page has been installed as python2"
}
do_notice_oldpython()
{
echo "| - there appears to be another version of python installed, to avoid"
echo "| conflict, this python binary has been installed as:"
echo "| ${PREFIX}/bin/python2.1"
}
do_notice_bottom()
{
echo "|"
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_top $1
if [ ! -e ${PREFIX}/bin/python ]; then
ln -s python2.1 ${PREFIX}/bin/python
else
do_notice_oldpython $1
fi
do_notice_bottom $1
;;
*)
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
;;
esac
exit 0