openbsd-ports/math/grace/pkg/INSTALL
pvalchev 1832e4fb3a Import of grace-5.1.4
Grace is a tool to make two-dimensional plots of numerical data. It
runs under various (if not all) flavours of UNIX with X11 and M*tif.
Its capabilities are roughly similar to GUI-based programs like
Sigmaplot or Microcal Origin plus script-based tools like gnuplot or
Genplot. Its strength lies in the fact that it combines the
convenience of a graphical user interface with the power of a
scripting language which enables it to do sophisticated calculations
or perform automated tasks.

Flavors:
    no_x11 - build command line tool only, no gui
    fftw   - use math/fftw for optimized FFT
    netcdf - use math/netcdf for network common data form support
    xmhtml - use www/xmhtml to use grace's internal HTML browser
             for helpfiles etc.

WWW: http://plasma-gate.weizmann.ac.il/Grace/

MAINTAINER=	Nikolay Sturm <Nikolay.Sturm@desy.de>
2001-07-13 18:53:55 +00:00

69 lines
1.6 KiB
Plaintext

#!/bin/sh
# $OpenBSD: INSTALL,v 1.1.1.1 2001/07/13 18:53:55 pvalchev Exp $
#
# Pre/post-installation setup of grace
# exit on errors, use a sane path and install prefix
#
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
GRACE_DIR=${PREFIX}/grace
NO_X11=`echo "$1" | sed -e "s/.*-no_x11/no_x11/"`
do_notice()
{
echo
echo "+---------------"
echo "| A file/link $PREFIX/bin/grace has been found."
echo "| Links to grace files will not be set!"
echo "+---------------"
echo
}
do_install()
{
if [ $NO_X11 == "no_x11" ]; then
ln -s $GRACE_DIR/bin/grace $PREFIX/bin/grace
ln -s $GRACE_DIR/bin/grace $PREFIX/bin/gracebat
else
ln -s $GRACE_DIR/bin/xmgrace $PREFIX/bin/grace
ln -s $GRACE_DIR/bin/xmgrace $PREFIX/bin/gracebat
ln -s $GRACE_DIR/bin/xmgrace $PREFIX/bin/xmgrace
ln -s $GRACE_DIR/doc/xmgrace.1 $PREFIX/man/man1/xmgrace.1
fi
ln -s $GRACE_DIR/include/grace_np.h $PREFIX/include/grace_np.h
ln -s $GRACE_DIR/lib/libgrace_np.a $PREFIX/lib/libgrace_np.a
ln -s $GRACE_DIR/doc/grace.1 $PREFIX/man/man1/grace.1
ln -s $GRACE_DIR/doc/gracebat.1 $PREFIX/man/man1/gracebat.1
ln -s $GRACE_DIR/doc/grconvert.1 $PREFIX/man/man1/grconvert.1
}
# 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 [ -x $PREFIX/bin/grace ]; then
do_notice $1
else
do_install $1
fi
;;
*)
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
;;
esac
exit 0